login
Smallest odd pseudoprimes to base n, not necessarily exceeding n. Compare with A007535 and A090086.
5

%I #7 Nov 11 2019 04:33:25

%S 9,341,91,15,217,35,25,9,91,9,15,65,21,15,341,15,9,25,9,21,55,21,33,

%T 25,39,9,65,9,15,49,15,25,85,15,9,35,9,39,95,39,15,205,21,9,133,9,65,

%U 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

%N Smallest odd pseudoprimes to base n, not necessarily exceeding n. Compare with A007535 and A090086.

%H Amiram Eldar, <a href="/A090087/b090087.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n)=Min{x=odd number; Mod[ -1+n^(x-1), x]=0}

%t 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 *)

%Y Cf. A007535, A090986, A090088, A090089.

%K nonn

%O 1,1

%A _Labos Elemer_, Nov 25 2003