login
A090087
Smallest odd pseudoprimes to base n, not necessarily exceeding n. Compare with A007535 and A090086.
5
9, 341, 91, 15, 217, 35, 25, 9, 91, 9, 15, 65, 21, 15, 341, 15, 9, 25, 9, 21, 55, 21, 33, 25, 39, 9, 65, 9, 15, 49, 15, 25, 85, 15, 9, 35, 9, 39, 95, 39, 15, 205, 21, 9, 133, 9, 65, 49, 15, 21, 25, 51, 9, 55, 9, 15, 25, 57, 15, 341, 15, 9, 341, 9, 33, 65, 33, 25, 35, 69, 9, 85, 9, 15
OFFSET
1,1
LINKS
FORMULA
a(n)=Min{x=odd number; Mod[ -1+n^(x-1), x]=0}
MATHEMATICA
a[n_] := Module[{k = 1}, While[GCD[n, k] > 1 || PrimeQ[k] || PowerMod[n, k - 1, k] != 1, k += 2]; k]; Array[a, 100] (* Amiram Eldar, Nov 11 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 25 2003
STATUS
approved