A279480 Numbers n such that n+1 and n^4+1 are primes.
1, 2, 4, 6, 16, 28, 46, 82, 88, 106, 180, 198, 210, 228, 238, 276, 312, 352, 430, 442, 466, 498, 540, 556, 568, 600, 616, 690, 732, 738, 742, 760, 768, 772, 786, 810, 856, 928, 936, 952, 966, 996, 1038, 1150, 1152
Offset: 1
Keywords
Links
- Ely Golden, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A070689 (the similar sequence for n+1 and n^2+1)
Programs
-
Mathematica
Select[Range@ 2000, Times @@ Boole@ Map[PrimeQ, {# + 1, #^4 + 1}] == 1 &] (* Michael De Vlieger, Dec 13 2016 *) Select[Range[2000],AllTrue[1+{#,#^4},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 13 2019 *)
-
PARI
list(lim)=my(v=List()); forprime(p=2,lim+1, if(isprime(1+(p-1)^4), listput(v, p-1))); Vec(v) \\ Charles R Greathouse IV, Dec 13 2016
-
SageMath
c=1 index=1 while(index<=1000): if((is_prime(c+1))&(is_prime(c**4+1))): print(str(index)+" "+str(c)) index+=1 c+=1 print("complete")
Formula
a(n) >> n log^2 n. - Charles R Greathouse IV, Dec 13 2016
Comments