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.

A152788 Integers k such that (k^3)/3 is the average of a pair of twin primes.

Original entry on oeis.org

6, 30, 84, 144, 186, 204, 270, 360, 516, 576, 726, 756, 810, 990, 1020, 1140, 1446, 1500, 1836, 2010, 2250, 2304, 2820, 3204, 3366, 3564, 4170, 4320, 4344, 4416, 4590, 4656, 5160, 5220, 5820, 5976, 6120, 6204, 6276, 6534, 6876, 7260, 7710, 7806, 7866, 8256
Offset: 1

Views

Author

Keywords

Comments

These are the integers of the form (3*A014574(i))^(1/3), any index i. - R. J. Mathar, Dec 14 2008

Examples

			6 is a term since (6^3)/3 = 72 and (71, 73) are twin primes.
30 is a term since (30^3)/3 = 9000 and (8999, 9001) are twin primes.
		

Crossrefs

Programs

  • Magma
    [k:k in [3..9000 by 3]| IsPrime(k^3 div 3 -1) and IsPrime(k^3 div 3 +1)]; // Marius A. Burtea, Jan 01 2020
  • Mathematica
    lst1={}; lst2={}; Do[ p1=Prime[n]; p2=Prime[n+1]; If[p2-p1==2, e=(3*(p1+1))^(1/3); i=Floor[e]; If[e==i, AppendTo[lst1,(p1+1)]; AppendTo[lst2,i]]], {n,2*10!}]; Print[lst1]; Print[lst2]
    fQ[n_] := PrimeQ[n^3/3 - 1] && PrimeQ[n^3/3 + 1]; lst = {}; Do[If[fQ@n, AppendTo[lst, n]], {n, 3, 10^4, 3}]; lst

Extensions

Edited and extended by Robert G. Wilson v, Dec 14 2008
Corrected divisor in definition. - R. J. Mathar, Dec 20 2008