OFFSET
1,2
COMMENTS
There are 9000 numbers with 4 decimal digits, the smallest being 1000 and the largest 9999.
FORMULA
G.f.: (x-x^10)/(1-x)*((1-x^10)/(1-x))^3. - Geoffrey Critzer, Feb 09 2014
EXAMPLE
a(2)=4: 1001, 1010, 1100, 2000.
MATHEMATICA
nn=36; Drop[CoefficientList[Series[(x-x^10)/(1-x)(1-x^10)^3/(1-x)^3, {x, 0, nn}], x], 1] (* Geoffrey Critzer, Feb 09 2014 *)
PROG
(PARI) b=vector(36, i, 0); for(n=1000, 9999, a=eval(Vec(Str(n))); b[sum(j=1, 4, a[j])]++); for(n=1, 36, print1(b[n], ", ")) - Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 19 2006
CROSSREFS
KEYWORD
base,fini,full,nonn
AUTHOR
Hugo Pfoertner, Jan 12 2004
STATUS
approved