login
Expansion of (1+x)^2/((1-x)*(1-10*x^2)).
1

%I #20 Jun 13 2015 00:51:21

%S 1,3,14,34,144,344,1444,3444,14444,34444,144444,344444,1444444,

%T 3444444,14444444,34444444,144444444,344444444,1444444444,3444444444,

%U 14444444444,34444444444,144444444444,344444444444,1444444444444

%N Expansion of (1+x)^2/((1-x)*(1-10*x^2)).

%C The digital sum of the n-th term is 2n+1.

%C a(n) = floor(10^floor(n/2)*(2-(-1)^n+4/9)) = 1,3,14,34,144,344,... (i.e. 2-(-1)^n = 1 for even n, 3 for odd n, followed by floor(n/2) digits '4'.) - _M. F. Hasler_

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,10,-10).

%F a(n) = 10^(n/2)*( 31*sqrt(10)/180 +13/18 -(31*sqrt(10)/180-13/18)*(-1)^n )-4/9.

%F a(n) = (13*b(n)+31*b(n-1)-4)/9 with b(n) = 1,0,10,0,100,0,1000,.. (aerated A011557) [_R. J. Mathar_, Nov 26 2010]

%e (x^2 + 2*x + 1)/(10*x^3 - 10*x^2 - x + 1) = 1 + 3*x + 14*x^2 + 34*x^3 + 144*x^4 + 344*x^5 + 1444*x^6 + 3444*x^7 + 14444*x^8 + ...

%p A011557aer := proc(n) if type(n,'odd') then 0 ; else 10^(n/2) ; end if; end proc:

%p A094627 := proc(n) (13*A011557aer(n)+31*A011557aer(n-1)-4)/9 ; end proc:

%p seq(A094627(n),n=0..10) ; # _R. J. Mathar_, Nov 16 2010

%t sr[n_,nn_]:=Table[FromDigits[PadRight[{n},i,4]],{i,nn}]; With[{nn=20}, Sort[ Join[ sr[ 1,nn],sr[3,nn]]]] (* _Harvey P. Dale_, May 25 2014 *)

%Y Cf. A094626.

%K easy,nonn

%O 0,2

%A _Paul Barry_, May 15 2004

%E Swapped the generic comment and the specific definition; added Maple prog.