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.

Showing 1-5 of 5 results.

A037073 Numbers k such that (6*k)^2 is the sum of a twin prime pair.

Original entry on oeis.org

1, 2, 7, 8, 12, 14, 15, 29, 34, 44, 51, 62, 68, 76, 79, 91, 99, 100, 107, 125, 142, 147, 156, 162, 163, 173, 190, 202, 212, 231, 245, 252, 253, 264, 295, 306, 317, 330, 331, 355, 366, 376, 377, 386, 397, 442, 448, 453, 462, 469, 481, 491, 498, 502, 516, 547
Offset: 1

Views

Author

Keywords

Examples

			E.g. n=44 -> (6*44)^2 = 69696 = 34847 + 34849 (twin prime pair).
		

Crossrefs

Programs

  • Maple
    isa := n -> isprime(n) and isprime(n+2) and issqr(2*n+2):
    select(isa, [$4..1000000]): map(n -> sqrt(2*n+2)/6, %); # Peter Luschny, Jan 05 2020
  • Mathematica
    Select[Sqrt[Plus@@@Select[Partition[Prime[Range[4*10^5]],2,1],Differences[#]=={2} &]/36],IntegerQ] (* Jayanta Basu, May 26 2013 *)
  • PARI
    is(n)=isprime(18*n^2-1)&&isprime(18*n^2+1) \\ M. F. Hasler, Oct 30 2023

Formula

a(n) = A173165(n)/3. - M. F. Hasler, Oct 30 2023

Extensions

More terms from Jud McCranie, Dec 30 2000

A037072 Squares which are the sum of twin prime pairs.

Original entry on oeis.org

36, 144, 1764, 2304, 5184, 7056, 8100, 30276, 41616, 69696, 93636, 138384, 166464, 207936, 224676, 298116, 352836, 360000, 412164, 562500, 725904, 777924, 876096, 944784, 956484, 1077444, 1299600, 1468944, 1617984, 1920996, 2160900, 2286144, 2304324, 2509056
Offset: 1

Views

Author

Keywords

Comments

There are exactly 5^2 squares less than or equal to 1000^2 which are the sum of twin prime pairs.

Examples

			36 (square) = 6^2 = 17 + 19 (twin prime pair).
		

Crossrefs

Programs

  • Magma
    [k^2:k in [2..1700 by 2]| IsPrime(k^2 div 2 -1) and IsPrime(k^2 div 2 +1)]; // Marius A. Burtea, Jan 01 2020
  • Mathematica
    lst={};Do[p=n^2;If[PrimeQ[p/2-1]&&PrimeQ[p/2+1], AppendTo[lst, p]], {n, 0, 7!, 2}];lst (* Vladimir Joseph Stephan Orlovsky, Sep 25 2008 *)

Formula

a(n) = 2 * A154670(n) = A152786(n)^2. - Amiram Eldar, Jan 01 2020

Extensions

More terms from Amiram Eldar, Jan 01 2020

A152787 Numbers k such that both k and k^2/2 are averages of twin prime pairs.

Original entry on oeis.org

6, 12, 42, 72, 600, 642, 882, 2130, 2382, 2688, 3558, 3582, 4548, 6132, 7548, 8010, 9042, 13398, 13932, 15972, 17598, 19140, 21492, 26250, 26262, 34512, 38670, 39228, 39342, 48312, 49740, 52542, 53088, 53592, 55050, 55662, 56100, 56712, 65028, 65448, 65520
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [2*k:k in [1..40000]| IsPrime(2*k-1) and IsPrime(2*k+1) and IsPrime(2*k^2 -1) and IsPrime(2*k^2 +1) ]; // Marius A. Burtea, Dec 31 2019
  • Mathematica
    lst={};Do[p1=Prime[n];p2=Prime[n+1];If[p2-p1==2,e=(2*(p1+1))^(1/2);i=Floor[e]; If[e==i,If[PrimeQ[i-1]&&PrimeQ[i+1],AppendTo[lst,i]]]],{n,10!}];lst
    Select[Mean/@Select[Partition[Prime[Range[10000]],2,1],#[[2]]-#[[1]] == 2&],And@@PrimeQ[#^2/2+{1,-1}]&](* Harvey P. Dale, May 12 2014 *)

Formula

A152786 INTERSECT A014574. - R. J. Mathar, Jan 08 2009

Extensions

Rephrased definition by R. J. Mathar, Jan 08 2009
More terms from Harvey P. Dale, May 12 2014

A232878 Twin prime pairs which sum to perfect squares.

Original entry on oeis.org

17, 19, 71, 73, 881, 883, 1151, 1153, 2591, 2593, 3527, 3529, 4049, 4051, 15137, 15139, 20807, 20809, 34847, 34849, 46817, 46819, 69191, 69193, 83231, 83233, 103967, 103969, 112337, 112339, 149057, 149059, 176417, 176419, 179999, 180001, 206081, 206083
Offset: 1

Views

Author

Gary Croft, Dec 01 2013

Keywords

Comments

All square roots of twin prime sums in this sequence (see A152786) are multiples of 6.
Digital roots of all pairs in this sequence are {8,1}.
Twin primes of the form 18n^2 +- 1. - Charles R Greathouse IV, Aug 26 2014

Examples

			17+19 = 36, square root of 36 = 6; 71+73 = 144, square root of 144 = 12.
		

Crossrefs

Programs

  • Mathematica
    t = {}; Do[ps = {2 n^2 - 1, 2 n^2 + 1}; If[PrimeQ[ps[[1]]] && PrimeQ[ps[[2]]], AppendTo[t, ps]], {n, 1000}]; Flatten[t] (* T. D. Noe, Dec 03 2013 *)
  • PARI
    for(n=1,1e3, if(isprime(t=18*n^2-1) && isprime(t+2), print1(t", "t+2", "))) \\ Charles R Greathouse IV, Aug 26 2014

Formula

a(2*n) = a(2*n-1) + 2, a(2*n+1) = A069496(n).

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
Showing 1-5 of 5 results.