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

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

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)}
    

A239413 Numbers n such that n^5-5 is prime.

Original entry on oeis.org

4, 12, 16, 42, 102, 124, 132, 144, 184, 232, 274, 288, 306, 316, 336, 352, 406, 438, 478, 582, 606, 622, 706, 742, 754, 762, 814, 832, 916, 922, 964, 984, 996, 1026, 1044, 1072, 1086, 1096, 1156, 1174, 1204, 1258, 1272, 1366, 1408, 1416, 1428, 1432, 1456
Offset: 1

Views

Author

Derek Orr, Mar 17 2014

Keywords

Comments

Note that all the numbers in this sequence are even.
There is no sequence "Numbers n such that n^4-4 is prime." since n^4 - 4 = (n^2 + 2)(n^2 - 2). - Michael B. Porter, Mar 18 2014

Examples

			4^5-5 = 1019 is prime. Thus, 4 is a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1500],PrimeQ[#^5-5]&] (* Harvey P. Dale, Dec 30 2019 *)
  • PARI
    is(n)=isprime(n^5-5) \\ 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**5-5)}
    

A239415 Numbers n such that n^7-7 is prime.

Original entry on oeis.org

60, 66, 132, 212, 242, 246, 290, 296, 312, 326, 380, 384, 446, 516, 524, 554, 654, 704, 740, 782, 834, 1026, 1086, 1142, 1154, 1172, 1182, 1214, 1424, 1430, 1464, 1482, 1494, 1500, 1524, 1604, 1682, 1686, 1752, 1794, 1796, 1844, 1854, 1940, 1952, 1980, 2000, 2010
Offset: 1

Views

Author

Derek Orr, Mar 17 2014

Keywords

Comments

Note that all the numbers in this sequence are even.

Examples

			60^7-7 = 2799359999993 is prime. Thus, 60 is a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2500],PrimeQ[#^7-7]&] (* Harvey P. Dale, Dec 21 2022 *)
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**4) if isprime(n**7-7)}

A239416 Numbers n such that n^8-8 is prime.

Original entry on oeis.org

3, 7, 19, 39, 73, 75, 101, 107, 145, 147, 171, 213, 235, 247, 263, 285, 319, 353, 359, 369, 399, 443, 445, 521, 523, 557, 613, 675, 693, 707, 733, 781, 791, 805, 815, 829, 837, 879, 927, 943, 961, 999, 1033, 1097, 1103, 1109, 1129, 1137, 1141, 1155, 1157
Offset: 1

Views

Author

Derek Orr, Mar 17 2014

Keywords

Comments

Note that all the numbers in this sequence are odd.

Examples

			3^8-8 = 6553 is prime. Thus, 3 is a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[3,1200,2],PrimeQ[#^8-8]&] (* Harvey P. Dale, Jun 27 2014 *)
  • PARI
    is(n)=isprime(n^8-8) \\ Charles R Greathouse IV, Feb 20 2017
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**4) if isprime(n**8-8)}
    

A239417 Numbers n such that n^9-9 is prime.

Original entry on oeis.org

2, 62, 86, 88, 116, 152, 266, 292, 310, 326, 338, 356, 406, 436, 466, 470, 518, 550, 568, 616, 626, 650, 688, 700, 722, 812, 850, 926, 956, 992, 1058, 1076, 1126, 1186, 1252, 1430, 1550, 1570, 1642, 1672, 1682, 1766, 1808, 1852, 1868, 1888, 2138, 2210, 2306
Offset: 1

Views

Author

Derek Orr, Mar 17 2014

Keywords

Comments

Note that all numbers in this sequence are even.

Examples

			2^9-9 = 503 is prime. Thus, 2 is a member of this sequence.
		

Crossrefs

Programs

  • PARI
    is(n)=isprime(n^9-9) \\ Charles R Greathouse IV, Feb 20 2017
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**4) if isprime(n**9-9)}
    

A239418 Numbers n such that n^10 - 10 is prime.

Original entry on oeis.org

21, 201, 267, 321, 369, 459, 537, 651, 669, 699, 723, 753, 1071, 1113, 1197, 1203, 1209, 1323, 1401, 1503, 1587, 1647, 1773, 1791, 1797, 1917, 1941, 2007, 2139, 2223, 2427, 2493, 2613, 2733, 2769, 2787, 2847, 3147, 3249, 3267, 3297, 3399, 3423, 3441, 3771
Offset: 1

