

A227097


a(n) = n successive applications of the <*>(3,2) operator to 1.


1



1, 3, 9, 27, 61, 123, 349, 1007, 2021, 4043, 8089, 16187, 42481, 125363, 271029, 612067, 1234141, 3498383, 10087069, 20254147, 40558401, 81167203, 163394609, 429879827, 1268830461, 2745691323, 6196472949, 12499016807, 35407044421, 101221129243, 202643278689
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

x<*>(3,2) means that the number obtained from digits of x are alternatively multiplicated by 3 and by 2 from right to left (taking carries into account).
a(n) = (...(1<*>(3,2))<*>(3,2))...<*>(3,2) (n recursive applications of the <*>(3,2) operator.


LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..1000
V. Shevelev, Partition of multiplication


EXAMPLE

a(0) = 1 (no operation)
a(2) = 1*3
a(3) = (1*3)*3 = 9
a(4) = ((1*3)*3)*3 = 27
a(5) = (27)<*>(3,2) = [2*2,7*3] = 40 + 21 = 61
a(6) = (61)<*>(3,2) = [2*6,1*3] = 120+3 = 123


MAPLE

a:= proc(n) option remember; local i, m, r;
if n=0 then 1
else m, r:= a(n1), 0;
for i from 0 while m>0 do
r:= r +10^i *irem(m, 10, 'm') *(3irem(i, 2))
od; r
fi
end:
seq(a(n), n=0..40); # Alois P. Heinz, Jul 05 2013


MATHEMATICA

ShDM[n_, {a_, b_}] :=
Module[{ex = 0},
Plus @@
FoldList[(10^ex)*#2*{a, b}[[1 + Mod[ex++, 2]]] &, 0,
Reverse@IntegerDigits[n, 10]]];
NestList[ShDM[#, {3, 2}] &, 1, 25]


CROSSREFS

Sequence in context: A093546 A015955 A097803 * A201202 A260938 A274626
Adjacent sequences: A227094 A227095 A227096 * A227098 A227099 A227100


KEYWORD

nonn,base


AUTHOR

Vladimir Shevelev, Jul 01 2013


EXTENSIONS

Example, Mathematica program, extension and corrected definition by Olivier Gérard, Jul 05 2013


STATUS

approved



