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

A291464 Primes p such that p^3*q^3 + p^2 + q^2 is prime, where q is next prime after p.

Original entry on oeis.org

2, 11, 13, 41, 97, 277, 389, 1093, 1229, 1409, 1429, 1627, 1823, 1931, 1979, 2437, 2521, 2549, 2657, 2689, 2719, 2729, 2731, 2969, 3019, 3413, 3539, 3593, 3613, 3623, 3697, 4003, 4027, 4289, 4327, 4583, 4751, 5051, 5323, 5503, 5657, 5783, 6143, 6221, 6299, 6329
Offset: 1

Views

Author

K. D. Bajpai, Aug 24 2017

Keywords

Examples

			a(1) = 2 is prime; 3 is the next prime: 2^3*3^3 + 2^2 + 3^2 = 8*27 + 4 + 9 = 229 that is a prime.
a(2) = 11 is prime; 13 is the next prime: 11^3*13^3 + 11^2 + 13^2 = 1331*2197 + 121 + 169 = 2924497 that is a prime.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(5000) | IsPrime(p^3*q^3 + p^2 + q^2) where q is NextPrime(p)];
  • Maple
    select(p -> andmap(isprime,[p,(p^3*nextprime(p)^3+p^2+nextprime(p)^2)]), [seq(p, p=1..10^4)]);
  • Mathematica
    Select[Prime[Range[5000]], PrimeQ[#^3*NextPrime[#]^3 + #^2 + NextPrime[#]^2] &]
    Select[Partition[Prime[Range[1000]],2,1],PrimeQ[#[[1]]^3 #[[2]]^3+#[[1]]^2+#[[2]]^2]&][[;;,1]] (* Harvey P. Dale, Sep 11 2023 *)
  • PARI
    forprime(p=1, 5000, q=nextprime(p+1); p3=p^3; p2=p^2; q3=q^3; q2=q^2; if(ispseudoprime(p3*q3 + p2 + q2), print1(p, ", ")));
    

A358482 a(n) is the first prime p such that, if q is the next prime, (p*q+p+q)/5^n is a prime.

Original entry on oeis.org

2, 7, 1847, 90793, 139313, 1790293, 3834043, 5521543, 24996487, 2062865293, 5555052793, 12111965183, 95460776921, 6045070151921, 10204150316653, 70501997496487, 442748358250633, 368313674465183, 2935956099058987, 10360552690003447, 120999670013476223, 1820610211470152737
Offset: 0

Views

Author

Robert Israel, Dec 25 2022

Keywords

Comments

Suggested in an email by J. M. Bergot.
For n >= 1, a(n) has the form k * 5^n + x, for some k >= 0, where x is a solution to the modular quadratic equation x^2 + (d+2)*x + d == 0 (mod 5^n), where d = q-p. - Daniel Suteu, Dec 28 2022

Examples

			a(2) = 1847 because 1847 is prime, the next prime is 1861, 1847*1861 + 1847 + 1861 = 3440975 = 5^2 * 137639 where 137639 is prime, and no smaller prime works.
		

Crossrefs

Programs

  • Maple
    V:= Array(0..8):
    q:= 2: count:= 0:
    while count < 9 do
      p:= q; q:= nextprime(q);
    t:= p*q+p+q;
    k:= padic:-ordp(t,5);
    if V[k] = 0 and isprime(t/5^k) then
      V[k]:= p; count:= count+1
    fi
    od:
    convert(V,list);

Extensions

a(11) from Michael S. Branicky, Dec 26 2022
a(12)-a(15) from David A. Corneth, Dec 26 2022
a(16) from Martin Ehrenstein, Dec 27 2022
a(17)-a(21) from Daniel Suteu, Dec 28 2022
Previous Showing 11-12 of 12 results.