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.

A066527 Triangular numbers that for some k are also the sum of the first k primes.

Original entry on oeis.org

10, 28, 133386, 4218060, 54047322253, 14756071005948636, 600605016143706003, 41181981873797476176, 240580227206205322973571, 1350027226921161196478736
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 06 2002

Keywords

Comments

a(n) = A000217(i) = A007504(j) for appropriate i, j.
These are the 4, 7, 516, 2904, 328777, ... -th triangular numbers and are the sums of the first 3, 5, 217, 1065, 93448, ... prime numbers respectively.
a(7) is the sum of the first 240439822 primes. a(8) is the sum of the first 1894541497 primes. - Donovan Johnson, Nov 24 2008
a(9) is the sum of the first 132563927578 primes. a(10) is the sum of the first 309101198255 primes. a(11) > 6640510710493148698166596 (sum of first pi(2*10^13) primes). - Donovan Johnson, Aug 23 2010

Examples

			a(2) = 28, as A000217(7) = 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28 = 2 + 3 + 5 + 7 + 11 = A007504(5).
		

Crossrefs

Intersection of A000217 and A007504.
Cf. also A061890, A364691, A366269.

Programs

  • Haskell
    a066527 n = a066527_list !! (n-1)
    a066527_list = filter ((== 1) . a010054) a007504_list
    -- Reinhard Zumkeller, Mar 23 2013
    
  • Maple
    a066527(m) = local(d,ds,p,ps); d=1; ds=1; p=2; ps=2; while(ds
    				
  • Mathematica
    s = 0; Do[s = s + Prime[n]; t = Floor[ Sqrt[2*s]]; If[t*(t + 1) == 2s, Print[s]], {n, 1, 10^6} ]
    Select[Accumulate[Prime[Range[5000000]]],IntegerQ[(Sqrt[1+8#]-1)/2]&] (* Harvey P. Dale, May 04 2013 *)
  • Python
    from sympy import integer_nthroot, isprime, nextprime
    def istri(n): return integer_nthroot(8*n+1, 2)[1]
    def afind(limit):
        s, p = 2, 2
        while s < limit:
            if istri(s): print(s, end=", ")
            p = nextprime(p)
            s += p
    afind(10**11) # Michael S. Branicky, Oct 28 2021

Extensions

a(5) from Klaus Brockhaus and Robert G. Wilson v, Jan 07 2002
a(6) from Philip Sung (philip_sung(AT)hotmail.com), Jan 25 2002
a(7)-a(8) from Donovan Johnson, Nov 24 2008
a(9)-a(10) from Donovan Johnson, Aug 23 2010

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

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

Original entry on oeis.org

0, 5, 13490, 3299391550, 22042432252064127, 2387505511919644051, 680588297594638712735
Offset: 1

Views

Author

Paolo Xausa, Aug 03 2023

Keywords

Examples

			5 is a term because it's both a pentagonal number and the sum of the first two primes (2 + 3).
		

Crossrefs

Intersection of A000326 with A007504.

Programs

  • Mathematica
    A364691list[kmax_]:=Module[{p=0},Join[{0},Table[If[IntegerQ[(Sqrt[24(p+=Prime[k])+1]+1)/6],p,Nothing],{k,kmax}]]];A364691list[25000] (* Paolo Xausa, Oct 06 2023 *)
  • PARI
    ispenta(n) = my(s); issquare(24*n+1,&s)&&s%6==5;
    my(S=0); forprime (p=2, oo, S+=p; if (ispenta(S), print1(S,", "))) \\ Hugo Pfoertner, Aug 03 2023

Extensions

a(5)-a(7) from Hugo Pfoertner, Aug 04 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]
Showing 1-4 of 4 results.