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.

A237528 Numbers n of the form p^3-p^2-p-1 (for prime p) such that n^3-n^2-n-1 is prime.

This page as a plain text file.
%I A237528 #12 Mar 10 2014 12:50:08
%S A237528 23518,146014,486718,564814,3285598,4629406,7151614,11645326,22584814,
%T A237528 29983198,31754206,64319998,355897438,745319086,864614014,1304555614,
%U A237528 2334990526,2903803726,3447511198,3934332718,4194050014,4596374014,5838479998,6866219998
%N A237528 Numbers n of the form p^3-p^2-p-1 (for prime p) such that n^3-n^2-n-1 is prime.
%C A237528 All numbers are congruent to 4 mod 10, 6 mod 10, or 8 mod 10.
%e A237528 23518 = 29^3-29^2-29-1 (29 is prime) and 23518^3-23518^2-23518-1 = 13007166227989 is prime. Thus, 23518 is a member of this sequence.
%t A237528 f[n_] := n^3 - n^2 - n - 1; f[ Select[ Prime@ Range[2,740],PrimeQ@ f@ f@#&]] (* _Robert G. Wilson v_, Mar 07 2014 *)
%o A237528 (Python)
%o A237528 import sympy
%o A237528 from sympy import isprime
%o A237528 {print(n**3-n**2-n-1) for n in range(10**4) if isprime(n) and isprime((n**3-n**2-n-1)**3-(n**3-n**2-n-1)**2-(n**3-n**2-n-1)-1)}
%o A237528 (PARI)
%o A237528 s=[]; forprime(p=2, 40000, n=p^3-p^2-p-1; if(isprime(n^3-n^2-n-1), s=concat(s, n))); s \\ _Colin Barker_, Feb 10 2014
%Y A237528 Cf. A162295.
%K A237528 nonn
%O A237528 1,1
%A A237528 _Derek Orr_, Feb 09 2014