login
a(2*n) = 10*a(n), a(2*n+1) = a(n) + a(n+1).
7

%I #9 Jan 31 2019 08:05:05

%S 1,10,11,100,21,110,111,1000,121,210,131,1100,221,1110,1111,10000,

%T 1121,1210,331,2100,341,1310,1231,11000,1321,2210,1331,11100,2221,

%U 11110,11111,100000,11121,11210,2331,12100,1541,3310,2431,21000,2441,3410,1651,13100,2541,12310,12231,110000,12321,13210

%N a(2*n) = 10*a(n), a(2*n+1) = a(n) + a(n+1).

%C Equals row 10 in the array of A178568.

%C Polcoeff f(x)= (1 + 10x + 11x^2 + ...) satisfies f(x)/f(x^2) = (1 +10*x + x^2).

%C Let q(x) = (1 + 10*x + x^2). Then polcoeff f(x) = q(x) * q(x^2) * q(x^4) * q(x^8) * ...

%C The sequence mod 10 = (1, 0, 1, 0, 1, 0,...)

%H G. C. Greubel, <a href="/A178569/b178569.txt">Table of n, a(n) for n = 1..5000</a>

%F a(2*n) = 10*a(n), a(2*n+1) = a(n) + a(n+1). Let M = an infinite lower triangular matrix with (1, 10, 1, 0, 0, 0,...) in each column; with each column >1 shifted down twice from the previous column. Then A178570 = Lim_{n->inf} M^n, the left-shifted vector considered as a sequence.

%e a(6) = 110 = 10*a(5) = 10*11.

%e a(7) = 111 = a(3) + a(4) = 111 + 100.

%p A178569 := proc(n)

%p option remember;

%p if n <= 2 then

%p 10^(n-1);

%p elif type(n,'even') then

%p 10*procname(n/2);

%p else

%p procname((n-1)/2)+procname((n+1)/2) ;

%p end if;

%p end proc: # _R. J. Mathar_, Jul 21 2015

%t a[1]=1; a[2]=10; a[n_]:= a[n]= If[OddQ@n, a[(n-1)/2] + a[(n+1)/2], 10*a[n/2]]; Array[a, 50] (* _G. C. Greubel_, Jan 30 2019 *)

%Y Cf. A178568.

%K nonn

%O 1,2

%A _Gary W. Adamson_, May 29 2010