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-10 of 10 results.

A061890 Squares that are the sum of initial primes.

Original entry on oeis.org

100, 25633969, 212372329, 292341604, 3672424151449, 219704732167875184222756
Offset: 1

Views

Author

David W. Wilson, May 12 2001

Keywords

Comments

The set of squares in A007504. - Zak Seidov, Oct 07 2015

Examples

			100 = 10^2 = 2 + 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23, so 100 is in the sequence.
		

Crossrefs

Programs

  • Maple
    N:= 10^7: # to use primes up to N
    P:= select(isprime, [2,seq(2*i+1, i=1..floor(N/2))]):
    S:= ListTools:-PartialSums(P):
    select(issqr,S); # Robert Israel, Feb 16 2015
  • Mathematica
    s[n_] := Sum[Prime[i], {i, 1, n}];t := Table[s[n], {n, 20000}];Select[t, IntegerQ[Sqrt[#]] &] (* Carlos Eduardo Olivieri, Feb 24 2015 *)
  • PARI
    lista() = {s = 0; forprime(p=2, ,s += p; if (issquare(s), print1(s, ", ")););} \\ Michel Marcus, Mar 10 2015

Formula

a(n) = A061888(n)^2.
Intersection of A000290 and A007504. - Zak Seidov, Oct 08 2015

Extensions

Corrected by Vladeta Jovovic, May 21 2001
a(6) 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

A033998 Numbers n such that the sum of the primes <= n is a square.

Original entry on oeis.org

23, 22073, 67187, 79427, 10729219, 3531577135439
Offset: 1

Views

Author

Calculated by Jud McCranie

Keywords

Examples

			2+3+5+7+11+13+17+19+23 = 10^2 is a square, so 23 is in the sequence.
		

Crossrefs

Programs

Formula

a(n) = Prime(A033997(n))

Extensions

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

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

A364695 Positive integers k such that the sum of the first k primes is a polygonal number of order greater than 2 (A090466).

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Aug 03 2023

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    A364693Q[n_]:=With[{d=Divisors[2n]},Catch[For[i=3,iJianing Song in A090466 *)
    A364695list[kmax_]:=Flatten[Position[Map[A364693Q,Accumulate[Prime[Range[kmax]]]],True]];A364695list[100]
  • 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

A366270 Nonnegative integers k such that the sum of the first k primes is a hexagonal number.

Original entry on oeis.org

0, 5, 93448, 39545957, 240439822, 1894541497, 132563927578
Offset: 1

Views

Author

Paolo Xausa, Oct 06 2023

Keywords

Examples

			5 is a term because the sum of the first five primes (2 + 3 + 5 + 7 + 11 = 28) is a hexagonal number.
		

Crossrefs

Subsequence of A175133.
Cf. A000384, A007504, A033997, A364695, A364696, A366269 (corresponding hexagonal numbers).

Programs

  • 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]

A061888 Numbers k such that k^2 is the sum of the first m primes for some m.

Original entry on oeis.org

10, 5063, 14573, 17098, 1916357, 468726713734
Offset: 1

Views

Author

David W. Wilson, May 12 2001

Keywords

Examples

			10^2 = 2+3+5+7+11+13+17+19+23, so 10 is in the sequence.
		

Crossrefs

Formula

a(n)^2 = A061890(n).

Extensions

a(6) from Giovanni Resta, May 27 2003
Edited by Ray Chandler, Mar 20 2007

A264858 Integers k such that A007504(k) + 1 is a square.

Original entry on oeis.org

0, 17, 539, 652, 6420, 350857847
Offset: 1

Views

Author

Altug Alkan, Nov 26 2015

Keywords

Comments

Integers k such that the sum of the first k primes + 1 is a square.
Integers k such that A014284(k+1) is a square.
In A110996, it is commented that a(6) > 250000, if it exists.
a(6) > 50000000, if it exists. - Jon E. Schoenfield, Nov 29 2015

Examples

			a(2) = 17 because A007504(17) + 1 = 440 + 1 = 441 is a square.
		

Crossrefs

Programs

Extensions

a(6) from Jinyuan Wang, Aug 09 2023

A274120 Squares that are the sum of the first k odd primes for some k.

Original entry on oeis.org

961, 1369, 1849, 4225, 263169, 130919364, 758451600, 29682949232484409
Offset: 1

Views

Author

K. D. Bajpai, Jun 10 2016

Keywords

Comments

Intersection of A000290 and A071148. [Felix Fröhlich, Jun 10 2016]
a(9), if it exists, is larger than 2*10^26 and would require adding more than 3.6*10^12 primes. - Giovanni Resta, Jun 12 2016

Examples

			961 is in the sequence because 961 = 31^2. Also, 3+5+7+...+83+89 = 961.
		

Crossrefs

Programs

  • Mathematica
    Select[s=0;Table[s=s+Prime[k],{k,2,15000000}],IntegerQ[Sqrt[#]]&]
    Select[Accumulate[Prime[Range[2,100000]]],IntegerQ[Sqrt[# ]]&] (* Harvey P. Dale, May 26 2023 *)
  • PARI
    my(s = 0); forprime(p=3, 1e10, s += p; if (issquare(s), print1(s, ", ")))

Extensions

Second comment rephrased by Harvey P. Dale, May 26 2023

A353024 Largest k such that A007504(k) <= n^2.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 11, 11, 12, 13, 14, 14, 15, 16, 17, 17, 18, 19, 19, 20, 21, 21, 22, 23, 23, 24, 25, 25, 26, 27, 27, 28, 29, 30, 30, 31, 31, 32, 33, 33, 34, 35, 35, 36, 37, 37, 38, 39, 39, 40, 40, 41, 42, 42, 43, 44, 44, 45, 45, 46, 47, 47
Offset: 1

Views

Author

Joelle H. Kassir, Apr 17 2022

Keywords

Crossrefs

Programs

  • PARI
    first(N)=my(v=vector(N),s,k,n=1,n2=1); forprime(p=2,, s+=p; k++; while(s>n2, v[n]=k-1; if(n++>N, return(v)); n2=n^2)) \\ Charles R Greathouse IV, Apr 18 2022
    
  • PARI
    a(n)=my(n2=n^2,s,k); forprime(p=2,, s+=p; k++; if(s>n2, return(k-1))) \\ Charles R Greathouse IV, Apr 18 2022
  • Python
    from sympy import prime
    def a(n):
        k = 1
        total = 0
        while True:
            total += prime(k)
            if total > n**2:
                break
            k += 1
        return k-1
    

Formula

a(n) = A337769(n) - 1.
a(n) ~ sqrt(2)*n/sqrt(log n). - Charles R Greathouse IV, Apr 18 2022
a(n) = A350174(n^2). - Kevin Ryde, Apr 19 2022
Showing 1-10 of 10 results.