%I #6 Mar 30 2012 18:39:02
%S 0,0,0,5,4,3,2,1,4,3,2,1,0,3,2,1,0,0,2,1,0,0,0,1,0,0,4,3,2,1,0,3,2,1,
%T 0,0,2,1,0,0,0,1,0,0,0,0,0,0,0,3,2,1,0,0,2,1,0,0,0,1,0,0,0,0,0,0,0,0,
%U 0,0,0,0,2,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
%N Number of ways to write n as n = x!+y!+z!+t! with 0<=x<=y<=z<=t<=n.
%C If a(n) > 1, a(n+1) = a(n)  1.
%C Since numbers of the form n! are rare, sequence behaves quite regularly.  Lambert Klasen (lambert.klasen(AT)gmx.de), Dec 23 2004
%o (PARI) for(n=1,54,print1(sum(a=0,n,sum(b=0,a,sum(c=0,b,sum(d=0,c,if(a!+b!+c!+d!n,0,1))))),","))
%K easy,nonn
%O 1,4
%A _Benoit Cloitre_, Jun 23 2002
%E More terms from Lambert Klasen (lambert.klasen(AT)gmx.de), Dec 23 2004
