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

A237527 Numbers n of the form p^2-p-1 = A165900(p), for prime p, such that n^2-n-1 = A165900(n) is also prime.

Original entry on oeis.org

5, 155, 505, 2755, 3421, 6805, 11341, 27721, 29755, 31861, 44309, 49505, 52211, 65791, 100171, 121451, 134321, 185329, 195805, 236681, 252505, 258571, 292139, 325469, 375155, 380071, 452255, 457651, 465805, 563249, 676505, 1041419, 1061929
Offset: 1

Views

Author

Derek Orr, Feb 09 2014

Keywords

Comments

All numbers are congruent to 1 mod 10, 5 mod 10, or 9 mod 10.
A subsequence of A165900 and A028387. - M. F. Hasler, Mar 01 2014

Examples

			5 = 3^2-3-1 (3 is prime) and 5^2-5-1 = 19 is also prime. So, 5 is a member of this sequence.
		

Crossrefs

Programs

  • PARI
    s=[]; forprime(p=2, 40000, n=p^2-p-1; if(isprime(n^2-n-1), s=concat(s, n))); s \\ Colin Barker, Feb 10 2014
  • Python
    import sympy
    from sympy import isprime
    {print(n**2-n-1) for n in range(10**4) if isprime(n) and isprime((n**2-n-1)**2-(n**2-n-1)-1)}
    

Formula

a(n) = A165900(A230026(n)). - M. F. Hasler, Mar 01 2014

A238447 Primes p such that f(p) and f(f(p)) are both prime, where f(x) = x^2-x-1.

Original entry on oeis.org

3, 487, 617, 677, 751, 1201, 1289, 1579, 1747, 2027, 2267, 2269, 2309, 3259, 3947, 4457, 4567, 4621, 4637, 4799, 4951, 5701, 6029, 6991, 7151, 7687, 7867, 9187, 9209, 9341, 9587, 9829, 11321, 12301, 12541, 12781, 13177, 13649, 15919, 16349
Offset: 1

Views

Author

Derek Orr, Feb 26 2014

Keywords

Comments

Intersection of A230026 and A091567.
Note that f(f(f(p))) is always composite. - Zak Seidov, Nov 10 2014

Examples

			3 is prime, 3^2-3-1 = 5 is prime, and (3^2-3-1)^2-(3^2-3-1)-1 = 19 is prime. Thus, 3 is a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[2000]],AllTrue[Rest[NestList[#^2-#-1&,#,2]],PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 03 2017 *)
  • Python
    import sympy
    from sympy import isprime
    def f(x):
      return x**2-x-1
    {print(p) for p in range(10**5) if isprime(p) and isprime(f(p)) and isprime(f(f(p)))}
Showing 1-2 of 2 results.