login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A377385
Factorial-base Niven numbers (A118363) k such that k/f(k) is also a factorial-base Niven number, where f(k) = A034968(k) is the sum of digits in the factorial-base representation of k.
6
1, 2, 4, 6, 8, 12, 16, 18, 24, 27, 36, 40, 48, 54, 72, 80, 96, 108, 120, 135, 144, 168, 175, 180, 192, 208, 210, 240, 280, 288, 336, 360, 384, 420, 432, 468, 480, 490, 572, 576, 594, 600, 630, 720, 732, 740, 750, 780, 784, 819, 840, 846, 861, 864, 888, 900, 924, 936, 945, 980, 984
OFFSET
1,2
LINKS
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
Subsequence of A118363.
Subsequences: A000142, A377386.
Analogous sequences: A376616 (binary), A377209 (Zeckendorf).
Sequence in context: A060765 A140110 A128397 * A120383 A324842 A055932
KEYWORD
nonn,easy,base
AUTHOR
Amiram Eldar, Oct 27 2024
STATUS
approved