Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #13 Jan 27 2019 09:25:48
%S 341,91,91,217,481,25,65,91,91,133,133,85,781,341,91,91,25,49,671,221,
%T 169,91,553,217,133,121,361,341,49,49,25,545,703,341,403,217,85,341,
%U 121,671,529,25,703,133,133,65,481,247,793,451,671,703,361,697,403,25
%N a(n) is the smallest composite k such that n^(k-1) == 1 (mod (n^2-1)*k).
%C a(n) >= A271801(n). All terms are odd and indivisible by 3.
%C Conjecture: if m is a composite number such that b^(m-1) == 1 (mod (b^2-1)m) for some b, then m is a strong pseudoprime to some base a in the range 2 <= a <= m-2. Thus, probably every term a(n) is in A181782.
%t a[n_] := Module[{k=4}, While[PrimeQ[k] || !Divisible[n^(k-1)-1, (n^2-1)k], k++]; k]; Array[a, 100, 2] (* _Amiram Eldar_, Nov 27 2018 *)
%o (PARI) a(n) = {forcomposite(k=1, ,if (Mod(n, (n^2-1)*k)^(k-1) == 1, return (k)););} \\ _Michel Marcus_, Nov 28 2018
%Y Cf. A181782, A271801, A298756, A322121.
%K nonn
%O 2,1
%A _Thomas Ordowski_, Nov 27 2018
%E More terms from _Amiram Eldar_, Nov 27 2018