login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A238136 Primes p such that p^4-p^3+1 and p^4-p^3-1 are also primes. 4
1429, 5827, 7411, 9601, 12601, 18457, 20011, 20521, 24919, 25999, 28591, 29947, 33211, 33349, 36037, 38149, 41227, 42649, 43579, 45307, 46099, 49999, 52057, 52387, 54319, 59107, 59197, 59629, 67891, 70951, 73477, 74761, 75037, 81157, 92041, 93607, 114889 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
1429 is in the sequence because 1429, (1429^4-1429^3+1) and (1429^4-1429^3-1) are all primes.
MAPLE
KD := proc() local a, b, d; a:=ithprime(n); b:= a^4-a^3+1; d:=a^4-a^3-1; if isprime (b) and isprime(d) then RETURN (a); fi; end: seq(KD(), n=1..20000);
MATHEMATICA
Select[Prime[Range[3000]], PrimeQ[#^4-#^3+1]&&PrimeQ[#^4-#^3-1]&]
c=0; a=2; Do[k=Prime[n]; If[PrimeQ[k^4-k^3+1] &&PrimeQ[k^4-k^3-1], c=c+1; Print[c, " ", k]], {n, 1, 2000000}];
pQ[n_]:=Module[{c=n^4-n^3}, AllTrue[c+{1, -1}, PrimeQ]]; Select[Prime[ Range[ 11000]], pQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 19 2014 *)
PROG
(PARI) s=[]; forprime(p=2, 120000, if(isprime(p^4-p^3+1) && isprime(p^4-p^3-1), s=concat(s, p))); s \\ Colin Barker, Feb 18 2014
CROSSREFS
Sequence in context: A321036 A094230 A353080 * A060364 A243834 A124087
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Feb 18 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 06:16 EDT 2024. Contains 371782 sequences. (Running on oeis4.)