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-10 of 13 results. Next

A173167 Values n such that n and n+1 are both in A037073.

Original entry on oeis.org

1, 7, 14, 99, 162, 252, 330, 376, 750, 966, 1022, 1079, 1637, 2156, 2288, 2352, 3389, 4530, 4633, 4975, 5514, 6125, 6126, 6622, 6938, 7215, 7489, 8182, 8252, 8293, 10528, 10837, 11332
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 11 2010

Keywords

Examples

			a(1)=1 because 18*(A037073(1)+1/2-1/2)^2-1=17=prime, 18*(A037073(1)+1/2-1/2)^2+1=19=prime, 18*(A037073(1)+1/2+1/2)^2-1=71=prime and 18*(A037073(1)+1/1+1/2)^2+1=73=prime.
		

Crossrefs

Cf. A037073.

Extensions

Definition corrected and sequence extended beyond a(8) by R. J. Mathar, Mar 09 2010

A154670 Averages of twin prime pairs k such that k*2 and k/2 are squares.

Original entry on oeis.org

18, 72, 882, 1152, 2592, 3528, 4050, 15138, 20808, 34848, 46818, 69192, 83232, 103968, 112338, 149058, 176418, 180000, 206082, 281250, 362952, 388962, 438048, 472392, 478242, 538722, 649800, 734472, 808992, 960498, 1080450, 1143072
Offset: 1

Views

Author

Keywords

Examples

			18/2 = 9 = 3^2, 18*2 = 36 = 6^2.
		

Crossrefs

Cf. A037073.

