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.

A245639 Prime numbers P such that 8*P^2-1 is also prime.

Original entry on oeis.org

2, 3, 5, 11, 17, 19, 23, 31, 59, 67, 79, 89, 103, 107, 137, 173, 193, 229, 233, 241, 257, 263, 271, 311, 317, 353, 359, 383, 409, 431, 479, 509, 521, 523, 541, 563, 569, 577, 593, 599, 613, 641, 709, 739, 751, 787, 829, 887, 907, 919, 947, 971, 983, 1033
Offset: 1

Views

Author

Pierre CAMI, Jul 28 2014

Keywords

Examples

			8*2^2-1=31 prime so a(1)=2.
8*3^2-1=71 prime so a(2)=3.
8*5^2-1=199 prime so a(3)=5.
8*7^2-1=391 composite.
8*11^2-1=967 prime so a(4)=11.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(1500)| IsPrime(8*p^2-1)]; // Vincenzo Librandi, Sep 07 2014
  • Mathematica
    Reap[Do[p = Prime[n]; If[PrimeQ[8*p^2-1], Sow[p]], {n, 1, 200}]][[2, 1]] (* Jean-François Alcover, Jul 28 2014 *)
    Select[Prime[Range[200]], PrimeQ[8 #^2 - 1] &] (* Vincenzo Librandi, Sep 07 2014 *)
  • PARI
    select(p->isprime(8*p^2-1), primes(300)) \\ Colin Barker, Jul 28 2014
    
  • Python
    import sympy
    from sympy import isprime
    from sympy import prime
    for n in range(1,10**3):
      p = prime(n)
      if isprime(8*p**2-1):
        print(p,end=', ')
    # Derek Orr, Aug 13 2014
    

A245641 Prime numbers P such that 8*P^2-1 and 24*P^3-1 are also primes.

Original entry on oeis.org

2, 3, 5, 17, 67, 137, 241, 353, 541, 641, 907, 1033, 1307, 1453, 1607, 1621, 1733, 1811, 2053, 2243, 2273, 2377, 2621, 2963, 3677, 3701, 3881, 3943, 4861, 5261, 5647, 6101, 6823, 7723, 7877, 8081, 8101, 8447, 8923, 9467, 10111, 10223, 11483, 11617, 12161, 12203, 12227, 12457
Offset: 1

Views

Author

Pierre CAMI, Jul 28 2014

Keywords

Comments

Intersection of A245639 and A245640.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(15000)| IsPrime(8*p^2-1)and IsPrime(24*p^3-1)]; // Vincenzo Librandi, Sep 08 2014
  • Mathematica
    Select[Prime[Range[2000]], PrimeQ[8 #^2 - 1] && PrimeQ[24 #^3 - 1] &] (* Vincenzo Librandi, Sep 08 2014 *)
  • PARI
    select(p->isprime(8*p^2-1)&&isprime(24*p^3-1), primes(3000)) \\ Colin Barker, Jul 28 2014
    

A245681 Prime numbers P such that Q=24*P^3-1 is prime, R=24*Q^3-1 is prime and S=24*R^3-1 is also prime.

Original entry on oeis.org

157181, 244603, 276371, 491371, 1266631, 1954531, 2511911, 2866837, 4070201, 4285381, 4311037, 4682297, 4826897, 5200123, 5531353, 5644267, 6195731, 6581591, 7738001, 8290837, 8606053, 8760107, 8770547, 9309907, 9521453, 10562147, 11142413, 11532163, 12206021, 12631111
Offset: 1

Views

Author

Pierre CAMI, Jul 29 2014

Keywords

Comments

No prime number T=24*S^3-1 found for P < 160000000.

Crossrefs

Cf. A245640.

Programs

  • Mathematica
    f[n_]:=24 n^3 - 1; Select[Prime[Range[13000000]], PrimeQ[f[#]]&&PrimeQ[f[f[#]]]&& PrimeQ[f[f[f[#]]]]&] (* Vincenzo Librandi, Sep 08 2014 *)
    pnQ[n_]:=AllTrue[Rest[NestList[24#^3-1&,n,3]],PrimeQ]; Select[ Prime[ Range[ 830000]],pnQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 18 2015 *)
  • PARI
    f(x)=24*x^3-1
    forprime(p=1,10^8,if(ispseudoprime(f(p)) && ispseudoprime(f(f(p))) && ispseudoprime(f(f(f(p)))), print1(p,", "))) \\ Derek Orr, Jul 29 2014
Showing 1-3 of 3 results.