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.

A212883 Numbers n such that n^4 - prime(n) is prime.

Original entry on oeis.org

2, 6, 40, 76, 144, 146, 148, 166, 168, 174, 186, 192, 210, 220, 222, 230, 238, 240, 258, 290, 338, 364, 372, 378, 384, 398, 400, 402, 442, 446, 482, 492, 532, 536, 554, 570, 606, 628, 654, 700, 740, 882, 888, 944, 954, 964, 966, 978, 1038, 1040, 1072, 1080
Offset: 1

Views

Author

Zak Seidov, May 29 2012

Keywords

Comments

See A064712 for the sequence of values of n such that n^2-prime(n) is prime. - John W. Layman, May 29 2012
All terms are even. - M. F. Hasler, Jun 02 2012

Crossrefs

Programs

  • Magma
    [n: n in [1..1200]|IsPrime(n^4-NthPrime(n))];
    
  • Maple
    A[1]:= 2: p:= 3: count:= 1:
    for n from 4 to 10^4 by 2 do
       p:= nextprime(nextprime(p));
       if isprime(n^4-p) then
         count:= count+1;
         A[count]:= n;
       fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Jun 20 2017
  • Mathematica
    Reap[Do[If[PrimeQ[n^4-Prime[n]],Sow[n]],{n,2,1200,2}]][[2,1]]
    Select[Range[1200],PrimeQ[#^4-Prime[#]]&] (* Harvey P. Dale, Mar 26 2025 *)
  • PARI
    for(n=1,999,isprime(n^4-prime(n))&print1(n","))  \\ M. F. Hasler, Jun 02 2012

A213428 Numbers k such that k^8 - prime(k) is prime.

Original entry on oeis.org

6, 10, 12, 60, 72, 168, 174, 190, 204, 230, 290, 300, 396, 536, 628, 948, 972, 990, 1014, 1042, 1050, 1174, 1254, 1324, 1326, 1428, 1566, 1602, 1662, 1684, 1808, 1854, 1866, 1942, 1950, 2070, 2154, 2170, 2206, 2214, 2234, 2332, 2388, 2508, 2660, 2668, 2784
Offset: 1

Views

Author

Jonathan Vos Post, Jun 11 2012

Keywords

Comments

k such that A001016(k) - A000040(k) is in A000040.

Examples

			a(1) = 6 because 6^8 - prime(6) = 1679603 is prime.
		

Crossrefs

Programs

  • Maple
    P:= select(isprime,[2,seq(i,i=3..10^5,2)]):
    select(t -> isprime(t^8 - P[t]), [seq(i,i=2..nops(P),2)]); # Robert Israel, Jun 02 2023
  • Mathematica
    Select[Range[3000], PrimeQ[#^8 - Prime[#]] &] (* T. D. Noe, Jun 11 2012 *)

A257788 Numbers n such that n^3+prime(n) and n^3-prime(n) are prime.

Original entry on oeis.org

2, 66, 228, 696, 1416, 2172, 3000, 3384, 3732, 4314, 4524, 4554, 5070, 5220, 5412, 5826, 5844, 6636, 7422, 7662, 7932, 8148, 8832, 9528, 10092, 10242, 10746, 11670, 11682, 11820, 12918, 13266, 14430, 14580, 15216, 15300, 15534, 15864, 16542, 16782, 16932, 17670
Offset: 1

Views

Author

K. D. Bajpai, May 12 2015

Keywords

Comments

All terms are even.

Examples

			2 is in the sequence: 2^3 + prime(2) = 11; 2^3 - prime(2) = 5; both are prime.
66 is in the sequence: 66^3 + prime(66) = 287813; 66^3 - prime(66) = 287179; both are prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..20000] | IsPrime(n^3+NthPrime(n)) and IsPrime(n^3-NthPrime(n))];
  • Mathematica
    Select[Range[30000], PrimeQ[#^3 + Prime[#]] && PrimeQ[#^3 - Prime[#]] &]
    Select[Range[18000],AllTrue[#^3+{Prime[#],-Prime[#]},PrimeQ]&] (* Harvey P. Dale, Aug 10 2023 *)
  • PARI
    for(n=1, 1e5, if(isprime(n^3 + prime(n)) && isprime(n^3 - prime(n)), print1(n,", ")))
    

Formula

Intersection of A141526 and A212881.

A213477 Main diagonal starting k=2 of array A(k,n) = numbers n such that n^k - prime(n) is a prime.

Original entry on oeis.org

6, 10, 40, 14, 62, 76, 174, 278, 218, 702, 762, 758, 950, 858, 1782, 2290, 1596, 1462, 1848, 2964, 2262, 4278, 3750, 4320, 5076, 4010, 4890, 8040, 7494, 5962, 7996, 10318, 9424, 5770, 10080, 11088, 12222, 13806, 14712, 16904, 15222, 15620, 18258, 16092
Offset: 1

Views

Author

Jonathan Vos Post, Jun 12 2012

Keywords

Examples

			The array begins:
=====================================================
....|.n=1.|.n=2.|.n=3.|.n=4.|.n=5.|.n=6.|.n=7.|.n=8.|
=====================================================
k=2.|...6.|..10.|..12.|..18.|..24.|..28.|..30.|..40.|A064712
k=3.|...2.|..10.|..38.|..42.|..44.|..50.|..66.|..74.|A212881
k=4.|...2.|...6.|..40.|..76.|.144.|.146.|.148.|.166.|A212883
=====================================================
		

References

  • The k=2 row is A064712 Numbers n such that n^2 - prime(n) is prime.
  • The k=3 row is A212881 Numbers n such that n^3 - prime(n) is prime.
  • The k=4 row is A212883 Numbers n such that n^4 - prime(n) is prime.
  • The k=8 row is A213428 Numbers n such that n^8 - prime(n) is prime.

Crossrefs

Programs

  • Mathematica
    Table[Select[Range[100000], PrimeQ[#^n - Prime[#]] &, n-1][[n-1]], {n, 2, 50}] (* T. D. Noe, Jun 13 2012 *)

A213535 Numbers n such that n^5 - prime(n) is prime.

Original entry on oeis.org

2, 8, 10, 14, 30, 40, 50, 190, 294, 308, 346, 370, 396, 400, 630, 634, 690, 716, 746, 790, 870, 912, 926, 968, 1010, 1104, 1122, 1130, 1198, 1204, 1308, 1392, 1394, 1482, 1532, 1560, 1600, 1640, 1706, 1714, 1740, 1742, 1770, 1784, 1810, 1816, 1848, 1880
Offset: 1

Views

Author

Jonathan Vos Post, Jun 13 2012

Keywords

Examples

			a(1) = 2 because 2^5 - prime(2) = 29  a prime.
a(2) = 8 because 8^5 - prime(8) = 32749 is prime.
a(3) = 10 because 10^5 - prime(10) = 99971 is prime.
a(8) = 190 because 190^5 - prime(190) = 247609898849  is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2000], PrimeQ[#^5 - Prime[#]] &] (* T. D. Noe, Jun 13 2012 *)
Showing 1-5 of 5 results.