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.

A116945 Numbers in both A002731(n) and A002731(A002731(n)).

Original entry on oeis.org

3, 11, 19, 59, 69, 221, 271, 349, 371, 391, 441, 451, 521, 529, 649, 779, 869, 921, 929, 951, 1001, 1031, 1051, 1171, 1359, 1391, 1421, 1689, 1701, 2199, 2321, 2349, 2381, 2671, 2711, 2719, 2821, 2901, 3001, 3241, 3341, 3399, 3441, 3499, 3691, 4299
Offset: 1

Views

Author

Jonathan Vos Post, Mar 25 2006

Keywords

Comments

Subset of A002731. A002731(n) = 2*A027861(n-1)+1. A027862 gives primes, A091277 gives prime index.

Examples

			a(1) = 3 because (3^2 + 1)/2 = 5 is prime and (5^2 + 1)/2 = 13 is prime.
a(2) = 11 because (11^2 + 1)/2 = 61 is prime and (61^2 + 1)/2 = 1861 is prime.
a(3) = 19 because (19^2 + 1)/2 = 181 is prime and (181^2 + 1)/2 = 16381 is prime.
a(4) = 59 because (59^2 + 1)/2 = 1741 is prime and (1741^2 + 1)/2 = 1515541 is prime.
a(5) = 69 because (69^2 + 1)/2 = 2381 is prime and (2381^2 + 1)/2 = 2834581 is prime. Further, (2834581^2+1)/2 = 4017424722781 is prime, which suggests another sequences one level of recursion deeper.
a(6) = 221 because (221^2 + 1)/2 = 24421 is prime and (24421^2 + 1)/2 = 298192621 is prime.
		

References

  • L. Euler, De numeris primis valde magnis (E283), reprinted in: Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 3, p. 24.

Crossrefs

Formula

n such that (n^2 + 1)/2 is prime and (((n^2 + 1)/2)^2 + 1)/2 is prime.

Extensions

More terms from Zak Seidov, Apr 03 2011

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
    

A308636 Sequence of 5 Pythagorean triangles, each with a leg and hypotenuse prime. The hypotenuse of each triangle is the leg of the next triangle.

Original entry on oeis.org

356498179, 432448789, 5380300469, 10667785241, 11238777509, 12129977791, 23439934621, 28055887949, 33990398249, 34250028521, 34418992099, 34773959159, 34821663421, 36624331189, 40410959231, 43538725229, 47426774869
Offset: 1

Views

Author

Ray Chandler, Jun 12 2019

Keywords

Examples

			p(1)=356498179, q=63545475815158021, r=63545475815158021, s=2038208257886801569993754841378314277932542447949256249537232302421, ...
		

Crossrefs

Formula

For each p(n), q=(p*p+1)/2, r=(q*q+1)/2, s=(r*r+1)/2, t=(s*s+1)/2, u=(t*t+1)/2 and p, q, r, s, t, u are all prime.
Showing 1-5 of 5 results.