login
A365591
Numbers k such that Sum_{i=1..k} prime(i) + i is prime.
0
1, 5, 8, 17, 28, 33, 40, 41, 49, 52, 64, 65, 69, 77, 92, 93, 108, 109, 120, 121, 136, 137, 140, 144, 165, 200, 201, 204, 225, 229, 265, 269, 272, 280, 292, 312, 325, 332, 337, 344, 356, 361, 369, 376, 388, 457, 464, 473, 480, 529, 541, 548, 553, 556, 573, 577
OFFSET
1,2
COMMENTS
Numbers k such that A000217(k) + A007504(k) is prime. - Robert Israel, Sep 10 2023
EXAMPLE
2+1 = 3, which is prime, so 1 is a term.
2+1 + 3+2 + 5+3 + 7+4 + 11+5 = 43, which is prime, so 5 is a term.
MAPLE
P:= [seq(ithprime(i), i=1..1000)]:
S:= ListTools:-PartialSums(P):
select(i -> isprime(S[i]+i*(i+1)/2), [$1..1000]); # Robert Israel, Sep 10 2023
MATHEMATICA
With[{m = 600}, Position[Accumulate[Range[m] + Prime[Range[m]]], _?PrimeQ] // Flatten] (* Amiram Eldar, Sep 10 2023 *)
PROG
(PARI) isok(k) = isprime(sum(i=1, k, i+prime(i))); \\ Michel Marcus, Sep 14 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Saish S. Kambali, Sep 10 2023
STATUS
approved