cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A354972 Numbers k such that A354975(k) is prime.

This page as a plain text file.
%I A354972 #28 Jun 20 2022 12:53:30
%S A354972 2,9,15,19,21,32,63,75,77,108,115,120,147,151,229,235,243,248,252,258,
%T A354972 279,283,285,288,290,299,303,309,314,352,360,361,362,377,382,387,393,
%U A354972 398,413,418,430,447,457,462,465,467,468,470,475,488,510,518,551,560,569,604,625,643,679,732,735,740
%N A354972 Numbers k such that A354975(k) is prime.
%C A354972 Numbers k such that Sum_{i=1..k} (prime(i+k) mod prime(i)) is prime.
%H A354972 Robert Israel, <a href="/A354972/b354972.txt">Table of n, a(n) for n = 1..1000</a>
%e A354972 a(1) = 2 is a term because A354975(2) = (5 mod 2) + (7 mod 3) = 2 is prime.
%p A354972 filter:= proc(n) local k;
%p A354972    isprime(add(ithprime(n+k) mod ithprime(k), k=1..n))
%p A354972 end proc:
%p A354972 select(filter, [$1..1000]);
%o A354972 (PARI) isok(k) = isprime(sum(i=1, k, prime(i+k) % prime(i))); \\ _Michel Marcus_, Jun 19 2022
%o A354972 (Python)
%o A354972 from itertools import count, islice
%o A354972 from sympy import prime, isprime
%o A354972 def A354972_gen(): # generator of terms
%o A354972     for n in count(1):
%o A354972         if isprime(sum(prime(i+n) % prime(i) for i in range(1,n+1))):
%o A354972             yield n
%o A354972 A354972_list = list(islice(A354972_gen(),10)) # _Chai Wah Wu_, Jun 20 2022
%Y A354972 Cf. A354975, A355009.
%K A354972 nonn
%O A354972 1,1
%A A354972 _J. M. Bergot_ and _Robert Israel_, Jun 15 2022