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.

Previous Showing 11-18 of 18 results.

A154934 Primes in A154933.

Original entry on oeis.org

3, 11, 17, 37, 47, 59, 67, 127, 139, 173, 241, 367, 373, 383, 431, 523, 541, 569, 613, 631, 673, 683, 691, 829, 967, 977, 1019, 1063, 1163, 1213, 1249, 1291, 1301, 1303, 1327, 1367, 1439, 1483, 1487, 1601, 1607, 1609, 1733, 1747, 1789, 1801, 1823, 1907
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={}; Do[p=n^6-2; If[PrimeQ[p], If[PrimeQ[n], AppendTo[lst,n]]], {n,0,3*7!}]; lst

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

A154936 Primes in A154935.

Original entry on oeis.org

7, 199, 211, 337, 367, 1231, 1321, 1627, 1741, 2161, 2251, 2551, 3259, 3769, 3877, 3931, 4099, 4591, 4759, 4789, 6829, 7297, 7867, 8221, 8887, 9049, 9181, 9337, 9349, 11959, 12697, 12919, 13411, 13591, 14827, 15187, 15217, 15817, 15877, 15889
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={}; Do[p=n^7-2; If[PrimeQ[p], If[PrimeQ[n], AppendTo[lst,n]]], {n,0,8!}]; lst

A071351 Numbers n such that both n^4 + 2 and n^4 - 2 are prime.

Original entry on oeis.org

3, 21, 87, 99, 129, 141, 279, 627, 657, 777, 783, 795, 1653, 1725, 1833, 1959, 2001, 2043, 3039, 3399, 3609, 3861, 3975, 4257, 4371, 4491, 5403, 5541, 5709, 5985, 7371, 7539, 7869, 7917, 8397, 8445, 8547, 8793, 9051, 9057, 9915, 9933, 11067, 12153
Offset: 1

Views

Author

Labos Elemer, May 21 2002

Keywords

Examples

			n=3: n^4 = 81; {79,83} are primes.
		

Crossrefs

