A034876 Number of ways to write n! as a product of smaller factorials each greater than 1.
0, 0, 0, 1, 0, 1, 0, 1, 1, 2, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Examples
a(10) = 2 because 10! = 3! * 5! * 7! = 6! * 7! are the only two ways to write 10! as a product of smaller factorials > 1. From _Antti Karttunen_, Dec 25 2018: (Start) a(8) = 1 because 8! = 7! * (2!)^3. a(9) = 1 because 9! = 7! * 3! * 3! * 2!. a(16) = 2 because 16! = 15! * (2!)^4 = 14! * 5! * 2!. a(144) = 2 because 144! = 143! * 4! * 3! = 143! * 3! * 3! * 2! * 2!. a(576) = 3 because 576! = 575! * 4! * 4! = 575! * 4! * 3! * 2! * 2! = 575! * 3! * 3! * 2! * 2! * 2! * 2!. a(720) = 2 because 720! = 719! * 6! = 719! * 5! * 3!. a(3456) = 3 because 3456! = 3455! * 4! * 4! * 3! = 3455! * 4! * 3! * 3! * 2! * 2! = 3455! * 3! * 3! * 3! * 2! * 2! * 2! * 2!. (End)
References
- R. K. Guy, Unsolved Problems in Number Theory, B23.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..69120
- Eric Weisstein's World of Mathematics, Factorial Products
- Index entries for sequences related to factorial numbers
Programs
-
PARI
A034876aux(n, m, p) = if(1==n, 1, my(s=0); forstep(i=m, p, -1, my(f=i!); if(!(n%f), s += A034876aux(n/f, i, 2))); (s)); A034876(n) = if(1==n,0,A034876aux(n!, n-1, precprime(n))); \\ (Slow) - Antti Karttunen, Dec 24 2018
-
PARI
A322583aux(n, m) = if(1==n, 1, my(s=0); for(i=2, oo, my(f=i!); if(f>m, return(s)); if(!(n%f), s += A322583aux(n/f, f)))); memoA322583 = Map(); A322583(n) = { my(c); if(mapisdefined(memoA322583,n,&c), c, c = A322583aux(n,n); mapput(memoA322583,n,c); (c)); }; A034876aux(n, m, p) = if(1==n, 1, my(s=0); forstep(i=m, p, -1, my(f=i!); s += A322583(n/f)); (s)); A034876(n) = if(1==n, 0, A034876aux(n!, n-1, precprime(n))); \\ Antti Karttunen, Dec 25 2018
Formula
a(1) = 0; for n > 1, a(n) = Sum_{x=A007917(n)..n-1} A322583(n!/x!) when n is a composite, and a(n) = 0 when n is a prime. - Antti Karttunen, Dec 25 2018
Extensions
Corrected by Jonathan Sondow, Dec 18 2004
Comments