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 36 results. Next

A028871 Primes of the form k^2 - 2.

Original entry on oeis.org

2, 7, 23, 47, 79, 167, 223, 359, 439, 727, 839, 1087, 1223, 1367, 1847, 2207, 2399, 3023, 3719, 3967, 4759, 5039, 5623, 5927, 7919, 8647, 10607, 11447, 13687, 14159, 14639, 16127, 17159, 18223, 19319, 21023, 24023, 25919, 28559, 29927
Offset: 1

Views

Author

Keywords

Comments

Except for the initial term, primes equal to the product of two consecutive even numbers minus 1. - Giovanni Teofilatto, Sep 24 2004
With exception of the first term 2, primes p such that continued fraction of (1+sqrt(p))/2 have period 4. - Artur Jasinski, Feb 03 2010
Subsequence of A094786. First primes q that are in A094786 but not here are 241, 3373, 6857, 19681, 29789, 50651, 300761, 371291, ...; q+2 are perfect powers m^k with odd k>1. - Zak Seidov, Dec 09 2014

References

  • D. Shanks, Solved and Unsolved Problems in Number Theory, 2nd. ed., Chelsea, 1978, p. 31.

Crossrefs

Cf. A028870, A089623, A010051, A094786; subsequence of A008865.

Programs

  • Haskell
    a028871 n = a028871_list !! (n-1)
    a028871_list = filter ((== 1) . a010051') a008865_list
    -- Reinhard Zumkeller, May 06 2013
    
  • Magma
    [p: p in PrimesUpTo(100000)| IsSquare(p+2)]; // Vincenzo Librandi, Jun 19 2014
  • Maple
    select(isprime, [2,seq((2*n+1)^2-2, n=1..1000)]); # Robert Israel, Dec 09 2014
  • Mathematica
    lst={};Do[s=n^2;If[PrimeQ[p=s-2], AppendTo[lst, p]], {n, 6!}];lst (* Vladimir Joseph Stephan Orlovsky, Sep 26 2008 *)
    aa = {}; Do[If[4 == Length[ContinuedFraction[(1 + Sqrt[Prime[m]])/2][[2]]], AppendTo[aa, Prime[m]]], {m, 1, 1000}]; aa (* Artur Jasinski, Feb 03 2010 *)
    Select[Table[n^2 - 2, {n, 400}], PrimeQ] (* Vincenzo Librandi, Jun 19 2014 *)
  • PARI
    list(lim)=select(n->isprime(n),vector(sqrtint(floor(lim)+2),k,k^2-2)) \\ Charles R Greathouse IV, Jul 25 2011
    

Formula

a(n) = A028870(n)^2 -2. - R. J. Mathar, Dec 12 2023

A066049 Numbers n such that 2*n^2 - 1 is a prime.

Original entry on oeis.org

2, 3, 4, 6, 7, 8, 10, 11, 13, 15, 17, 18, 21, 22, 24, 25, 28, 34, 36, 38, 39, 41, 42, 43, 45, 46, 49, 50, 52, 56, 59, 62, 63, 64, 69, 73, 76, 80, 81, 85, 87, 91, 92, 95, 98, 102, 108, 109, 112, 113, 115, 118, 125, 126, 127, 132, 134, 137, 140, 141, 143, 153, 154, 155
Offset: 1

Views

Author

N. J. A. Sloane, Jan 09 2002

Keywords

Comments

It is conjectured that this sequence is infinite.
A066436 gives resulting primes p such that (p+1)/2 is square. - Ray Chandler

References

  • D. Shanks, Solved and Unsolved Problems in Number Theory, 2nd. ed., Chelsea, 1978, p. 31.

Crossrefs

Programs

  • Mathematica
    Select[Range[200],PrimeQ[2#^2-1]&] (* Harvey P. Dale, Jun 14 2011 *)
  • PARI
    { n=0; for (m=1, 10^9, if (isprime(2*m^2 - 1), write("b066049.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Nov 08 2009

Formula

a(n) = A090697(n)/2 = A110558(n)/4. - Ray Chandler, Sep 15 2005
a(n) = A160697(n+1). - Reinhard Zumkeller, May 24 2009

Extensions

Extended by Ray Chandler, Sep 15 2005

A038599 Numbers k such that k^3 - 2 is prime.

Original entry on oeis.org

9, 15, 19, 27, 31, 37, 67, 91, 99, 109, 121, 129, 135, 145, 151, 165, 187, 189, 201, 207, 211, 217, 241, 259, 265, 267, 277, 279, 289, 319, 355, 357, 367, 369, 387, 391, 411, 417, 427, 435, 439, 445, 457, 459, 477, 489, 511, 525, 549, 555, 561, 615, 619, 621
Offset: 1

Views

Author

Keywords

Examples

			15^3 - 2 = 3373 is prime, so 15 is in the sequence.
		

Crossrefs

Programs

Formula

a(n) = (A038600(n)+2)^(1/3). - Zak Seidov, May 10 2016

Extensions

Missed term, 207, and more terms added by Zak Seidov, Mar 14 2009

A108701 Values of n such that n^2-2 and n^2+2 are both prime.

Original entry on oeis.org

3, 9, 15, 21, 33, 117, 237, 273, 303, 309, 387, 429, 441, 447, 513, 561, 573, 609, 807, 897, 1035, 1071, 1113, 1143, 1233, 1239, 1311, 1563, 1611, 1617, 1737, 1749, 1827, 1839, 1953, 2133, 2211, 2283, 2589, 2715, 2721, 2955, 3081, 3093, 3453, 3549, 3555, 3621, 3723, 3807
Offset: 1

Views

Author

John L. Drost, Jun 19 2005

Keywords

Comments

Since x^2 + 2 is divisible by 3 unless x is divisible by 3, all elements are 3 mod 6.
Intersection of A067201 and A028870. - Robert Israel, Sep 11 2014

Examples

			21 is on the list since 21^2 - 2 = 439 and 21^2 + 2 = 443 are primes.
		

References

  • David Wells, Prime Numbers, John Wiley and Sons, 2005, p. 219 (article:'Siamese primes')

Crossrefs

Programs

  • Magma
    [n: n in [3..3600 by 6] | IsPrime(n^2-2) and IsPrime(n^2+2)];  // Bruno Berselli, Apr 15 2011
    
  • Maple
    select(n -> isprime(n^2-2) and isprime(n^2+2), [seq(6*i+3,i=0..1000)]); # Robert Israel, Sep 11 2014
  • Mathematica
    Select[Range[5000], PrimeQ[#^2 - 2] && PrimeQ[#^2 + 2] &] (* Alonso del Arte, Sep 11 2014 *)
  • PARI
    is(n)=isprime(n^2-2)&&isprime(n^2+2) \\ Charles R Greathouse IV, Jul 02 2013

Extensions

Terms corrected by Charles R Greathouse IV, Sep 11 2014

A154831 Numbers n such that n^4-2 is prime.

Original entry on oeis.org

3, 7, 11, 13, 21, 29, 39, 41, 43, 49, 53, 59, 73, 83, 85, 87, 95, 99, 101, 119, 129, 141, 143, 175, 181, 185, 189, 207, 217, 239, 241, 277, 279, 293, 311, 315, 323, 339, 343, 363, 367, 371, 375, 381, 389, 409, 421, 433, 435, 451, 473, 483, 497, 503, 507, 515
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..500] | IsPrime(n^4-2)]; // Vincenzo Librandi, Nov 26 2010
    
  • Mathematica
    lst={};Do[p=n^4-2;If[PrimeQ[p],AppendTo[lst,n]],{n,0,7!}];lst
    Select[Range[600],PrimeQ[#^4-2]&] (* Harvey P. Dale, May 20 2012 *)
  • PARI
    is(n)=isprime(n^4-2) \\ Charles R Greathouse IV, Jul 02 2013

A153974 Numbers n such that n^3 - 3 is prime.

Original entry on oeis.org

2, 4, 8, 10, 14, 16, 26, 34, 38, 40, 74, 80, 106, 110, 116, 124, 136, 158, 178, 184, 190, 206, 224, 230, 238, 256, 274, 280, 316, 320, 338, 340, 386, 410, 428, 446, 458, 464, 470, 484, 496, 530, 544, 550, 556, 590, 626, 634, 644, 646, 674, 710, 718, 728, 730
Offset: 1

Views

Author

Keywords

Comments

2^3 - 3 = 5 is prime, 4^3 - 3 = 61 is prime, ...

Crossrefs

Programs

  • Magma
    [n: n in [2..500] | IsPrime(n^3-3)]; // Vincenzo Librandi, Nov 26 2010
    
  • Mathematica
    a[n_]:=n^x-y;lst={};x=3;y=3;Do[If[PrimeQ[a[n]],AppendTo[lst,n]],{n,0,6!}];lst
    Select[Range[2, 1000], PrimeQ[#^3 - 3] &] (* G. C. Greubel, Sep 01 2016 *)
  • PARI
    is(n)=isprime(n^3-3) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

First two terms 0,1, removed by Zak Seidov, Mar 14 2009

A154832 Primes p such that p^4-2 is also prime.

Original entry on oeis.org

3, 7, 11, 13, 29, 41, 43, 53, 59, 73, 83, 101, 181, 239, 241, 277, 293, 311, 367, 389, 409, 421, 433, 503, 587, 617, 647, 683, 757, 773, 811, 823, 839, 881, 907, 953, 1019, 1093, 1117, 1187, 1249, 1361, 1471, 1481, 1543, 1553, 1571, 1637, 1667, 1747, 1789, 1847
Offset: 1

Views

Author

Keywords

Comments

Primes in A154831.

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=n^4-2;If[PrimeQ[p],If[PrimeQ[n],AppendTo[lst,n]]],{n,0,7!}];lst
    Select[Prime[Range[300]],PrimeQ[#^4-2]&] (* Harvey P. Dale, Nov 24 2018 *)

A239414 Numbers k such that k^6 - 6 is prime.

Original entry on oeis.org

5, 7, 17, 37, 113, 137, 157, 173, 175, 203, 223, 227, 295, 337, 395, 407, 475, 487, 503, 535, 605, 617, 707, 743, 797, 833, 857, 863, 865, 877, 905, 943, 947, 965, 973, 995, 1037, 1043, 1057, 1103, 1217, 1243, 1247, 1277, 1295, 1337, 1357, 1363, 1375, 1403
Offset: 1

Views

Author

Derek Orr, Mar 17 2014

Keywords

Comments

Note that all the numbers in this sequence are odd.

Examples

			5^6 - 6 = 15619 is prime. Thus, 5 is a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[3,1501,2],PrimeQ[#^6-6]&] (* Harvey P. Dale, Jul 24 2016 *)
  • PARI
    is(n)=isprime(n^6-6) \\ Charles R Greathouse IV, Feb 17 2017
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**4) if isprime(n**6-6)}
    

A154833 Numbers n such that n^5-2 is prime.

Original entry on oeis.org

3, 13, 31, 63, 93, 139, 181, 211, 229, 265, 271, 303, 325, 339, 343, 345, 411, 441, 519, 523, 531, 549, 555, 573, 619, 663, 675, 681, 693, 741, 751, 805, 819, 835, 853, 861, 945, 951, 969, 975, 993, 1063, 1071, 1095, 1119, 1143, 1275, 1281, 1305, 1329
Offset: 1

Views

Author

Keywords

Comments

3^5-2=241 prime, 13^5-2=371291 prime,...

Crossrefs

Programs

  • Magma
    [n: n in [1..500] | IsPrime(n^5-2)]; // Vincenzo Librandi, Nov 26 2010
    
  • Mathematica
    lst={};Do[p=n^5-2;If[PrimeQ[p],AppendTo[lst,n]],{n,0,7!}];lst
    Select[Range[2 10^3], PrimeQ[#^5 - 2] &] (* Vincenzo Librandi, Mar 20 2014 *)
  • PARI
    is(n)=isprime(n^5-2) \\ Charles R Greathouse IV, Feb 17 2017

A154834 Primes p such that p^5 - 2 is also prime.

Original entry on oeis.org

3, 13, 31, 139, 181, 211, 229, 271, 523, 619, 751, 853, 1063, 1483, 1699, 2791, 3361, 3463, 3541, 3769, 4051, 4201, 4801, 4861, 4903, 5521, 5689, 5701, 6163, 6211, 6763, 6823, 6949, 7621, 8059, 8269, 8389, 8419, 8563, 8689, 8713, 9001, 9103, 9319, 10303
Offset: 1

Views

Author

Keywords

Comments

Primes in A154833.

Examples

			3^5 - 2 = 241 is prime,
13^5 - 2 = 371291 is prime, ...
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=n^5-2;If[PrimeQ[p],If[PrimeQ[n],AppendTo[lst,n]]],{n,0,7!}];lst
    Select[Prime[Range[1300]],PrimeQ[#^5-2]&] (* Harvey P. Dale, Feb 09 2019 *)
Showing 1-10 of 36 results. Next