login
A377386
Factorial-base Niven numbers (A118363) k such that m = k/f(k) and m/f(m) are also factorial-base Niven numbers, where f(k) = A034968(k) is the sum of digits in the factorial-base representation of k.
4
1, 2, 4, 6, 8, 12, 16, 18, 24, 36, 40, 48, 54, 72, 80, 96, 108, 120, 135, 144, 180, 192, 240, 280, 288, 360, 384, 432, 480, 576, 594, 600, 720, 840, 864, 1200, 1215, 1225, 1296, 1344, 1440, 1680, 1728, 1800, 2160, 2240, 2352, 2400, 2520, 2592, 2704, 2730, 2880, 3000
OFFSET
1,2
LINKS
EXAMPLE
16 is a term since 16/f(16) = 4 is an integer, 4/f(4) = 2 is an integer, and 2/f(2) = 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], f2, m, n}, IntegerQ[m = k/f] && Divisible[m, f2 = fdigsum[m]] && Divisible[n = m/f2, fdigsum[n]]]; Select[Range[3000], 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), f2, m); if(k % f, return(0)); m = k/f; f2 = fdigsum(m); !(m % f2) && !((m/f2) % fdigsum(m/f2)); }
CROSSREFS
Subsequence of A118363 and A377385.
A000142 is a subsequence.
Analogous sequences: A376617 (binary), A377210 (Zeckendorf).
Sequence in context: A333978 A007694 A322492 * A332276 A317246 A279686
KEYWORD
nonn,easy,base
AUTHOR
Amiram Eldar, Oct 27 2024
STATUS
approved