Programs

  • Mathematica
    lst={};Do[If[PrimeQ[n-1]&&PrimeQ[n+1],s=Sqrt[n*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=Sqrt[n/2];If[Floor[s]==s,AppendTo[lst,n]]],{n,6,10!,6}];lst
  • PARI
    for(i=1,999, isprime(18*i^2+1) && isprime(18*i^2-1) && print1(18*i^2",")) \\ M. F. Hasler, Jan 15 2009

Formula

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

A152786 Integers k such that (k^2)/2 is the arithmetic mean of a pair of twin primes.

Original entry on oeis.org

6, 12, 42, 48, 72, 84, 90, 174, 204, 264, 306, 372, 408, 456, 474, 546, 594, 600, 642, 750, 852, 882, 936, 972, 978, 1038, 1140, 1212, 1272, 1386, 1470, 1512, 1518, 1584, 1770, 1836, 1902, 1980, 1986, 2130, 2196, 2256, 2262, 2316, 2382, 2652, 2688, 2718
Offset: 1

Views

Author

Keywords

Comments

Square roots of A054735 where these are integer.

Examples

			6 is a term since (6^2)/2 = 18 = mean(17, 19).
12 is a term since (12^2)/2 = 72 = mean(71,73).
42 is a term since (42^2)/2 = 882 = mean(881,883).
		

Crossrefs

Cf. A014574, A037073, A054735, A152788 (cubic version).
Subsequence of A074924. - Zak Seidov, Feb 01 2013

Programs

  • Magma
    [k:k in [2..2800 by 2]| IsPrime(k*k div 2 -1) and IsPrime(k*k div 2 +1)]; // Marius A. Burtea, Jan 01 2020
  • Maple
    isa := n -> isprime(n) and isprime(n+2) and issqr(2*n+2):
    select(isa, [$4..1000000]): map(n -> sqrt(2*n+2), %); # Peter Luschny, Jan 05 2020
  • 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,AppendTo[lst,i]]],{n,3*9!}];lst
    (* Second program: *)
    Select[Map[Sqrt[2 #] &, Mean /@ Select[Partition[Prime@ Range[10^6], 2, 1], Subtract @@ # == -2 &]], IntegerQ] (* Michael De Vlieger, Feb 18 2018 *)
  • PARI
    forstep(n=6,1e3,6,if(isprime(n^2/2-1)&&isprime(n^2/2+1),print1(n", "))) \\ Charles R Greathouse IV, Feb 01 2013
    

Formula

{n: n^2 = A054735(i), any i}. - R. J. Mathar, Dec 12 2008
a(n) = 6*A037073(n). [Zak Seidov, seqfan list, Aug 20 2010] [From R. J. Mathar, Sep 07 2010]

Extensions

Edited by R. J. Mathar, Dec 12 2008

A154331 Numbers m such that 12 m^2 is the average of a twin prime pair.

Original entry on oeis.org

1, 3, 4, 6, 11, 13, 17, 20, 29, 39, 94, 108, 136, 154, 158, 172, 214, 227, 245, 256, 262, 283, 288, 290, 308, 315, 328, 357, 358, 371, 403, 413, 414, 420, 475, 491, 510, 522, 536, 543, 546, 556, 559, 561, 581, 585, 622, 630, 633, 647, 666, 669, 676, 699, 735
Offset: 1

Views

Author

M. F. Hasler, Jan 15 2009

Keywords

Crossrefs

Programs

  • Magma
    [m:m in [1..740]| IsPrime(12*m^2-1) and IsPrime(12*m^2+1)]; // Marius A. Burtea, Jan 23 2020
  • Mathematica
    Select[Range[800],AllTrue[12#^2+{1,-1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 27 2014 *)
  • PARI
    for(i=1,999, isprime(12*i^2+1) & isprime(12*i^2-1) & print1(i","))
    

A154772 Numbers m such that 180 m^2 is the average of a twin prime pair.

Original entry on oeis.org

1, 3, 7, 14, 22, 29, 41, 46, 62, 64, 67, 88, 167, 179, 207, 231, 239, 249, 263, 266, 286, 290, 309, 315, 322, 323, 326, 344, 350, 353, 354, 372, 392, 421, 444, 454, 458, 496, 505, 553, 560, 561, 571, 585, 613, 636, 647, 661, 669, 682, 745, 788, 790, 791, 815
Offset: 1

Views

Author

M. F. Hasler, Jan 15 2009

Keywords

Comments

Inspired by Z. Seidov's post to the SeqFan list, cf. link. This yields A154672 as 180 a(n)^2. Indeed, if N is such that N/5 is a square, then M=5m^2 and this can't by the average of a twin prime pair unless m=6a.

Crossrefs

Programs

  • Mathematica
    Select[Range[10^3], And @@ PrimeQ[180#^2 + {-1, 1}] &] (* Amiram Eldar, Dec 25 2019 *)
  • PARI
    for(i=1,999, isprime(180*i^2+1) & isprime(180*i^2-1) & print1(i","))

Formula

a(n) = sqrt(A154672(n)/180)

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

A226539 Numbers which are the sum of two squared primes in exactly two ways (ignoring order).

Original entry on oeis.org

338, 410, 578, 650, 890, 1010, 1130, 1490, 1730, 1802, 1898, 1970, 2330, 2378, 2738, 3050, 3170, 3530, 3650, 3842, 3890, 4010, 4658, 4850, 5018, 5090, 5162, 5402, 5450, 5570, 5618, 5690, 5858, 6170, 6410, 6530, 6698, 7010, 7178, 7202, 7250, 7850, 7970, 8090
Offset: 1

Views

Author

Henk Koppelaar, Jun 10 2013

Keywords

Examples

			338 = 7^2 + 17^2 = 13^2 + 13^2;
410 = 7^2 + 19^2 = 11^2 + 17^2.
		

References

  • Stan Wagon, Mathematica in Action, Springer, 2000 (2nd ed.), Ch. 17.5, pp. 375-378.

Crossrefs

Cf. A054735 (restricted to twin primes), A037073, A069496.
Cf. A045636 (sum of two squared primes: a superset).
Cf. A214511 (least number having n representations).
Cf. A226562 (restricted to sums decomposed in exactly three ways).

Programs

  • Maple
    Prime2PairsSum := p -> select(x ->`if`(andmap(isprime, x),true,false), numtheory:-sum2sqr(p)):
    for n from 2 to 10^6 do
      if nops(Prime2PairsSum(n)) = 2 then print(n, Prime2PairsSum(n)) fi;
    od;
  • Mathematica
    Select[Range@10000, Length[Select[ PowersRepresentations[#, 2, 2], And @@ PrimeQ[#] &]] == 2 &] (* Giovanni Resta, Jun 11 2013 *)
  • PARI
    select( is_A226539(n)={#[0|t<-sum2sqr(n),isprime(t[1])&&isprime(t[2])]==2}, [1..10^4]) \\ For more efficiency, apply selection to A045636. See A133388 for sum2sqr(). - M. F. Hasler, Dec 12 2019

Extensions

a(25)-a(44) from Giovanni Resta, Jun 11 2013

A226562 Numbers which are the sum of two squared primes in exactly three ways (ignoring order).

Original entry on oeis.org

2210, 3770, 5330, 6290, 12818, 16490, 18122, 19370, 24050, 24650, 26690, 32810, 33410, 34970, 36530, 39650, 39770, 44642, 45050, 45890, 49010, 50690, 51578, 57770, 59450, 61610, 63050, 66170, 67490, 72410, 73610, 74210, 80330, 85202, 86210, 86330, 88010
Offset: 1

Views

Author

Henk Koppelaar, Jun 11 2013

Keywords

Comments

Suggestion: difference between successive terms is always at least 3. (With the known 115885 terms <10^9, the smallest difference is 24.) - Zak Seidov, Jun 12 2013

Examples

			2210 = 19^2 + 43^2 = 23^2 + 41^2 = 29^2 + 37^2;
		

References

  • Stan Wagon, Mathematica in Action, Springer, 2000 (2nd ed.), Ch. 17.5, pp. 375-378.

Crossrefs

Cf. A054735 (restricted to twin primes), A037073, A069496.
Cf. A045636 (sum of two squared primes), A226539.
Cf. A214511 (least number having n representations).
Cf. A226539 (restricted to sums decomposed in exactly three ways).

Programs

  • Maple
    Prime2PairsSum := s -> select( x -> `if`(andmap(isprime, x), true, false), numtheory:-sum2sqr(s)):
    for n from 2 to 10 do
    if nops(Prime2PairsSum(n)) = 3 then print(n,Prime2PairsSum(n)) fi
    od;
  • Mathematica
    Select[Range@20000, Length[Select[ PowersRepresentations[#, 2, 2], And @@ PrimeQ[#] &]] == 3 &] (* Giovanni Resta, Jun 11 2013 *)

Extensions

a(22)-a(37) from Giovanni Resta, Jun 11 2013

A154773 Numbers n such that 252n^2 is the average of a twin prime pair.

Original entry on oeis.org

3, 5, 11, 14, 18, 20, 26, 27, 28, 29, 31, 38, 42, 52, 58, 64, 73, 82, 85, 90, 110, 125, 138, 156, 167, 180, 212, 234, 248, 297, 299, 303, 305, 308, 312, 314, 317, 319, 334, 336, 348, 361, 365, 371, 372, 377, 379, 414, 451, 465, 478, 499, 508, 509, 535, 554, 564
Offset: 1

Views

Author

M. F. Hasler, Jan 15 2009

Keywords

Comments

Inspired by Zak Seidov's post to the SeqFan list, cf. link: This yields A154673 as 252 a(n)^2. Indeed, if N/7 is a square, then N=7m^2 and this can't be the average of a twin prime pair unless m=6a.

Crossrefs

Programs

  • Mathematica
    Select[Range[600],And@@PrimeQ[252#^2+{1,-1}]&] (* Harvey P. Dale, Dec 13 2012 *)
  • PARI
    for(i=1,999, isprime(252*i^2+1) & isprime(252*i^2-1) & print1(i","))

Formula

a(n) = sqrt(A154673(n)/252).

A154774 Numbers n such that 9900n^2 is the average of a twin prime pair.

Original entry on oeis.org

10, 14, 15, 25, 60, 74, 76, 87, 127, 129, 130, 140, 171, 196, 207, 224, 259, 263, 302, 314, 315, 319, 333, 337, 377, 389, 451, 454, 470, 491, 508, 518, 549, 568, 574, 589, 592, 624, 629, 636, 690, 696, 729, 748, 753, 769, 770, 771, 781, 791, 802, 833, 844
Offset: 1

Views

Author

M. F. Hasler, Jan 15 2009

Keywords

Comments

Inspired by Zak Seidov's post to the SeqFan list, cf. link: This yields A154674 as 9900 a(n)^2. Indeed, if N/11 is a square, then N=11 m^2 and this can't be the average of a twin prime pair unless m=30a (considering N+1 mod 2,3,5 and N-1 mod 5).

Crossrefs

Programs

  • Mathematica
    Select[Range[1000],AllTrue[9900#^2+{1,-1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 19 2019 *)
  • PARI
    for(i=1,999, isprime(9900*i^2+1) & isprime(9900*i^2-1) & print1(i","))

Formula

a(n) = sqrt(A154674(n)/9900).
Showing 1-10 of 13 results. Next