OFFSET
1,1
COMMENTS
MAPLE
for k from 2 to 10^6 do
if numtheory:-issqrfree(k) then
ps := numtheory:-factorset(k);
n := nops(ps);
if not assigned(A[n]) and andmap(p -> p &^ k -p mod k = 0, ps) then
A[n] := k;
end if
end if;
end do:
seq(A[i], i=1..max(map(op, [indices(A)]))); # Robert Israel, Feb 11 2018
MATHEMATICA
With[{s = Select[Range[10^6], Function[k, AllTrue[FactorInteger[k][[All, 1]], PowerMod[#, k, k] == Mod[#, k] &]]]}, Select[Table[SelectFirst[s, PrimeOmega@ # == n &], {n, 5}], IntegerQ]] (* Michael De Vlieger, Feb 20 2018 *)
CROSSREFS
KEYWORD
nonn,more,hard
AUTHOR
Thomas Ordowski, Feb 11 2018
EXTENSIONS
a(7)-a(8) from Daniel Suteu, Feb 06 2023
a(9) from Michael S. Branicky, Aug 03 2023
STATUS
approved