|
|
A298463
|
|
The first of two consecutive pentagonal numbers the sum of which is equal to the sum of two consecutive primes.
|
|
5
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
70 is in the sequence because 70+92 (consecutive pentagonal numbers) = 162 = 79+83 (consecutive primes).
|
|
MATHEMATICA
|
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 *)
|
|
PROG
|
(PARI) 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)
(Python)
from __future__ import division
from sympy import prevprime, nextprime
k = prevprime(m//2)
if k + nextprime(k) == m:
n += 1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|