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.
%I A298313 #14 Dec 03 2022 13:34:18 %S A298313 12541,75521,159617,182519,271181,373091,603901,609289,851197,983819, %T A298313 1246757,2079997,3299081,3687421,4484737,4692497,5636171,7514477, %U A298313 8273437,9299831,10408577,10430921,10746557,10769281,12739037,13012487,14213621,15440531,15713959 %N A298313 The first of three consecutive primes the sum of which is equal to the sum of three consecutive octagonal numbers. %H A298313 Chai Wah Wu, <a href="/A298313/b298313.txt">Table of n, a(n) for n = 1..10000</a> (n = 1..70 from Colin Barker) %e A298313 12541 is in the sequence because 12541+12547+12553 (consecutive primes) = 37641 = 12160+12545+12936 (consecutive octagonal numbers). %t A298313 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 *) %o A298313 (PARI) 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) %o A298313 (Python) %o A298313 from __future__ import division %o A298313 from sympy import prevprime, nextprime %o A298313 A298313_list, n, m = [], 1, 30 %o A298313 while len(A298313_list) < 10000: %o A298313 k = prevprime(m//3) %o A298313 k2 = prevprime(k) %o A298313 k3 = nextprime(k) %o A298313 if k2 + k + k3 == m: %o A298313 A298313_list.append(k2) %o A298313 elif k + k3 + nextprime(k3) == m: %o A298313 A298313_list.append(k) %o A298313 n += 1 %o A298313 m += 18*n + 3 # _Chai Wah Wu_, Jan 22 2018 %Y A298313 Cf. A000040, A000567, A054643, A298073, A298168, A298169, A298222, A298223, A298250, A298251, A298272, A298273, A298301, A298302, A298312. %K A298313 nonn %O A298313 1,1 %A A298313 _Colin Barker_, Jan 17 2018