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 A298272 #12 Jan 17 2018 11:45:45 %S A298272 6,6216,7626,9180,16836,19900,22366,29646,76636,89676,93096,114960, %T A298272 116886,118828,322806,365940,397386,422740,437580,471906,499500, %U A298272 574056,595686,626640,690900,743590,984906,1041846,1148370,1209790,1260078,1357128,1450956 %N A298272 The first of three consecutive hexagonal numbers the sum of which is equal to the sum of three consecutive primes. %H A298272 Robert Israel, <a href="/A298272/b298272.txt">Table of n, a(n) for n = 1..10000</a> (first 100 terms from Colin Barker) %e A298272 6 is in the sequence because 6+15+28 (consecutive hexagonal numbers) = 49 = 13+17+19 (consecutive primes). %p A298272 N:= 100: # to get a(1)..a(100) %p A298272 count:= 0: %p A298272 mmax:= floor((sqrt(24*N-87)-9)/12): %p A298272 for i from 1 while count < N do %p A298272 mi:= 2*i; %p A298272 m:= 6*mi^2+9*mi+7; %p A298272 r:= ceil((m-8)/3); %p A298272 p1:= prevprime(r+1); %p A298272 p2:= nextprime(p1); %p A298272 p3:= nextprime(p2); %p A298272 while p1+p2+p3 > m do %p A298272 p3:= p2; p2:= p1; p1:= prevprime(p1); %p A298272 od: %p A298272 if p1+p2+p3 = m then %p A298272 count:= count+1; %p A298272 A[count]:= mi*(2*mi-1); %p A298272 fi %p A298272 od: %p A298272 seq(A[i], i=1..count); # _Robert Israel_, Jan 16 2018 %o A298272 (PARI) 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) %Y A298272 Cf. A000040, A000384, A054643, A298073, A298168, A298169, A298222, A298223, A298250, A298251, A298273. %K A298272 nonn %O A298272 1,1 %A A298272 _Colin Barker_, Jan 16 2018