cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A033997 Numbers n such that sum of first n primes is a square.

Original entry on oeis.org

9, 2474, 6694, 7785, 709838, 126789311423
Offset: 1

Views

Author

Calculated by Jud McCranie

Keywords

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

Examples

			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.
		

References

  • Florian Luca, On the sum of the first n primes being a square, Lithuanian Mathematical Journal 47:3 (2007), pp 243-247.

Crossrefs

Cf. A000040, A033998, A061888, A061890 (associated squares).
Cf. also A175133, A364696, A366270.

Programs

  • 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 *)
  • PARI
    n=0;s=0;forprime(p=2,1e6,n++;if(issquare(s+=p),print1(n", "))) \\ Charles R Greathouse IV, Feb 01 2013

Formula

a(n) = pi(A033998(n)).

Extensions

126789311423 from Giovanni Resta, May 27 2003
Edited by Ray Chandler, Mar 20 2007

A364696 Nonnegative integers k such that the sum of the first k primes is a pentagonal number.

Original entry on oeis.org

0, 2, 77, 24587, 48070640, 471412484, 7471587112
Offset: 1

Views

Author

Paolo Xausa, Aug 03 2023

Keywords

Examples

			2 is a term because the sum of the first 2 primes (2 + 3 = 5) is a pentagonal number.
		

Crossrefs

Programs

  • 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 *)

Extensions

a(5) from Michel Marcus, Aug 04 2023
a(6)-a(7) from Hugo Pfoertner, Aug 04 2023

A175133 Sum of first a(n) consecutive primes gives a triangular number.

Original entry on oeis.org

3, 5, 217, 1065, 93448, 39545957, 240439822, 1894541497, 132563927578, 309101198255
Offset: 1

Views

Author

Ctibor O. Zizka, Feb 20 2010

Keywords

Comments

A007504(a(n)) = A000217(j) for some j.
Numbers k such that Sum_{i=1..k} prime(i) = j*(j+1)/2, where prime(i) is i-th prime, and j an integer.

Examples

			k=3 is a term: 2+3+5=10, and 10=4*5/2 is a triangular number, j=4.
k=5 is a term: 2+3+5+7+11=28, and 28=7*8/2 is a triangular number, j=7.
k=217 is a term: 2+3+...+1327=133386, and 133386=516*517/2 is a triangular number, j=516.
		

Crossrefs

Programs

  • PARI
    isok(n) = ispolygonal(sum(k=1, n, prime(k)), 3); \\ Michel Marcus, Oct 13 2018

Extensions

a(6)-a(10) from Nathaniel Johnston, May 10 2011 (a(7)-a(10) based on comments by Donovan Johnson)
Name, comment and example clarified by Ilya Gutkovskiy, Aug 07 2023

A366269 Hexagonal numbers which are the sum of the first k primes, for some k >= 0.

Original entry on oeis.org

0, 28, 54047322253, 14756071005948636, 600605016143706003, 41181981873797476176, 240580227206205322973571
Offset: 1

Views

Author

Paolo Xausa, Oct 06 2023

Keywords

Examples

			28 is a term because it's both a hexagonal number and the sum of the first five primes (2 + 3 + 5 + 7 + 11).
		

Crossrefs

Intersection of A000384 with A007504.
Subsequence of A066527.
Cf. A061890, A364691, A364694, A366270 (corresponding k values).

Programs

  • Mathematica
    A366269list[kmax_]:=Module[{p=0},Join[{0},Table[If[IntegerQ[(Sqrt[8(p+=Prime[k])+1]+1)/4],p,Nothing],{k,kmax}]]];A366269list[10^5]

Formula

a(n) = A007504(A366270(n)).
Showing 1-4 of 4 results.