login
A120769
Starting from a(0)=1, recursively a(2^k+r) = (2^k-r)*a(2^k-1-r), 0<=r < 2^(k+1).
2
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, 36, 20, 4, 6, 2, 1, 32, 62, 180, 116, 560, 972, 364, 200, 1728, 3220, 8712, 5040, 1040, 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
OFFSET
0,3
LINKS
FORMULA
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).
a(2^j + k) = (2^j - k) * a(2^j - k - 1) for 0 <= k < 2^j. Robert Israel, Apr 20 2014
EXAMPLE
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.
MAPLE
M:= 14; # to get a(n) for n < 2^M
A:= [1]:
for iter from 1 to M do
A:= [op(A), seq(i*A[i], i=nops(A) .. 1, -1)];
od:
A; # note that as A is a list, A120769(n) = A[n+1]
# Robert Israel, Apr 20 2014
PROG
(Maxima) A120769(n) := block(
[nbase, nres],
if n <=1 then
return(1) ,
nbas : 2^floor(log(n)/log(2)) ,
nres : n-nbas ,
(nbas-nres)*A120769(nbas-1-nres)
)$
for n : 0 thru 80 do printf(true, "~d, ", A120769(n)) ; /* R. J. Mathar, Feb 23 2012 */
CROSSREFS
KEYWORD
nonn,easy,look
AUTHOR
Gary W. Adamson, Jul 03 2006
EXTENSIONS
New name and more terms added by R. J. Mathar, Feb 23 2012
STATUS
approved