login
A032825
Numbers whose set of base-13 digits is {1,4}.
1
1, 4, 14, 17, 53, 56, 183, 186, 222, 225, 690, 693, 729, 732, 2380, 2383, 2419, 2422, 2887, 2890, 2926, 2929, 8971, 8974, 9010, 9013, 9478, 9481, 9517, 9520, 30941, 30944, 30980, 30983, 31448, 31451, 31487, 31490, 37532, 37535
OFFSET
1,2
FORMULA
a(1)=1, a(2)=4; a(n) = 13*a(floor(n/2))+1 for n odd, otherwise a(n) = 13*a(floor((n-1)/2))+4. - Bruno Berselli, May 28 2012
MATHEMATICA
Flatten[Table[FromDigits[#, 13]&/@Tuples[{1, 4}, n], {n, 5}]] (* Vincenzo Librandi, May 28 2012 *)
PROG
(Magma) [n: n in [1..38000] | Set(IntegerToSequence(n, 13)) subset {1, 4}]; // Vincenzo Librandi, May 28 2012
(Maxima) a[1]:1$ a[2]:4$ a[n]:= if oddp(n) then 13*a[floor(n/2)]+1 else 13*a[floor((n-1)/2)]+4$ makelist(a[n], n, 1, 40); /* Bruno Berselli, May 28 2012 */
CROSSREFS
Sequence in context: A044967 A298126 A011859 * A251966 A022383 A336634
KEYWORD
nonn,base,easy
STATUS
approved