Views

Author

Derek Orr, Mar 17 2014

Keywords

Comments

All of the numbers in this sequence are odd multiples of 3 and, thus, congruent to 3 (mod 6).
The tenth powers modulo 6 are 1, 4, 3, 4, 1, 0, ... (A070431). Subtracting 10 (still modulo 6), we get 3, 0, 5, 0, 3, 2, ... which means that only n = 3 mod 6 can produce a potential prime p = 5 mod 6.

Examples

			21^10 - 10 = 16679880978191 is prime. Thus, 21 is a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], PrimeQ[#^10 - 10] &] (* Alonso del Arte, Mar 18 2014 *)
  • PARI
    is(n)=isprime(n^10-10) \\ Charles R Greathouse IV, Feb 20 2017
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**4) if isprime(n**10-10)}
    

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

Original entry on oeis.org

4, 8, 10, 14, 64, 92, 112, 140, 146, 172, 218, 298, 304, 322, 326, 340, 350, 356, 416, 440, 470, 508, 554, 560, 580, 626, 634, 652, 668, 686, 694, 704, 728, 736, 746, 770, 806, 818, 868, 892, 920, 1054, 1082, 1102, 1130, 1156, 1196, 1256, 1264, 1378, 1418
Offset: 1

Views

Author

Keywords

Comments

Intersection of A028873 and A049422. - Zak Seidov, Oct 12 2014

Examples

			4^2 - 3 = 13 and 4^2 + 3 = 19 are both primes, so 4 is in the sequence.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..1400] | IsPrime(n^2-3) and IsPrime(n^2+3)]; // Vincenzo Librandi, Oct 12 2014
    
  • Mathematica
    Select[Range[1500], PrimeQ[#^2 - 3] && PrimeQ[#^2 + 3] &] (* Vincenzo Librandi, Oct 12 2014 *)
  • PARI
    is(n) = isprime(n^2-3) && isprime(n^2+3); \\ Altug Alkan, Sep 01 2016

Extensions

Incorrect term 0 removed and Mma edited by Zak Seidov, Oct 12 2014

A241808 Numbers k such that (2*k)^3 - 3 is prime.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 13, 17, 19, 20, 37, 40, 53, 55, 58, 62, 68, 79, 89, 92, 95, 103, 112, 115, 119, 128, 137, 140, 158, 160, 169, 170, 193, 205, 214, 223, 229, 232, 235, 242, 248, 265, 272, 275, 278, 295, 313, 317, 322, 323, 337, 355, 359, 364
Offset: 1

Views

Author

Gerasimov Sergey, Apr 29 2014

Keywords

Crossrefs

Programs

Formula

a(n) = A153974(n)/2. - R. J. Mathar, May 14 2014

A239474 Smallest k >= 1 such that k^n-n is prime. a(n) = 0 if no such k exists.

Original entry on oeis.org

3, 2, 2, 0, 4, 5, 60, 3, 2, 21, 28, 5, 2, 199, 28, 0, 234, 11, 2, 3, 2, 159, 10, 31, 68, 145, 0, 69, 186, 163, 32, 253, 26, 261, 4, 0, 8, 11, 62, 3, 22, 43, 6, 7, 8, 945, 76, 7, 116, 129, 382, 93, 330, 361, 2, 555, 224, 1359, 78, 29, 62, 39, 110, 0, 1032, 37, 462, 29
Offset: 1

Views

Author

Derek Orr, Mar 20 2014

Keywords

Comments

If n is of the form (pk)^p for some k and some prime p, then a(n) = 0 (See A097764).

Examples

			1^1-1 = 0 is not prime. 2^1-1 = 1 is not prime. 3^1-1 = 2 is prime. Thus, a(1) = 3.
		

Crossrefs

Programs

  • Python
    import sympy
    from sympy import isprime
    def TwoMin(x):
      for k in range(1,5000):
        if isprime(k**x-x):
          return k
    x = 1
    while x < 100:
      print(TwoMin(x))
      x += 1

Formula

a(A097764(n)) = 0 for all n.
Showing 1-10 of 11 results. Next