login
Sums of 2 distinct powers of 10.
27

%I #14 Oct 18 2016 12:12:13

%S 11,101,110,1001,1010,1100,10001,10010,10100,11000,100001,100010,

%T 100100,101000,110000,1000001,1000010,1000100,1001000,1010000,1100000,

%U 10000001,10000010,10000100,10001000,10010000,10100000,11000000

%N Sums of 2 distinct powers of 10.

%H Reinhard Zumkeller, <a href="/A038444/b038444.txt">Table of n, a(n) for n = 1..10000</a>

%F G.f.: (10*x - 55*x^2 + Sum_{d>=1} (4*10^d+5)*x^((d^2-d)/2+1) - Sum_{d>=1} (445*10^(d-1)+5)*x^((d^2-d)/2+2))/(5*(1-x)*(1-10*x)). - _Robert Israel_, Oct 14 2016

%p seq(seq(10^d + 10^j, j=0..d-1), d=1..10); # _Robert Israel_, Oct 14 2016

%t Sort[Total/@Subsets[10^Range[0,7],{2}]] (* _Harvey P. Dale_, Apr 20 2012 *)

%o (Haskell)

%o a038444 n = a038444_list !! (n-1)

%o a038444_list = 11 : f [11] 90 where

%o f xs@(x:_) z = ys ++ f ys (10 * z) where

%o ys = (x + z) : map (* 10) xs

%o -- _Reinhard Zumkeller_, Jan 28 2015

%Y Subsequence of A052216.

%K nonn,easy

%O 1,1

%A _Olivier GĂ©rard_

%E Offset corrected by _Reinhard Zumkeller_, Jan 28 2015