Programs

  • Mathematica
    lst={}; Do[p1=n^4-2; p2=n^4+2; If[PrimeQ[p1]&&PrimeQ[p2],AppendTo[lst,n]],{n,0,8!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jan 17 2009 *)
    Select[Range[730000], AllTrue[#^4 + {2, -2}, PrimeQ] &] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 02 2018 *)

A329727 Numbers k such that k^3 +- 2 and k +- 2 are prime.

Original entry on oeis.org

129, 1491, 1875, 2709, 5655, 6969, 10335, 14325, 14421, 17319, 26559, 35109, 37509, 43719, 50229, 52629, 101871, 102795, 104325, 105501, 120429, 127599, 132699, 136395, 137829, 157521, 172425, 173685, 179481, 186189, 191829, 211371, 219681, 221199, 229215, 234195
Offset: 1

Views

Author

K. D. Bajpai, Nov 19 2019

Keywords

Comments

All terms in this sequence are divisible by 3.

Examples

			a(1) = 129:
  129^3 + 2 = 2146691;
  129^3 - 2 = 2146687;
  129   + 2 =     131;
  129   - 2 =     127; all four results are prime.
a(2) = 1491:
  1491^3 + 2 = 3314613773;
  1491^3 - 2 = 3314613769;
  1491   + 2 =       1493;
  1491   - 2 =       1489; all four results are prime.
		

Crossrefs

Intersection of A038599, A067200, and A087679.

Programs

  • Magma
    [k:k in [1..250000]|forall{m:m in [-2,2]|IsPrime(k+m) and IsPrime(k^3+m)}]; // Marius A. Burtea, Nov 20 2019
    
  • Mathematica
    Select[Range[500000], PrimeQ[#^3 + 2] && PrimeQ[#^3 - 2] && PrimeQ[# + 2] && PrimeQ[# - 2] &]
  • PARI
    isok(k) = isprime(k-2) && isprime(k+2) && isprime(k^3-2) && isprime(k^3+2); \\ Michel Marcus, Nov 24 2019
    
  • PARI
    list(lim)=my(v=List(),p=127,k); forprime(q=131,lim+2,if(q-p==4 && isprime((k=p+2)^3-2) && isprime(k^3+2), listput(v,k)); p=q); Vec(v) \\ Charles R Greathouse IV, May 06 2020

A154938 Numbers k such that k^6 - 2 and k^6 + 2 are both primes.

Original entry on oeis.org

195, 213, 231, 657, 1563, 1749, 2967, 3597, 3627, 4263, 4887, 6867, 6993, 7257, 7725, 9045, 9201, 9717, 11595, 12579, 13029, 14145, 14259, 14367, 15837, 16131, 16581, 17259, 19905, 19917, 21081, 21711, 23127, 24435, 24921, 28299, 28707
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..500] | IsPrime(n^6-2) and IsPrime(n^6+2)]; // Vincenzo Librandi, Nov 26 2010
  • Mathematica
    lst={};Do[p1=n^6-2;p2=n^6+2;If[PrimeQ[p1]&&PrimeQ[p2],AppendTo[lst,n]],{n,0,9!}];lst
    Select[Range[30000],AllTrue[#^6+{2,-2},PrimeQ]&] (* Harvey P. Dale, Jun 21 2025 *)

A216945 Numbers k such that k-2, k^2-2, k^3-2, k^4-2 and k^5-2 are all prime.

Original entry on oeis.org

15331, 289311, 487899, 798385, 1685775, 1790991, 1885261, 1920619, 1967925, 2304805, 2479735, 3049201, 3114439, 3175039, 3692065, 4095531, 4653649, 5606349, 5708235, 6113745, 6143235, 6697425, 7028035, 7461601, 8671585, 8997121, 9260131, 10084915, 10239529
Offset: 1

Views

Author

Michel Lagneau, Sep 20 2012

Keywords

Comments

k^6-2 is also prime for k = 1685775, 4095531, 4653649, 5606349, 13219339, 13326069, 18439561, ...
Sequence is infinite under Schinzel's Hypothesis H. a(n) >> n log^5 n. - Charles R Greathouse IV, Sep 20 2012

Crossrefs

Programs

  • Mathematica
    Select[Range[20000000], And@@PrimeQ/@(Table[n^i-2, {i, 1, 5}]/.n->#)&]
    Select[Prime[Range[680000]]+2,AllTrue[#^Range[2,5]-2,PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 11 2020 *)

Formula

Sequence is A052147 intersection A028870 intersection A038599 intersection A154831 intersection A154833.

A330438 Numbers k such that k^2-2 and k^3-2 are prime.

Original entry on oeis.org

9, 15, 19, 27, 37, 121, 135, 145, 211, 217, 259, 265, 267, 279, 355, 357, 387, 391, 435, 489, 525, 561, 615, 621, 727, 951, 987, 1029, 1119, 1141, 1177, 1251, 1287, 1357, 1435, 1491, 1561, 1617, 1717, 1785, 1819, 1839, 1875, 1909, 1989, 2001, 2077, 2107, 2211
Offset: 1

Views

Author

K. D. Bajpai, Dec 14 2019

Keywords

Comments

Intersection of A028870 and A038599.

Examples

			a(1) = 9: 9^2 - 2 = 79; 9^3 - 2 = 727; both results are prime.
a(2) = 15: 15^2 - 2 = 223; 15^3 - 2 = 3373; both results are prime.
		

Crossrefs

Programs

  • Magma
    [n : n in [1 .. 100] | IsPrime (n^2 - 2) and IsPrime (n^3 - 2)];
  • Maple
    filter:= k -> isprime(k^2-2) and isprime(k^3-2):
    select(filter, [$2..10000]); # Robert Israel, Dec 24 2019
  • Mathematica
    Select[Range[10000], PrimeQ[#^3 - 2] && PrimeQ[#^2 - 2] &]
Previous Showing 11-18 of 18 results.