login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n), in decimal base, is the number of numbers k >= 0 with no more digits than n such that k + n can be computed without carry.
2

%I #16 Jan 22 2018 03:05:22

%S 1,9,8,7,6,5,4,3,2,1,90,81,72,63,54,45,36,27,18,9,80,72,64,56,48,40,

%T 32,24,16,8,70,63,56,49,42,35,28,21,14,7,60,54,48,42,36,30,24,18,12,6,

%U 50,45,40,35,30,25,20,15,10,5,40,36,32,28,24,20,16,12,8

%N a(n), in decimal base, is the number of numbers k >= 0 with no more digits than n such that k + n can be computed without carry.

%C We consider here that 0 has no digit, and hence a(0) = 1.

%C The corresponding sequence for the binary base is A080100.

%H Rémy Sigrist, <a href="/A298372/b298372.txt">Table of n, a(n) for n = 0..9999</a>

%F a(0) = 1.

%F a(10 * k + d) = a(k) * (10 - d) when 10 * k + d > 0 and 0 <= d < 10.

%F a(n) = Product_{ d = 0..9 } (10 - d)^A100910(n, d) for any n > 0.

%e a(42) = (10 - 4) * (10 - 2) = 48.

%o (PARI) a(n, {base=10}) = my (d=digits(n, base)); prod(i=1, #d, base-d[i])

%Y Cf. A080100, A100910.

%K nonn,base

%O 0,2

%A _Rémy Sigrist_, Jan 18 2018