The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Numbers k such that A000217(k) + A007504(k) is prime. - Robert Israel, Sep 10 2023
LINKS
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
Sequence in context: A088646 A090679 A031191 * A212115 A091625 A027601
KEYWORD
nonn,easy
AUTHOR
Saish S. Kambali, Sep 10 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 4 15:36 EDT 2024. Contains 373099 sequences. (Running on oeis4.)