OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
8 is a term since 8/f(8) = 4 is an integer and also 4/f(4) = 2 is an integer.
MATHEMATICA
fdigsum[n_] := Module[{k = n, m = 2, r, s = 0}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, s += r; m++]; s]; q[k_] := Module[{f = fdigsum[k]}, Divisible[k, f] && Divisible[k/f, fdigsum[k/f]]]; Select[Range[1000], q]
PROG
(PARI) fdigsum(n) = {my(k = n, m = 2, r, s = 0); while([k, r] = divrem(k, m); k != 0 || r != 0, s += r; m++); s; }
is(k) = {my(f = fdigsum(k)); !(k % f) && !((k/f) % fdigsum(k/f)); }
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Amiram Eldar, Oct 27 2024
STATUS
approved