A298250
The first of three consecutive pentagonal numbers the sum of which is equal to the sum of three consecutive primes.
Original entry on oeis.org
176, 35497, 45850, 68587, 87725, 229126, 488776, 705551, 827702, 1085876, 1127100, 1255380, 1732900, 1914785, 1972840, 2453122, 2737126, 2749297, 2818776, 3245026, 4598126, 5116190, 5522882, 6180335, 6658120, 6939126, 6958497, 7088327, 7114437, 7140595
Offset: 1
176 is in the sequence because 176+210+247 (consecutive pentagonal numbers) = 633 = 199+211+223 (consecutive primes).
-
N:= 10^8: # to get all terms where the sums <= N
Res:= NULL:
mmax:= floor((sqrt(8*N-23)-5)/6):
M:= [seq(seq(4*i+j,j=2..3),i=0..mmax/4)]:
M3:= map(m -> 9/2*m^2+15/2*m+6, M):
for i from 1 to nops(M) do
m:= M3[i];
r:= ceil((m-8)/3);
p1:= prevprime(r+1);
p2:= nextprime(p1);
p3:= nextprime(p2);
while p1+p2+p3 > m do
p3:= p2; p2:= p1; p1:= prevprime(p1);
od:
if p1+p2+p3 = m then
Res:= Res, M[i]*(3*M[i]-1)/2;
fi
od:
Res; # Robert Israel, Jan 16 2018
-
Module[{prs3=Total/@Partition[Prime[Range[10^6]],3,1]},Select[ Partition[ PolygonalNumber[ 5,Range[ 5000]],3,1],MemberQ[ prs3,Total[#]]&]][[All,1]] (* Harvey P. Dale, Dec 25 2022 *)
-
L=List(); forprime(p=2, 8000000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if(issquare(72*t-207, &sq) && (sq-15)%18==0, u=(sq-15)\18; listput(L, (3*u^2-u)/2))); Vec(L)
A298272
The first of three consecutive hexagonal numbers the sum of which is equal to the sum of three consecutive primes.
Original entry on oeis.org
6, 6216, 7626, 9180, 16836, 19900, 22366, 29646, 76636, 89676, 93096, 114960, 116886, 118828, 322806, 365940, 397386, 422740, 437580, 471906, 499500, 574056, 595686, 626640, 690900, 743590, 984906, 1041846, 1148370, 1209790, 1260078, 1357128, 1450956
Offset: 1
6 is in the sequence because 6+15+28 (consecutive hexagonal numbers) = 49 = 13+17+19 (consecutive primes).
Cf.
A000040,
A000384,
A054643,
A298073,
A298168,
A298169,
A298222,
A298223,
A298250,
A298251,
A298273.
-
N:= 100: # to get a(1)..a(100)
count:= 0:
mmax:= floor((sqrt(24*N-87)-9)/12):
for i from 1 while count < N do
mi:= 2*i;
m:= 6*mi^2+9*mi+7;
r:= ceil((m-8)/3);
p1:= prevprime(r+1);
p2:= nextprime(p1);
p3:= nextprime(p2);
while p1+p2+p3 > m do
p3:= p2; p2:= p1; p1:= prevprime(p1);
od:
if p1+p2+p3 = m then
count:= count+1;
A[count]:= mi*(2*mi-1);
fi
od:
seq(A[i], i=1..count); # Robert Israel, Jan 16 2018
-
L=List(); forprime(p=2, 2000000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if(issquare(24*t-87, &sq) && (sq-9)%12==0, u=(sq-9)\12; listput(L, u*(2*u-1)))); Vec(L)
A298273
The first of three consecutive primes the sum of which is equal to the sum of three consecutive hexagonal numbers.
Original entry on oeis.org
13, 6427, 7873, 9439, 17203, 20287, 22783, 30133, 77417, 90523, 93949, 115903, 117841, 119797, 324403, 367649, 399163, 424573, 439441, 473839, 501493, 576193, 597859, 628861, 693223, 746023, 987697, 1044733, 1151399, 1212889, 1263247, 1360417, 1454351
Offset: 1
13 is in the sequence because 13+17+19 (consecutive primes) = 49 = 6+15+28 (consecutive hexagonal numbers).
Cf.
A000040,
A000384,
A054643,
A298073,
A298168,
A298169,
A298222,
A298223,
A298250,
A298251,
A298272.
-
N:= 100: # to get a(1)..a(100)
count:= 0:
mmax:= floor((sqrt(24*N-87)-9)/12):
for i from 1 while count < N do
mi:= 2*i;
m:= 6*mi^2+9*mi+7;
r:= ceil((m-8)/3);
p1:= prevprime(r+1);
p2:= nextprime(p1);
p3:= nextprime(p2);
while p1+p2+p3 > m do
p3:= p2; p2:= p1; p1:= prevprime(p1);
od:
if p1+p2+p3 = m then
count:= count+1;
A[count]:= p1;
fi
od:
seq(A[i],i=1..count); # Robert Israel, Jan 16 2018
-
L=List(); forprime(p=2, 2000000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if(issquare(24*t-87, &sq) && (sq-9)%12==0, u=(sq-9)\12; listput(L, p))); Vec(L)
A298301
The first of three consecutive heptagonal numbers the sum of which is equal to the sum of three consecutive primes.
Original entry on oeis.org
7, 874, 7209, 15484, 16687, 23863, 68641, 98704, 122877, 239785, 373842, 455182, 498852, 523723, 601966, 652036, 769230, 777573, 1003939, 1019844, 1121245, 1189215, 1203049, 1420159, 1484946, 1594804, 1606807, 1687977, 1804975, 2292973, 2533612, 3012363
Offset: 1
7 is in the sequence because 7+18+34 (consecutive hexagonal numbers) = 59 = 17+19+23 (consecutive primes).
Cf.
A000040,
A000566,
A054643,
A298073,
A298168,
A298169,
A298222,
A298223,
A298250,
A298251,
A298272,
A298273,
A298302.
-
L=List(); forprime(p=2, 2000000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if(issquare(120*t-519, &sq) && (sq-21)%30==0, u=(sq-21)\30; listput(L, (5*u^2-3*u)/2))); Vec(L)
A298302
The first of three consecutive primes the sum of which is equal to the sum of three consecutive heptagonal numbers.
Original entry on oeis.org
17, 967, 7477, 15877, 17093, 24337, 69467, 99689, 123983, 241333, 375773, 457307, 501077, 525983, 604411, 654587, 772001, 780347, 1007099, 1023037, 1124593, 1192651, 1206497, 1423921, 1488797, 1598791, 1610809, 1692071, 1809221, 2297759, 2538623, 3017849
Offset: 1
17 is in the sequence because 17+19+23 (consecutive primes) = 59 = 7+18+34 (consecutive hexagonal numbers).
Cf.
A000040,
A000566,
A054643,
A298073,
A298168,
A298169,
A298222,
A298223,
A298250,
A298251,
A298272,
A298273,
A298301.
-
L=List(); forprime(p=2, 4000000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if(issquare(120*t-519, &sq) && (sq-21)%30==0, u=(sq-21)\30; listput(L, p))); Vec(L)
A298312
The first of three consecutive octagonal numbers the sum of which is equal to the sum of three consecutive primes.
Original entry on oeis.org
12160, 74576, 158240, 181056, 269400, 371008, 601216, 606600, 848008, 980408, 1242920, 2075008, 3292816, 3680776, 4477408, 4685000, 5627960, 7505008, 8263480, 9289280, 10397408, 10419760, 10735208, 10757920, 12726680, 13000008, 14200576, 15426936, 15700256
Offset: 1
12160 is in the sequence because 12160+12545+12936 (consecutive octagonal numbers) = 37641 = 12541+12547+12553 (consecutive primes).
Cf.
A000040,
A000567,
A054643,
A298073,
A298168,
A298169,
A298222,
A298223,
A298250,
A298251,
A298272,
A298273,
A298301,
A298302,
A298313.
-
L=List(); forprime(p=2, 20000000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if(issquare(36*t-180, &sq) && (sq-12)%18==0, u=(sq-12)\18; listput(L, 3*u^2-2*u))); Vec(L)
-
from _future_ import division
from sympy import prevprime, nextprime
A298312_list, n, m = [], 1, 30
while len(A298312_list) < 10000:
k = prevprime(m//3)
k2 = nextprime(k)
if prevprime(k) + k + k2 == m or k + k2 + nextprime(k2) == m:
A298312_list.append(n*(3*n-2))
n += 1
m += 18*n + 3 # Chai Wah Wu, Jan 22 2018
A298313
The first of three consecutive primes the sum of which is equal to the sum of three consecutive octagonal numbers.
Original entry on oeis.org
12541, 75521, 159617, 182519, 271181, 373091, 603901, 609289, 851197, 983819, 1246757, 2079997, 3299081, 3687421, 4484737, 4692497, 5636171, 7514477, 8273437, 9299831, 10408577, 10430921, 10746557, 10769281, 12739037, 13012487, 14213621, 15440531, 15713959
Offset: 1
12541 is in the sequence because 12541+12547+12553 (consecutive primes) = 37641 = 12160+12545+12936 (consecutive octagonal numbers).
Cf.
A000040,
A000567,
A054643,
A298073,
A298168,
A298169,
A298222,
A298223,
A298250,
A298251,
A298272,
A298273,
A298301,
A298302,
A298312.
-
Module[{nn=5000,oct3},oct3=Total/@Partition[PolygonalNumber[8,Range[nn]],3,1];Select[ Partition[Prime[Range[PrimePi[Ceiling[Max[oct3]/3]]]],3,1],MemberQ[ oct3,Total[ #]]&]][[All,1]] (* Harvey P. Dale, Dec 03 2022 *)
-
L=List(); forprime(p=2, 20000000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if(issquare(36*t-180, &sq) && (sq-12)%18==0, u=(sq-12)\18; listput(L, p))); Vec(L)
-
from _future_ import division
from sympy import prevprime, nextprime
A298313_list, n, m = [], 1, 30
while len(A298313_list) < 10000:
k = prevprime(m//3)
k2 = prevprime(k)
k3 = nextprime(k)
if k2 + k + k3 == m:
A298313_list.append(k2)
elif k + k3 + nextprime(k3) == m:
A298313_list.append(k)
n += 1
m += 18*n + 3 # Chai Wah Wu, Jan 22 2018
Showing 1-7 of 7 results.