login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Starting from a(0)=1, recursively a(2^k+r) = (2^k-r)*a(2^k-1-r), 0<=r < 2^(k+1).
2

%I #16 Jan 08 2018 01:58:29

%S 1,1,2,1,4,6,2,1,8,14,36,20,4,6,2,1,16,30,84,52,240,396,140,72,8,14,

%T 36,20,4,6,2,1,32,62,180,116,560,972,364,200,1728,3220,8712,5040,1040,

%U 1596,540,272,16,30,84,52,240,396,140,72,8,14,36,20,4,6,2,1,64,126,372,244,1200,2124,812,456

%N Starting from a(0)=1, recursively a(2^k+r) = (2^k-r)*a(2^k-1-r), 0<=r < 2^(k+1).

%H Robert Israel, <a href="/A120769/b120769.txt">Table of n, a(n) for n = 0..10000</a>

%F a(0) = 1; then compute (j+1)*a(j), j>=0, for each term in the current sequence; reverse the order of this block of new numbers and append the entire block to the current sequence (repeat).

%F a(2^j + k) = (2^j - k) * a(2^j - k - 1) for 0 <= k < 2^j. _Robert Israel_, Apr 20 2014

%e a(0) = a(1) = 1, then perform the dot product of (1, 2) and (1, 1) getting (1, 2). We reverse (1, 2) getting (2, 1) which we append to the right of the current string (1, 1), getting (1, 1, 2, 1) for a(1) through a(4). Next, perform the dot product of (1, 2, 3, 4) and (1, 1, 2, 1) getting (1, 2, 6, 4) which we reverse, = (4, 6, 2, 1). Append to the current string (1, 1, 2, 1), getting (1, 1, 2, 1, 4, 6, 2, 1) for a(1) through a(8). Continue with analogous operations.

%p M:= 14; # to get a(n) for n < 2^M

%p A:= [1]:

%p for iter from 1 to M do

%p A:= [op(A), seq(i*A[i],i=nops(A) .. 1, -1)];

%p od:

%p A; # note that as A is a list, A120769(n) = A[n+1]

%p # _Robert Israel_, Apr 20 2014

%o (Maxima) A120769(n) := block(

%o [nbase,nres],

%o if n <=1 then

%o return(1) ,

%o nbas : 2^floor(log(n)/log(2)) ,

%o nres : n-nbas ,

%o (nbas-nres)*A120769(nbas-1-nres)

%o )$

%o for n : 0 thru 80 do printf(true,"~d,",A120769(n)) ; /* _R. J. Mathar_, Feb 23 2012 */

%Y Cf. A120405, A120768, A120770.

%K nonn,easy,look

%O 0,3

%A _Gary W. Adamson_, Jul 03 2006

%E New name and more terms added by _R. J. Mathar_, Feb 23 2012