OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..182 (terms below 2^64)
Amiram Eldar, Table of n, a(n), (a(n)-1)/ord(2, a(n)) for n = 1..182
MATHEMATICA
pspQ[n_] := CompositeQ[n] && PowerMod[2, n - 1, n] == 1; seq[kmax_] := Module[{s = {}, r, rm = 0}, Do[If[pspQ[k], r = (k - 1)/MultiplicativeOrder[2, k]; If[r > rm, rm = r; AppendTo[s, k]]], {k, 1, kmax}]; s]; seq[10^6]
PROG
(PARI) ispsp(n) = n > 1 && n % 2 && Mod(2, n)^(n-1) == 1 && !isprime(n);
lista(kmax) = {my(r, rm = 0); for(k = 1, kmax, if(ispsp(k), r = (k-1)/znorder(Mod(2, k)); if(r > rm, rm = r; print1(k, ", ")))); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Nov 14 2023
STATUS
approved