%I #8 Oct 28 2024 09:35:00
%S 1,2,4,6,8,12,16,18,24,36,40,48,54,72,80,96,108,120,135,144,180,192,
%T 240,280,288,360,384,432,480,576,594,600,720,840,864,1200,1215,1225,
%U 1296,1344,1440,1680,1728,1800,2160,2240,2352,2400,2520,2592,2704,2730,2880,3000
%N 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.
%H Amiram Eldar, <a href="/A377386/b377386.txt">Table of n, a(n) for n = 1..10000</a>
%e 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.
%t 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]
%o (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;}
%o 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)); }
%Y Subsequence of A118363 and A377385.
%Y A000142 is a subsequence.
%Y Cf. A034968, A377384.
%Y Analogous sequences: A376617 (binary), A377210 (Zeckendorf).
%K nonn,easy,base
%O 1,2
%A _Amiram Eldar_, Oct 27 2024