OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
FORMULA
a(1)=3, a(2)=4; a(n) = 5*a(floor(n/2))+3 for n odd, otherwise a(n) = 5*a(floor((n-1)/2))+4. - Bruno Berselli, May 30 2012
MATHEMATICA
Flatten[Table[FromDigits[#, 5]&/@Tuples[{3, 4}, n], {n, 5}]] (* Vincenzo Librandi, May 29 2012 *)
PROG
(Magma) [n: n in [1..2800] | Set(IntegerToSequence(n, 5)) subset {3, 4}]; // Vincenzo Librandi, May 29 2012
(Maxima) a[1]:3$ a[2]:4$ a[n]:= if oddp(n) then 5*a[floor(n/2)]+3 else 5*a[floor((n-1)/2)]+4$ makelist(a[n], n, 1, 45); /* Bruno Berselli, May 30 2012 */
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved