A321475 Zeroless factorials (version 2): a(0) = 1, and for any n > 0, a(n) = noz(1 * noz(2 * ... * noz((n-1) * n))), where noz(n) = A004719(n) omits the zeros from n.
1, 1, 2, 6, 24, 12, 72, 54, 432, 3888, 3888, 399168, 576, 82728, 879912, 2397168, 337968, 5924736, 8851949568, 143936352, 31644, 92589264, 118459638, 3698784, 1197539136, 2387625984, 954864, 236271168, 3573339984, 238453776, 69587928, 142275168, 33566976
Offset: 0
Examples
For n = 12: - noz(11 * 12) = noz(132) = 132, - noz(10 * 132) = noz(1320) = 132, - noz(9 * 132) = noz(1188) = 1188, - noz(8 * 1188) = noz(9504) = 954, - noz(7 * 954) = noz(6678) = 6678, - noz(6 * 6678) = noz(40068) = 468, - noz(5 * 468) = noz(2340) = 234, - noz(4 * 234) = noz(936) = 936, - noz(3 * 936) = noz(2808) = 288, - noz(2 * 288) = noz(576) = 576, - noz(1 * 576) = noz(576) = 576, - hence a(12) = 576.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..10000
Programs
-
Mathematica
noz[n_] := FromDigits[DeleteCases[IntegerDigits[n], 0]]; A321475[n_] := If[n == 0, 1, Block[{k = n}, Nest[noz[--k * #] &, n, n-1]]]; Array[A321475, 50, 0] (* Paolo Xausa, May 20 2024 *)
-
PARI
a(n, base=10) = my (f=max(1, n)); forstep (k=n-1, 2, -1, f = fromdigits(select(sign, digits(f*k, base)), base)); f
Formula
a(10^k) = a(10^k - 1) for any k >= 0.
Comments