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.

A002731 Numbers k such that (k^2 + 1)/2 is prime.

Original entry on oeis.org

3, 5, 9, 11, 15, 19, 25, 29, 35, 39, 45, 49, 51, 59, 61, 65, 69, 71, 79, 85, 95, 101, 121, 131, 139, 141, 145, 159, 165, 169, 171, 175, 181, 195, 199, 201, 205, 209, 219, 221, 231, 245, 261, 271, 275, 279, 289, 299, 309, 315, 321, 325, 329, 335, 345, 349, 371, 375, 379, 391, 399, 405
Offset: 1

Views

Author

Keywords

Comments

From Wolfdieter Lang, Feb 24 2012: (Start)
a(n) = sqrt(8*A129307(n)+1) = sqrt(2*A027862(n)-1), n >= 1.
a(n) is the nontrivial solution of the congruence a(n)^2 == 1 (Modd A027862(n)). The trivial one is +1. For Modd n see a comment on A203571. E.g., a(3)^2 = 81 == 1 (Modd 41), see a comment on A027862.
(End)

References

  • L. Euler, De numeris primis valde magnis (E283), reprinted in: Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 3, p. 24.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A027861. A027862 gives primes, A091277 gives prime indices.

Programs

  • Haskell
    a002731 n = a002731_list !! (n-1)
    a002731_list = filter ((== 1) . a010051 . a000982) [1, 3 ..]
    -- Reinhard Zumkeller, Jul 13 2014
  • Magma
    [n: n in [3..410] | IsPrime((n^2+1) div 2) ]; // Vincenzo Librandi, Sep 25 2012
    
  • Mathematica
    Select[Range[400], PrimeQ[(#^2 + 1)/2] &] (* Alonso del Arte, Feb 24 2012 *)
  • PARI
    forstep(n=1,10^3,2, if(isprime((n^2+1)/2),print1(n,", ")));
    /* Joerg Arndt, Sep 02 2012 */
    

Formula

a(n) = 2*A027861(n) + 1.

A048270 Sequence of 2 Pythagorean triangles, each with a leg and hypotenuse prime. The leg of the second triangle is the hypotenuse of the first.

Original entry on oeis.org

3, 11, 19, 59, 271, 349, 521, 929, 1031, 1051, 1171, 2381, 2671, 2711, 2719, 3001, 3499, 3691, 4349, 4691, 4801, 4999, 5591, 5669, 6101, 6359, 6361, 7159, 7211, 7489, 8231, 8431, 8761, 9241, 10099, 10139, 11719, 11821, 12239, 12281, 12781
Offset: 1

Views

Author

Harvey Dubner (harvey(AT)dubner.com)

Keywords

Comments

It is conjectured that there are infinitely many such pairs of triangles.
Subsequence of A048161. - Lekraj Beedassy, Sep 16 2005

Examples

			p(1)=3 because 3 is prime, 5 = (3*3 + 1)/2 and 13 = (5*5 + 1)/2, 5, 13 both prime.
		

Crossrefs

Formula

For each p(n), there is a q=(p*p+1)/2 and r=(q*q+1)/2 such that p, q, r are all prime.

Extensions

More terms from Ray Chandler, Jun 12 2019

A187431 Numbers n that generate 5 primes under the first 5 iterations of the map n->A002731(n).

Original entry on oeis.org

30131199, 50817201, 56496039, 74316929, 171407609, 276672151, 293315671, 337876949, 356498179, 359830101, 372590921, 432448789, 501182201, 541961069, 577016839, 616411051, 749536461, 776113741, 903321909, 919203811, 1005047121, 1285328811, 1323139751, 1340738371
Offset: 1

Views

Author

Zak Seidov, Apr 05 2011

Keywords

Comments

Numbers n such that m=(n^2+1)/2, p=(m^2+1)/2, q=(p^2+1)/2, r=(q^2+1)/2 and s=(r^2+1)/2 are all prime.
Subsequence of A188547 which itself is subsequence of A188546 which is subsequence of A116945.
a(1)=30131199=A188547(70).
Two numbers n that generate 6 primes... are a(23)=1323139751 and a(78)=10185588801.

Crossrefs

A188546 Numbers n such that m=(n^2+1)/2, p=(m^2+1)/2 and q=(p^2+1)/2 are all prime.

Original entry on oeis.org

69, 271, 349, 3001, 3399, 4949, 6051, 9101, 9751, 10099, 10149, 11719, 12281, 15911, 22569, 24269, 25201, 25889, 28841, 31979, 37271, 39901, 42109, 44929, 46399, 48321, 50811, 60009, 63659, 63999, 71051, 71851, 75089, 76711, 87029, 96791, 103701, 110551, 111411, 112461, 113949, 125721, 126089, 127959, 129261, 131859, 132939, 137481, 144651
Offset: 1

Views

Author

Zak Seidov, Apr 03 2011

Keywords

Comments

a(1) = 69 = A116945(5).
Numbers n that generate three primes under the first three iterations of the map n-> A002731(n).
Subsequence of A116945.

Crossrefs

Programs

  • Magma
    r:=func< k | (k^2+1) div 2 >; [ n: n in [1..145000 by 2] | IsPrime(r(n)) and IsPrime(r(r(n))) and IsPrime(r(r(r(n)))) ];  // Bruno Berselli, Apr 05 2011
    
  • Mathematica
    s={}; Do[If[PrimeQ[m=(n^2+1)/2] && PrimeQ[p=(m^2+1)/2] && PrimeQ[q=(p^2+1)/2], Print[n]; AppendTo[s,n]], {n,1,300000,2}]; s
    mpqQ[n_]:=Module[{m=(n^2+1)/2,p},p=(m^2+1)/2;AllTrue[{m,p,(p^2+1)/2},PrimeQ]]; Select[Range[144700],mpqQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 18 2021 *)
  • PARI
    v=vector(10^4);i=0;forstep(n=1,9e9,2,if(isprime(m=(n^2+1)/2)&isprime(p=(m^2+1)/2)&isprime(q=(p^2+1)/2),v[i++]=n;if(i==#v,return(v)))) \\ Charles R Greathouse IV, Apr 05 2011

A188547 Numbers n such that m=(n^2+1)/2, p=(m^2+1)/2, q=(p^2+1)/2, and r=(q^2+1)/2 are all prime.

Original entry on oeis.org

4949, 6051, 169219, 183241, 560769, 1113621, 1306689, 1370269, 1421869, 1485561, 1640711, 1730709, 1876351, 1967769, 2147661, 2217351, 2293939, 2428461, 2440871, 3346661, 3625139, 3625889, 3763969, 3991209, 4020711, 4728141, 5219691, 5547221, 5554939, 5965699, 7345719, 8495879
Offset: 1

Views

Author

Zak Seidov, Apr 03 2011

Keywords

Comments

a(1) = 4949 = A188546(6) = A116945(53).
Subsequence of A188546.
Numbers n which generate 4 primes under the first four iterations of the map n-> A002731(n).
Among first 10000 terms, there are 1072 primes, the first a(3) = 169219 and the last a(10000) = 16541600731. - Zak Seidov, Jan 16 2019

Crossrefs

Programs

  • Magma
    r:=func< k | (k^2+1) div 2 >; [ n: n in [1..1000000 by 2] | IsPrime(r(n)) and IsPrime(r(r(n))) and IsPrime(r(r(r(n))))and IsPrime(r(r(r(r(n)))))]; // Vincenzo Librandi, Jan 16 2019
  • Mathematica
    s={}; Do[If[PrimeQ[m=(n^2+1)/2] && PrimeQ[p=(m^2+1)/2] && PrimeQ[q=(p^2+1)/2] && PrimeQ[r=(q^2+1)/2], AppendTo[s,n]], {n,1,10000000,2}]; s
  • PARI
    v=vector(10^4); i=0; forstep(n=1, 9e99, 2, if(isprime(m=(n^2+1)/2) && isprime(p=(m^2+1)/2) && isprime(q=(p^2+1)/2) && isprime(r=(q^2+1)/2), v[i++]=n; if(i==#v, return))) \\ Charles R Greathouse IV, Apr 12 2011
    
Showing 1-5 of 5 results.