login

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”).

A322120
a(n) is the smallest composite k such that n^(k-1) == 1 (mod (n^2-1)*k).
1
341, 91, 91, 217, 481, 25, 65, 91, 91, 133, 133, 85, 781, 341, 91, 91, 25, 49, 671, 221, 169, 91, 553, 217, 133, 121, 361, 341, 49, 49, 25, 545, 703, 341, 403, 217, 85, 341, 121, 671, 529, 25, 703, 133, 133, 65, 481, 247, 793, 451, 671, 703, 361, 697, 403, 25
OFFSET
2,1
COMMENTS
a(n) >= A271801(n). All terms are odd and indivisible by 3.
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.
MATHEMATICA
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 *)
PROG
(PARI) a(n) = {forcomposite(k=1, , if (Mod(n, (n^2-1)*k)^(k-1) == 1, return (k)); ); } \\ Michel Marcus, Nov 28 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski, Nov 27 2018
EXTENSIONS
More terms from Amiram Eldar, Nov 27 2018
STATUS
approved