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.

A298463 The first of two consecutive pentagonal numbers the sum of which is equal to the sum of two consecutive primes.

This page as a plain text file.
%I A298463 #19 Jan 20 2024 16:14:20
%S A298463 70,3577,10795,36895,55777,70525,78547,125137,178365,208507,258130,
%T A298463 329707,349692,394497,438751,468442,478555,499105,619852,663005,
%U A298463 753667,827702,877455,900550,1025480,1085876,1169092,1201090,1211852,1233520,1339065,1508512
%N A298463 The first of two consecutive pentagonal numbers the sum of which is equal to the sum of two consecutive primes.
%H A298463 Chai Wah Wu, <a href="/A298463/b298463.txt">Table of n, a(n) for n = 1..10000</a>
%e A298463 70 is in the sequence because 70+92 (consecutive pentagonal numbers) = 162 = 79+83 (consecutive primes).
%t A298463 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 *)
%o A298463 (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)
%o A298463 (Python)
%o A298463 from __future__ import division
%o A298463 from sympy import prevprime, nextprime
%o A298463 A298463_list, n, m = [], 1 ,6
%o A298463 while len(A298463_list) < 10000:
%o A298463     k = prevprime(m//2)
%o A298463     if k + nextprime(k) == m:
%o A298463         A298463_list.append(n*(3*n-1)//2)
%o A298463     n += 1
%o A298463     m += 6*n-1 # _Chai Wah Wu_, Jan 20 2018
%Y A298463 Cf. A000040, A000326, A001043, A061275, A298462, A298464, A298465, A298466.
%K A298463 nonn
%O A298463 1,1
%A A298463 _Colin Barker_, Jan 19 2018