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-9 of 9 results.

A154671 Averages of twin prime pairs k such that k*3 and k/3 are squares.

Original entry on oeis.org

12, 108, 192, 432, 1452, 2028, 3468, 4800, 10092, 18252, 106032, 139968, 221952, 284592, 299568, 355008, 549552, 618348, 720300, 786432, 823728, 961068, 995328, 1009200, 1138368, 1190700, 1291008, 1529388, 1537968, 1651692, 1948908
Offset: 1

Views

Author

Keywords

Examples

			12*3 = 36 = 6^2, 12/3 = 4 = 2^2.
		

Crossrefs

Cf. A154670.

Programs

  • Mathematica
    lst={}; Do[If[PrimeQ[n-1]&&PrimeQ[n+1],s=(n*3)^(1/2); If[Floor[s]==s,AppendTo[lst,n]]],{n,6,10!,6}]; lst...and/or... lst={}; Do[If[PrimeQ[n-1]&&PrimeQ[n+1],s=(n/3)^(1/2); If[Floor[s]==s,AppendTo[lst,n]]],{n,6,10!,6}]; lst
    Select[Mean/@Select[Partition[Prime[Range[150000]],2,1],#[[2]]-#[[1]] == 2&],AllTrue[{Sqrt[#/3],Sqrt[3#]},IntegerQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 06 2015 *)
  • PARI
    for(i=1,999, isprime(12*i^2+1) && isprime(12*i^2-1) && print1(12*i^2",")) \\ M. F. Hasler, Jan 15 2009

Formula

a(n) = 12*A154331(n)^2. - M. F. Hasler, Jan 15 2009

A154672 Numbers n = 5*k^2 such that n - 1 and n + 1 are (twin) primes (thus k=6*m).

Original entry on oeis.org

180, 1620, 8820, 35280, 87120, 151380, 302580, 380880, 691920, 737280, 808020, 1393920, 5020020, 5767380, 7712820, 9604980, 10281780, 11160180, 12450420, 12736080, 14723280, 15138000, 17186580, 17860500, 18663120, 18779220, 19129680, 21300480
Offset: 1

Views

Author

Keywords

Comments

Original definition: Averages of twin prime pairs n such that n*5 and n/5 are squares.
Obviously, n*5 is a square iff n/5 is a square, say k^2. But n=5k^2 can't be the average of a twin prime pair unless it's a multiple of 6, thus k=6m and n=5*36*m^2. - M. F. Hasler, Apr 11 2009

Crossrefs

Programs

  • Mathematica
    lst={};Do[If[PrimeQ[n-1]&&PrimeQ[n+1],s=(n*5)^(1/2);If[Floor[s]==s,AppendTo[lst,n]]],{n,6,10!,6}];lst (*...and/or...*) lst={};Do[If[PrimeQ[n-1]&&PrimeQ[n+1],s=(n/5)^(1/2);If[Floor[s]==s,AppendTo[lst,n]]],{n,6,10!,6}];lst
  • PARI
    forstep(k=0,1e4,6, isprime(k^2*5+1) & isprime(k^2*5-1) & print1(k^2*5,",")) \\ M. F. Hasler, Apr 11 2009

Formula

A154672 = 5*A000290 intersect A014574 = 180*A000290 intersect A014574. - M. F. Hasler, Apr 11 2009

Extensions

Edited and extended by M. F. Hasler, Apr 11 2009

A154673 Averages of twin prime pairs k such that k*7 and k/7 are squares.

Original entry on oeis.org

2268, 6300, 30492, 49392, 81648, 100800, 170352, 183708, 197568, 211932, 242172, 363888, 444528, 681408, 847728, 1032192, 1342908, 1694448, 1820700, 2041200, 3049200
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};Do[If[PrimeQ[n-1]&&PrimeQ[n+1],s=(n*7)^(1/2);If[Floor[s]==s,AppendTo[lst,n]]],{n,6,10!,6}];lst...and/or... lst={};Do[If[PrimeQ[n-1]&&PrimeQ[n+1],s=(n/7)^(1/2);If[Floor[s]==s,AppendTo[lst,n]]],{n,6,10!,6}];lst
    Select[Mean/@Select[Partition[Prime[Range[250000]],2,1],#[[2]]-#[[1]] == 2&],AllTrue[{Sqrt[7#],Sqrt[#/7]},IntegerQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 22 2018 *)
    Select[7*Range[10^3]^2, And @@ PrimeQ[# + {-1, 1}] &] (* Amiram Eldar, Dec 25 2019 *)

A154676 Numbers n = 103*k^2 such that (n-1,n+1) is a twin prime pair (thus k = 6*m).

Original entry on oeis.org

2317500, 12047292, 26163648, 43250112, 47347452, 61704828, 168228252, 333720000, 351755712, 426127068, 513127872, 840143808, 979638768, 998790588, 1089276912, 1330434108, 1357220700, 1388809152, 1694467008, 1927570428, 1986835392, 2035992348, 2136108348, 2858437872, 3070594800, 3241626300, 3903322608
Offset: 1

Views

Author

Keywords

Comments

Original definition: Averages of twin prime pairs n such that n*103 and n/103 are squares.
All terms are of the form 3708*k^2. - Zak Seidov, Jan 15 2009
Obviously n*103 is a square iff n/103 is a square, say k^2. But n=103k^2 can't be the average of a twin prime pair unless it's a multiple of 6, thus k=6m and n=103*36*m^2. - M. F. Hasler, Apr 11 2009

Crossrefs

Programs

  • Maple
    select(t -> isprime(t+1) and isprime(t-1), [seq(3708*i^2, i=1..2000)]); # Robert Israel, Mar 13 2019
  • Mathematica
    lst={}; Do[If[PrimeQ[n-1]&&PrimeQ[n+1],s=(n*103)^(1/2); If[Floor[s]==s,AppendTo[lst,n]]],{n,9!,2*11!,6}]; lst (*...and/or...*) lst={}; Do[If[PrimeQ[n-1]&&PrimeQ[n+1],s=(n/103)^(1/2); If[Floor[s]==s,AppendTo[lst,n]]],{n,9!,2*11!,6}]; lst
    Select[3708*Range[1200]^2,AllTrue[#+{1,-1},PrimeQ]&] (* Harvey P. Dale, May 15 2025 *)
  • PARI
    forstep(k=0,1e4,6, isprime(k^2*103+1) & isprime(k^2*103-1) & print1(k^2*103,",")) \\ M. F. Hasler, Apr 11 2009

Extensions

Edited and extended by M. F. Hasler, Apr 11 2009

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

A154674 Averages of twin prime pairs k such that k*11 and k/11 are squares.

Original entry on oeis.org

990000, 1940400, 2227500, 6187500, 35640000, 54212400, 57182400, 74933100, 159677100, 164745900, 167310000, 194040000, 289485900, 380318400, 424205100, 496742400, 664101900, 684773100, 902919600, 976100400, 982327500, 1007433900
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};Do[If[PrimeQ[n-1]&&PrimeQ[n+1],s=(n*11)^(1/2);If[Floor[s]==s,AppendTo[lst,n]]],{n,6,11!,6}];lst...and/or... lst={};Do[If[PrimeQ[n-1]&&PrimeQ[n+1],s=(n/11)^(1/2);If[Floor[s]==s,AppendTo[lst,n]]],{n,6,11!,6}];lst
    Select[11*Range[10^4]^2, And @@ PrimeQ[# + {-1, 1}] &] (* Amiram Eldar, Dec 25 2019 *)
  • PARI
    for(i=1,999, isprime(9900*i^2+1) && isprime(9900*i^2-1) && print1(9900*i^2",")) \\ M. F. Hasler, Jan 15 2009

Formula

a(n) = 9900*A154774(n)^2. - M. F. Hasler, Jan 15 2009

Extensions

More terms from M. F. Hasler, Jan 15 2009

A154675 Averages of twin prime pairs k such that k*13 and k/13 are squares.

Original entry on oeis.org

1872, 7488, 11700, 825552, 990288, 1123668, 1629108, 3146832, 3302208, 4680000, 6627348, 7667712, 8783892, 15502032, 16017300, 16365492, 17252352, 25407252, 32617728, 42401268, 42966612, 54100800, 66163968, 71182800, 73019700
Offset: 1

Views

Author

Keywords

Comments

Terms of this sequence must be of the form 13(6m)^2, the values for m are listed in A154775. - M. F. Hasler, Jan 15 2009

Crossrefs

Programs

  • Mathematica
    lst={};Do[If[PrimeQ[n-1]&&PrimeQ[n+1],s=(n*13)^(1/2);If[Floor[s]==s,AppendTo[lst,n]]],{n,6,11!,6}];lst
    (* ... and/or ... *)
    lst={};Do[If[PrimeQ[n-1]&&PrimeQ[n+1],s=(n/13)^(1/2);If[Floor[s]==s,AppendTo[lst,n]]],{n,6,11!,6}];lst
    Select[13*Range[10^3]^2, And @@ PrimeQ[# + {-1, 1}] &] (* Amiram Eldar, Dec 25 2019 *)
  • PARI
    for(i=1,499, isprime(468*i^2+1) && isprime(468*i^2-1) && print1(468*i^2",")) \\ M. F. Hasler, Jan 15 2009

Formula

a(n) = 468 A154775(n)^2 - M. F. Hasler, Jan 15 2009

Extensions

More terms from M. F. Hasler, Jan 15 2009

A173165 Numbers k such that 2*k^2 -+ 1 is a twin prime pair.

Original entry on oeis.org

3, 6, 21, 24, 36, 42, 45, 87, 102, 132, 153, 186, 204, 228, 237, 273, 297, 300, 321, 375, 426, 441, 468, 486, 489, 519, 570, 606, 636, 693, 735, 756, 759, 792, 885, 918, 951, 990, 993, 1065, 1098, 1128, 1131, 1158, 1191, 1326, 1344, 1359, 1386, 1407, 1443
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 11 2010

Keywords

Comments

A001105(k+1) -+ 1 is a twin prime pair.

Crossrefs

Programs

  • Mathematica
    Select[Range[1500], And @@ PrimeQ[2*#^2 + {-1, 1}] &] (* Amiram Eldar, Dec 20 2019 *)

Formula

a(n) = 3*A037073(n) = A154670(n)/6.

Extensions

Entries checked by R. J. Mathar, Mar 09 2010

A256917 Primes which are not the sums of two consecutive nonsquares.

Original entry on oeis.org

2, 3, 7, 17, 19, 31, 71, 73, 97, 127, 163, 199, 241, 337, 449, 577, 647, 881, 883, 967, 1151, 1153, 1249, 1459, 1567, 1801, 2179, 2311, 2591, 2593, 2887, 3041, 3361, 3527, 3529, 3697, 4049, 4051, 4231, 4801, 4999, 5407, 6271, 6961, 7687, 7937, 8191, 8713, 9521, 10369, 10657
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 23 2015

Keywords

Comments

The union of 2 and A066436 and A090698.
The sums of two consecutive nonsquares are 5, 8, 11, 13, 15, 18, 21, 23, 25, 27, 29, 32, 35, 37, ...

Examples

			2, 3, 7 are in this sequence because first three sums of two consecutive nonsquares are 5, 8, 11 and 2, 3, 7 are primes.
		

Crossrefs

Programs

  • Mathematica
    Union[{2},Select[Table[2n^2-1,{n,0,1000}],PrimeQ],Select[Table[2n^2+1,{n,0,1000}],PrimeQ]] (* Ivan N. Ianakiev, Apr 24 2015 *)
    Module[{nn=11000,ns},ns=Total/@Partition[Select[Range[nn],!IntegerQ[Sqrt[#]]&],2,1]; Complement[ Prime[Range[PrimePi[Last[ns]]]],ns]] (* Harvey P. Dale, Mar 06 2024 *)
  • PARI
    a256917(maxp) = {
      ps=[2];
      k=1; while((t=2*k^2-1)<=maxp, k++; if(isprime(t), ps=setunion(ps, [t])));
      k=1; while((t=2*k^2+1)<=maxp, k++; if(isprime(t), ps=setunion(ps, [t])));
      ps
    }
    a256917(11000) \\ Colin Barker, Apr 23 2015
    
  • PARI
    list(lim)=my(v=List([2]),t); for(k=2,sqrtint((lim+1)\2), if(isprime(t=2*k^2-1), listput(v,t))); for(k=1,sqrtint((lim-1)\2), if(isprime(t=2*k^2+1), listput(v,t))); Set(v) \\ Charles R Greathouse IV, Apr 23 2015
Showing 1-9 of 9 results.