OFFSET
0,2
LINKS
Bryan Wolf, Table of n, a(n) for n = 0..10000
Bryan Wolf, C++ program for generating n, a(n)
FORMULA
h(d,n,x) = h(d-1,n-x^2,x) + h(d-1,n-(x+1)^2,x+1) + ... + h(n-1,n-9^2,9) where h() is the number of d-digit long happy numbers with digits in nondecreasing order,
n is the sum of the squares of the digits in the happy numbers, and x is the lowest digit in the happy numbers.
a(n) is the sum of all h(d,0 <= x <= 81*d, 1), where x is a happy number.
EXAMPLE
h(0, 0, 1 <= x <= 9) = 1,
h(d, n, x) = 0 for all n < 0,
h(d, n, x) = 0 for all n > 81*d.
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Bryan Wolf, Nov 30 2012
STATUS
approved