A298463
The first of two consecutive pentagonal numbers the sum of which is equal to the sum of two consecutive primes.
Original entry on oeis.org
70, 3577, 10795, 36895, 55777, 70525, 78547, 125137, 178365, 208507, 258130, 329707, 349692, 394497, 438751, 468442, 478555, 499105, 619852, 663005, 753667, 827702, 877455, 900550, 1025480, 1085876, 1169092, 1201090, 1211852, 1233520, 1339065, 1508512
Offset: 1
70 is in the sequence because 70+92 (consecutive pentagonal numbers) = 162 = 79+83 (consecutive primes).
-
Select[Partition[PolygonalNumber[5,Range[1500]],2,1],CompositeQ[Total[#]/2]&&Total[#] == NextPrime[ Total[#]/2]+NextPrime[Total[#]/2,-1]&][[;;,1]] (* Harvey P. Dale, Jan 20 2024 *)
-
L=List(); forprime(p=2, 1600000, q=nextprime(p+1); t=p+q; if(issquare(12*t-8, &sq) && (sq-2)%6==0, u=(sq-2)\6; listput(L, (3*u^2-u)/2))); Vec(L)
-
from _future_ import division
from sympy import prevprime, nextprime
A298463_list, n, m = [], 1 ,6
while len(A298463_list) < 10000:
k = prevprime(m//2)
if k + nextprime(k) == m:
A298463_list.append(n*(3*n-1)//2)
n += 1
m += 6*n-1 # Chai Wah Wu, Jan 20 2018
A298464
The first of two consecutive primes the sum of which is equal to the sum of two consecutive pentagonal numbers.
Original entry on oeis.org
79, 3643, 10909, 37123, 56053, 70849, 78889, 125551, 178877, 209063, 258743, 330409, 350411, 395261, 439559, 469279, 479387, 499969, 620813, 663997, 754723, 828811, 878597, 901709, 1026709, 1087147, 1170397, 1202429, 1213189, 1234873, 1340477, 1510013
Offset: 1
79 is in the sequence because 79+83 (consecutive primes) = 162 = 70+92 (consecutive pentagonal numbers).
-
Block[{s = Total /@ Partition[PolygonalNumber[5, Range[10^3]], 2, 1], t}, t = Partition[Prime@ Range@ PrimePi[2 Last[s]], 2, 1]; Select[t, MemberQ[s, Total@ #] &][[All, 1]]] (* Michael De Vlieger, Jan 21 2018 *)
-
L=List(); forprime(p=2, 1600000, q=nextprime(p+1); t=p+q; if(issquare(12*t-8, &sq) && (sq-2)%6==0, u=(sq-2)\6; listput(L, p))); Vec(L)
-
from _future_ import division
from sympy import prevprime, nextprime
A298464_list, n, m = [], 1 ,6
while len(A298464_list) < 10000:
k = prevprime(m//2)
if k + nextprime(k) == m:
A298464_list.append(k)
n += 1
m += 6*n-1 # Chai Wah Wu, Jan 20 2018
A298465
The first of two consecutive heptagonal numbers the sum of which is equal to the sum of two consecutive primes.
Original entry on oeis.org
1, 18, 403, 16281, 24354, 167314, 172528, 183196, 191407, 223054, 413512, 446688, 476767, 507826, 512343, 791578, 926289, 994456, 1032658, 1248562, 1284147, 2221708, 2278630, 2453716, 2604571, 2738952, 2770443, 3207523, 3333330, 4203577, 4400332, 4628761
Offset: 1
18 is in the sequence because 18+34 (consecutive heptagonal numbers) = 52 = 23+29 (consecutive primes).
-
chcpQ[{a_,b_}]:=Module[{c=(a+b)/2},NextPrime[c]+ NextPrime[c,-1] ==a+b]; Select[ Partition[PolygonalNumber[7,Range[2000]],2,1],chcpQ][[;;,1]] (* Harvey P. Dale, Mar 14 2023 *)
-
L=List(); forprime(p=2, 6000000, q=nextprime(p+1); t=p+q; if(issquare(20*t-16, &sq) && (sq-2)%10==0, u=(sq-2)\10; listput(L, (5*u^2-3*u)/2))); Vec(L)
-
from sympy import prevprime, nextprime
A298465_list, n, m = [], 1 ,8
while len(A298465_list) < 10000:
k = prevprime(m//2)
if k + nextprime(k) == m:
A298465_list.append(n*(5*n-3)//2)
n += 1
m += 10*n-3 # Chai Wah Wu, Jan 19 2018
A298466
The first of two consecutive primes the sum of which is equal to the sum of two consecutive heptagonal numbers.
Original entry on oeis.org
3, 23, 433, 16481, 24593, 167953, 173183, 183871, 192097, 223781, 414521, 447743, 477857, 508951, 513473, 792983, 927803, 996019, 1034251, 1250309, 1285937, 2224063, 2281003, 2456191, 2607109, 2741561, 2773073, 3210353, 3336209, 4206817, 4403647, 4632161
Offset: 1
23 is in the sequence because 23+29 (consecutive primes) = 52 = 18+34 (consecutive heptagonal numbers).
-
Module[{hep=Total/@Partition[PolygonalNumber[7,Range[1500]],2,1]},Select[ Partition[Prime[Range[PrimePi[Max[hep]/2]]],2,1],MemberQ[hep,Total[#]]&]][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 04 2019 *)
-
L=List(); forprime(p=2, 6000000, q=nextprime(p+1); t=p+q; if(issquare(20*t-16, &sq) && (sq-2)%10==0, u=(sq-2)\10; listput(L, p))); Vec(L)
-
from sympy import prevprime, nextprime
A298466_list, n, m = [], 1 ,8
while len(A298466_list) < 10000:
k = prevprime(m//2)
if k + nextprime(k) == m:
A298466_list.append(k)
n += 1
m += 10*n-3 # Chai Wah Wu, Jan 19 2018
Showing 1-4 of 4 results.