OFFSET
1,1
COMMENTS
Primes are in the order in which they appear in A354975, so the sequence is not increasing: for example, a(37) = 235337 > 231223 = a(38).
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
MAPLE
f:= proc(n) local k;
add(ithprime(n+k) mod ithprime(k), k=1..n)
end proc:
select(isprime, map(f, [$1..1000]);
MATHEMATICA
Block[{nn = 450, a, p}, Do[Set[p[i], Prime[i]], {i, 2 nn}]; Reap[Do[If[PrimeQ[#], Sow[#]] &@ Sum[Mod[p[i + j], p[j]], {j, i}], {i, nn}]][[-1, -1]]] (* Michael De Vlieger, Jun 19 2022 *)
PROG
(PARI) lista(nn) = my(list=List()); for (n=1, nn, if (isprime(p=sum(i=1, n, prime(i+n) % prime(i))), listput(list, p)); ); Vec(list); \\ Michel Marcus, Jun 19 2022
(Python)
from itertools import count, islice
from sympy import prime, isprime
def A355009_gen(): # generator of terms
return filter(isprime, (sum(prime(i+n) % prime(i) for i in range(1, n+1)) for n in count(1)))
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jun 15 2022
STATUS
approved