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-3 of 3 results.

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.

A261832 Numbers n such that prime(n)^3 + n is prime.

Original entry on oeis.org

2, 4, 6, 24, 32, 34, 36, 84, 86, 88, 112, 172, 182, 200, 212, 240, 258, 290, 306, 320, 336, 360, 366, 396, 404, 406, 434, 480, 494, 504, 528, 536, 556, 558, 580, 612, 636, 718, 722, 732, 794, 906, 960, 966, 992, 994, 1008, 1020, 1116, 1132, 1176, 1184, 1186, 1212
Offset: 1

Views

Author

K. D. Bajpai, Sep 02 2015

Keywords

Examples

			6 is in the list because prime(6)^3 + 6 = 13^3 + 6 = 2197 + 6 = 2203, which is prime.
24 is in the list because prime (24)^3 + 24 = 89^3 + 24 = 704969 + 24 = 704993, which is prime.
		

Crossrefs

Programs

  • Magma
    [n : n in [1..2000] | IsPrime(NthPrime(n)^3 +n)];
  • Maple
    select(n -> isprime(ithprime(n)^3 + n), [seq(n,n=1..2000)]);
  • Mathematica
    Select[Range[2000], PrimeQ[Prime[#]^3 + #] &]
  • PARI
    for(n = 1,2000, if(isprime(prime(n)^3 + n), print1(n,", ")));
    

A254461 Prime(n) is included iff prime(n) + n^3 is also prime.

Original entry on oeis.org

2, 3, 7, 13, 89, 139, 151, 317, 397, 443, 503, 541, 569, 619, 641, 659, 733, 827, 881, 911, 953, 1091, 1249, 1439, 1451, 1627, 1693, 1783, 2143, 2393, 2663, 2707, 2753, 2861, 2903, 2969, 3023, 3119, 3413, 3727, 4003, 4243, 4259, 4457, 4513, 4673, 4973, 5077
Offset: 1

Views

Author

Vincenzo Librandi, Feb 04 2015

Keywords

Examples

			7 is in this sequence because 7+64=71.
13 is in this sequence because 13+216=229.
		

Crossrefs

Cf. A253971.

Programs

  • Magma
    [NthPrime(n): n in [1..700] | IsPrime(NthPrime(n)+n^3)];
  • Mathematica
    Prime[Select[Range[700], PrimeQ[Prime[#] + #^3] &]]

Formula

a(n) = prime(A141526(n)). - Michel Marcus, Feb 04 2015
Showing 1-3 of 3 results.