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
a(2) = 28, as A000217(7) = 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28 = 2 + 3 + 5 + 7 + 11 = A007504(5).
-
a066527 n = a066527_list !! (n-1)
a066527_list = filter ((== 1) . a010054) a007504_list
-- Reinhard Zumkeller, Mar 23 2013
-
a066527(m) = local(d,ds,p,ps); d=1; ds=1; p=2; ps=2; while(ds
-
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 *)
-
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
a(6) from Philip Sung (philip_sung(AT)hotmail.com), Jan 25 2002
A061890
Squares that are the sum of initial primes.
Original entry on oeis.org
100, 25633969, 212372329, 292341604, 3672424151449, 219704732167875184222756
Offset: 1
100 = 10^2 = 2 + 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23, so 100 is in the sequence.
-
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
-
s[n_] := Sum[Prime[i], {i, 1, n}];t := Table[s[n], {n, 20000}];Select[t, IntegerQ[Sqrt[#]] &] (* Carlos Eduardo Olivieri, Feb 24 2015 *)
-
lista() = {s = 0; forprime(p=2, ,s += p; if (issquare(s), print1(s, ", ")););} \\ Michel Marcus, Mar 10 2015
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
5 is a term because it's both a pentagonal number and the sum of the first two primes (2 + 3).
-
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 *)
-
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
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
5 is a term because the sum of the first five primes (2 + 3 + 5 + 7 + 11 = 28) is a hexagonal number.
-
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.
Comments