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-5 of 5 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

A364694 Polygonal numbers of order greater than 2 (A090466) which are the sum of the first k primes, for some k > 0.

Original entry on oeis.org

10, 28, 58, 100, 129, 160, 238, 328, 381, 501, 568, 639, 712, 874, 963, 1060, 1161, 1264, 1371, 1480, 1593, 1720, 1851, 2127, 2276, 2427, 2584, 2914, 3087, 3447, 3831, 4227, 4438, 4888, 5350, 5589, 5830, 6081, 6601, 6870, 8275, 10191, 10887, 11599, 12339, 12718
Offset: 1

Views

Author

Paolo Xausa, Aug 03 2023

Keywords

Examples

			28 is a term because it's both a triangular number and the sum of the first 5 primes (2 + 3 + 5 + 7 + 11).
58 is a term because it's both an octagonal number and the sum of the first 7 primes (2 + 3 + 5 + 7 + 11 + 13 + 17).
		

Crossrefs

Intersection of A007504 with A090466.

Programs

  • Mathematica
    A364693Q[n_]:=With[{d=Divisors[2n]},Catch[For[i=3,iJianing Song in A090466 *)
    A364694list[kmax_]:=Select[Accumulate[Prime[Range[kmax]]],A364693Q];A364694list[100]

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

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