OFFSET
1,1
COMMENTS
Subsequence of A007535, see formula.
LINKS
Eric Chen, Table of n, a(n) for n = 1..4096
EXAMPLE
a(7) = 45 because the 7th prime is 17, and the smallest pseudoprime (> 17) to base 17 is 45.
MATHEMATICA
f[n_] := Block[{b = Prime[n], k = Prime[n] + 1}, While[PrimeQ[k] || PowerMod[b, k - 1, k] != 1, k++]; k]; Array[f, 60]
PROG
a(n) = for(k=prime(n)+1, 2^24, if(Mod(prime(n), k)^(k-1)==Mod(1, k) && !isprime(k), return(k)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric Chen, Feb 21 2015
STATUS
approved