login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A354972
Numbers k such that A354975(k) is prime.
3
2, 9, 15, 19, 21, 32, 63, 75, 77, 108, 115, 120, 147, 151, 229, 235, 243, 248, 252, 258, 279, 283, 285, 288, 290, 299, 303, 309, 314, 352, 360, 361, 362, 377, 382, 387, 393, 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
OFFSET
1,1
COMMENTS
Numbers k such that Sum_{i=1..k} (prime(i+k) mod prime(i)) is prime.
LINKS
EXAMPLE
a(1) = 2 is a term because A354975(2) = (5 mod 2) + (7 mod 3) = 2 is prime.
MAPLE
filter:= proc(n) local k;
isprime(add(ithprime(n+k) mod ithprime(k), k=1..n))
end proc:
select(filter, [$1..1000]);
PROG
(PARI) isok(k) = isprime(sum(i=1, k, prime(i+k) % prime(i))); \\ Michel Marcus, Jun 19 2022
(Python)
from itertools import count, islice
from sympy import prime, isprime
def A354972_gen(): # generator of terms
for n in count(1):
if isprime(sum(prime(i+n) % prime(i) for i in range(1, n+1))):
yield n
A354972_list = list(islice(A354972_gen(), 10)) # Chai Wah Wu, Jun 20 2022
CROSSREFS
Sequence in context: A353317 A083288 A272044 * A304803 A184531 A063105
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jun 15 2022
STATUS
approved