OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
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_] := q[k] = Module[{f = fdigsum[k]}, Divisible[k, f] && Divisible[k/f, fdigsum[k/f]]]; Select[Range[2*10^6], q[#] && q[#+1] &]
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; }
is1(k) = {my(f = fdigsum(k)); !(k % f) && !((k/f) % fdigsum(k/f)); }
lista(kmax) = {my(q1 = is1(1), q2); for(k = 2, kmax, q2 = is1(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2); }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Oct 29 2024
STATUS
approved