login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A071692 Number of ways to write n as n = x! + y! + z! where 0<=x<=y<=z<=n. 1

%I #25 Jul 28 2015 08:56:26

%S 0,0,0,4,3,2,1,0,3,2,1,0,0,2,1,0,0,0,1,0,0,0,0,0,0,0,3,2,1,0,0,2,1,0,

%T 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,

%U 0,0,0,0,1,0,0,0,0,0,0,0,0

%N Number of ways to write n as n = x! + y! + z! where 0<=x<=y<=z<=n.

%C If a(n) > 1 then a(n+1) = a(n) - 1.

%C If A034968(n) > 3 then a(n) = 0. - _David A. Corneth_, Jul 27 2015

%H David A. Corneth, <a href="/A071692/b071692.txt">Table of n, a(n) for n = 0..10000</a>

%p M:= 5: # for a(0) to a((M+1)!-1), where M >= 3

%p N:= (M+1)!-1:

%p A:= Array(0..N):

%p for x from 0 to M do for y from x to M do for z from y to M do

%p r:= x!+y!+z!;

%p A[r]:= A[r]+1;

%p od od od:

%p seq(A[i],i=0..N); # _Robert Israel_, Jul 27 2015

%o (PARI) for(n=1,80,print1(sum(a=0,n,sum(b=0,a,sum(c=0,b,if(a!+b!+c!-n,0,1)))),","))

%o (PARI) a(n) = {my(f=1, t=0);while((f+1)!<=n,f++);forvec(u=vector(3,i,[0,f]),t+=(sum(i=1,3,u[i]!)==n),1);t} \\ _David A. Corneth_, Jul 27 2015

%Y Cf. A034968.

%K easy,nonn

%O 0,4

%A _Benoit Cloitre_, Jun 23 2002

%E a(0)=0 prepended by _David A. Corneth_, Jul 28 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 18:20 EDT 2024. Contains 371781 sequences. (Running on oeis4.)