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!)
A364695 Positive integers k such that the sum of the first k primes is a polygonal number of order greater than 2 (A090466). 4
3, 5, 7, 9, 10, 11, 13, 15, 16, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 39, 40, 42, 44, 46, 47, 49, 51, 52, 53, 54, 56, 57, 62, 68, 70, 72, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 90, 91, 92, 97, 99, 103, 105, 106 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Wikipedia, Polygonal number.
EXAMPLE
5 is a term because the sum of the first 5 primes (2 + 3 + 5 + 7 = 28) is a triangular number.
7 is a term because the sum of the first 7 primes (2 + 3 + 5 + 7 + 11 + 13 = 58) is an octagonal number.
MATHEMATICA
A364693Q[n_]:=With[{d=Divisors[2n]}, Catch[For[i=3, i<Length[d]-1, i++, If[Divisible[2n/d[[i]]-2, d[[i]]-1], Throw[True]]]; False]]; (* After Jianing Song in A090466 *)
A364695list[kmax_]:=Flatten[Position[Map[A364693Q, Accumulate[Prime[Range[kmax]]]], True]]; A364695list[100]
PROG
(PARI) isok(k) = my(s = sum(i=1, k, prime(i))); for (j=3, s-1, if (ispolygonal(s, j), return(1))); \\ Michel Marcus, Aug 03 2023
CROSSREFS
Sequence in context: A076212 A085621 A324101 * A091066 A277599 A103848
KEYWORD
nonn
AUTHOR
Paolo Xausa, Aug 03 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 May 1 22:42 EDT 2024. Contains 372178 sequences. (Running on oeis4.)