OFFSET
0,2
COMMENTS
"next refactorable number" function.
EXAMPLE
a(0) = 1 because the least refactorable number > 0 is 1.
a(1) = 2 because the least refactorable number > 1 is 2.
a(2) = 8 because the least refactorable number > 2 is 8.
MATHEMATICA
a[n_] := Module[{m = n + 1}, While[! Divisible[m, DivisorSigma[0, m]], m++]; m]; a[0] = 1; Array[a, 100, 0] (* Amiram Eldar, Feb 20 2023 *)
PROG
(PARI) a(n) = my(k=n+1); while (k % numdiv(k), k++); k; \\ Michel Marcus, Feb 20 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Feb 20 2023
STATUS
approved