login
A032818
Numbers whose set of base-6 digits is {1,4}.
1
1, 4, 7, 10, 25, 28, 43, 46, 61, 64, 151, 154, 169, 172, 259, 262, 277, 280, 367, 370, 385, 388, 907, 910, 925, 928, 1015, 1018, 1033, 1036, 1555, 1558, 1573, 1576, 1663, 1666, 1681, 1684, 2203, 2206, 2221, 2224, 2311, 2314, 2329
OFFSET
1,2
FORMULA
a(1)=1, a(2)=4; a(n) = 6*a(floor(n/2))+1 for n odd, otherwise a(n) = 6*a(floor((n-1)/2))+4. - Bruno Berselli, May 28 2012
MATHEMATICA
Flatten[Table[FromDigits[#, 6]&/@Tuples[{1, 4}, n], {n, 5}]] (* Vincenzo Librandi, May 27 2012 *)
PROG
(Magma) [n: n in [1..3000] | Set(IntegerToSequence(n, 6)) subset {1, 4}]; // Vincenzo Librandi, May 27 2012
(Maxima) a[1]:1$ a[2]:4$ a[n]:= if oddp(n) then 6*a[floor(n/2)]+1 else 6*a[floor((n-1)/2)]+4$ makelist(a[n], n, 1, 45); /* Bruno Berselli, May 28 2012 */
CROSSREFS
Sequence in context: A296309 A376884 A182278 * A123986 A294914 A371458
KEYWORD
nonn,base,easy
STATUS
approved