login
A090085
Smallest odd pseudoprimes to base n exceeding n (like A007535 but with smallest odd terms instead of few even ones).
17
9, 341, 91, 15, 217, 35, 25, 9, 91, 33, 15, 65, 21, 15, 341, 51, 45, 25, 45, 21, 55, 69, 33, 25, 39, 27, 65, 45, 35, 49, 49, 33, 85, 35, 51, 91, 45, 39, 95, 91, 105, 205, 77, 45, 133, 133, 65, 49, 75, 51, 65, 85, 65, 55, 63, 57, 65, 133, 87, 341, 91, 63, 341, 65, 133, 91, 85
OFFSET
1,1
MATHEMATICA
ds[x_, b_] := Mod[ -1+b^(x-1), x] a[n_] := Block[{m=1, s=ds[m, n]}, While[(s !=0||PrimeQ[m])||Equal[m, 1] ||!Greater[m, n]||EvenQ[m], m++ ]; m]; t=Table[a[n], {n, 1, 256}]
PROG
(PARI) a(n)=my(k=n+if(n%2, 2, 1)); while(Mod(n, k)^(k-1)!=1 || isprime(k), k+=2); k \\ Charles R Greathouse IV, Apr 12 2012
CROSSREFS
Cf. A007535.
Sequence in context: A244503 A152553 A090087 * A098650 A354689 A098652
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 25 2003
STATUS
approved