OFFSET
1,2
COMMENTS
For any n > 1 in this sequence, (n+1)*(n^4+1) has the same nonzero digits as its prime factors in base n. - Ely Golden, Dec 12 2016
LINKS
Ely Golden, Table of n, a(n) for n = 1..1000
FORMULA
a(n) >> n log^2 n. - Charles R Greathouse IV, Dec 13 2016
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 *)
PROG
(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")
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Ely Golden, Dec 12 2016
STATUS
approved