A242622 a(n) = number of numbers with digit sum n, not greater than the n-th repunit (cf. A052222).
1, 1, 2, 6, 21, 77, 287, 1079, 4082, 15522, 59271, 227131, 873051, 3364827, 12998867, 50321075, 195162350, 758156366, 2949614789, 11490869489, 44819531180, 175009397380, 684059403670, 2676260628574, 10479320689274, 41065736472890, 161043272100440, 631974335773536
Offset: 0
Links
- Jens Kruse Andersen, Table of n, a(n) for n = 0..100
Programs
-
Haskell
a242622 = length . a242614_row
-
PARI
\\ c[x,y] = #numbers < 10^x with digit sum y-1. m=50; c=matrix(m,m+1); for(x=1, m, for(y=1, m+1, c[x,y]=sum(d=0, min(9,y-1), if(x>1, c[x-1,y-d], d==y-1)))); for(n=0, m, print1(1+sum(i=2, n, c[i-1,i+1])", ")); \\ Jens Kruse Andersen, Jul 17 2014
Extensions
More terms from Jens Kruse Andersen, Jul 17 2014
Comments