login
A032819
Numbers whose set of base-7 digits is {1,4}.
1
1, 4, 8, 11, 29, 32, 57, 60, 78, 81, 204, 207, 225, 228, 400, 403, 421, 424, 547, 550, 568, 571, 1429, 1432, 1450, 1453, 1576, 1579, 1597, 1600, 2801, 2804, 2822, 2825, 2948, 2951, 2969, 2972, 3830, 3833, 3851, 3854, 3977, 3980
OFFSET
1,2
FORMULA
a(1)=1, a(2)=4; a(n) = 7*a(floor(n/2))+1 for n odd, otherwise a(n) = 7*a(floor((n-1)/2))+4. - Bruno Berselli, May 28 2012
MATHEMATICA
Select[Range[4000], MemberQ[{{1}, {4}, {1, 4}}, Union[IntegerDigits[ #, 7]]]&] (* Harvey P. Dale, Apr 04 2011 *)
Flatten[Table[FromDigits[#, 7]&/@Tuples[{1, 4}, n], {n, 5}]] (* Vincenzo Librandi, May 28 2012 *)
PROG
(Magma) [n: n in [1..4000] | Set(IntegerToSequence(n, 7)) subset {1, 4}]; // Vincenzo Librandi, May 28 2012
(Maxima) a[1]:1$ a[2]:4$ a[n]:= if oddp(n) then 7*a[floor(n/2)]+1 else 7*a[floor((n-1)/2)]+4$ makelist(a[n], n, 1, 44); /* Bruno Berselli, May 28 2012 */
CROSSREFS
Sequence in context: A220753 A166550 A219747 * A181684 A126006 A164088
KEYWORD
nonn,base,easy
STATUS
approved