[go: up one dir, main page]

login
Search: a175133 -id:a175133
     Sort: relevance | references | number | modified | created      Format: long | short | data
Numbers n such that sum of first n primes is a square.
+10
10
9, 2474, 6694, 7785, 709838, 126789311423
OFFSET
1,1
COMMENTS
Szabolcs Tengely asks if this sequence is infinite (see Lorentz Center paper). Luca shows that this sequence is of asymptotic density 0. Cilleruelo & Luca give a lower bound. - Charles R Greathouse IV, Feb 01 2013
REFERENCES
Florian Luca, On the sum of the first n primes being a square, Lithuanian Mathematical Journal 47:3 (2007), pp 243-247.
LINKS
Jan-Hendrik Evertse, Some open problems about Diophantine equations, Solvability of Diophantine Equations conference, Lorentz Center of Leiden University, The Netherlands.
Javier Cilleruelo and Florian Luca, On the sum of the first n primes, Q. J. Math. 59:4 (2008), 14 pp.
G. L. Honaker Jr. and C. Caldwell, Prime Curios!: 9
Carlos Rivera, Puzzle 9. Sum of first k primes is perfect square, The Prime Puzzles and Problems Connection.
FORMULA
a(n) = pi(A033998(n)).
EXAMPLE
Sum of first 9 primes is 2+3+5+7+11+13+17+19+23 = 100, which is square, so 9 is in the sequence.
MATHEMATICA
p = 2; s = 0; lst = {}; While[p < 10^7, s = s + p; If[ IntegerQ@ Sqrt@ s, AppendTo[lst, PrimePi@ p]; Print@ lst]; p = NextPrime@ p] (* Zak Seidov, Apr 11 2011 *)
PROG
(PARI) n=0; s=0; forprime(p=2, 1e6, n++; if(issquare(s+=p), print1(n", "))) \\ Charles R Greathouse IV, Feb 01 2013
CROSSREFS
Cf. A000040, A033998, A061888, A061890 (associated squares).
Cf. also A175133, A364696, A366270.
KEYWORD
nonn
AUTHOR
Calculated by Jud McCranie
EXTENSIONS
126789311423 from Giovanni Resta, May 27 2003
Edited by Ray Chandler, Mar 20 2007
STATUS
approved
Nonnegative integers k such that the sum of the first k primes is a pentagonal number.
+10
5
0, 2, 77, 24587, 48070640, 471412484, 7471587112
OFFSET
1,2
EXAMPLE
2 is a term because the sum of the first 2 primes (2 + 3 = 5) is a pentagonal number.
MATHEMATICA
A364696list[kmax_]:=Module[{p=0}, Join[{0}, Table[If[IntegerQ[(Sqrt[24(p+=Prime[k])+1]+1)/6], k, Nothing], {k, kmax}]]]; A364696list[25000] (* Paolo Xausa, Oct 06 2023 *)
KEYWORD
nonn,hard,more
AUTHOR
Paolo Xausa, Aug 03 2023
EXTENSIONS
a(5) from Michel Marcus, Aug 04 2023
a(6)-a(7) from Hugo Pfoertner, Aug 04 2023
STATUS
approved
Positive integers k such that the sum of the first k primes is a polygonal number of order greater than 2 (A090466).
+10
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
OFFSET
1,1
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
KEYWORD
nonn
AUTHOR
Paolo Xausa, Aug 03 2023
STATUS
approved
Nonnegative integers k such that the sum of the first k primes is a hexagonal number.
+10
4
0, 5, 93448, 39545957, 240439822, 1894541497, 132563927578
OFFSET
1,2
EXAMPLE
5 is a term because the sum of the first five primes (2 + 3 + 5 + 7 + 11 = 28) is a hexagonal number.
MATHEMATICA
A366270list[kmax_]:=Module[{p=0}, Join[{0}, Table[If[IntegerQ[(Sqrt[8(p+=Prime[k])+1]+1)/4], k, Nothing], {k, kmax}]]]; A366270list[10^5]
CROSSREFS
Subsequence of A175133.
Cf. A000384, A007504, A033997, A364695, A364696, A366269 (corresponding hexagonal numbers).
KEYWORD
nonn,hard,more
AUTHOR
Paolo Xausa, Oct 06 2023
STATUS
approved

Search completed in 0.005 seconds