login
A032824
Numbers whose set of base-12 digits is {1,4}.
1
1, 4, 13, 16, 49, 52, 157, 160, 193, 196, 589, 592, 625, 628, 1885, 1888, 1921, 1924, 2317, 2320, 2353, 2356, 7069, 7072, 7105, 7108, 7501, 7504, 7537, 7540, 22621, 22624, 22657, 22660, 23053, 23056, 23089, 23092, 27805, 27808
OFFSET
1,2
FORMULA
a(1)=1, a(2)=4; a(n) = 12*a(floor(n/2))+1 for n odd, otherwise a(n) = 12*a(floor((n-1)/2))+4. - Bruno Berselli, May 28 2012
MATHEMATICA
Select[Range[30000], MemberQ[{{1}, {4}, {1, 4}}, Union[ IntegerDigits [#, 12]]]&] (* Harvey P. Dale, Apr 02 2011 *)
Flatten[Table[FromDigits[#, 12]&/@Tuples[{1, 4}, n], {n, 5}]] (* Vincenzo Librandi, May 28 2012 *)
PROG
(Magma) [n: n in [1..28000] | Set(IntegerToSequence(n, 12)) subset {1, 4}]; // Vincenzo Librandi, May 28 2012
(Maxima) a[1]:1$ a[2]:4$ a[n]:= if oddp(n) then 12*a[floor(n/2)]+1 else 12*a[floor((n-1)/2)]+4$ makelist(a[n], n, 1, 40); /* Bruno Berselli, May 28 2012 */
CROSSREFS
Sequence in context: A301965 A191135 A268524 * A367326 A246145 A107462
KEYWORD
nonn,base,easy
STATUS
approved