OFFSET
1,1
COMMENTS
Corresponding Fermat pseudoprimes to base 2 are 1729, 46657, 2628073, 19683001, 162771337, 110592000001, 432081216001, ...
There is only one composite term up to 10^10: 14701. It also appears in A265628 (see comments). Can we say that if there is a Fermat pseudoprime to base 2 of the form (k-1)^3 + 1, k is a prime number most of the time? Are there other composite terms like 14701?
FORMULA
a(n) = A270840(n) + 1.
EXAMPLE
13 is a term because (13-1)^3 + 1 = 1729, which is a Fermat pseudoprime to base 2.
37 is a term because (37-1)^3 + 1 = 46657, which is a Fermat pseudoprime to base 2.
MATHEMATICA
Select[Range[10^6], ! PrimeQ@ # && PowerMod[2, (# - 1), #] == 1 &@((# - 1)^3 + 1) &] (* Michael De Vlieger, Dec 12 2015, after Farideh Firoozbakht at A001567 *)
PROG
(PARI) is(n) = {Mod(2, n)^n==2 & !isprime(n) & n>1};
for(n=1, 1e10, if(is((n-1)^3+1), print1(n, ", ")));
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Dec 12 2015
STATUS
approved