login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A032820 Numbers whose set of base-8 digits is {1,4}. 1
1, 4, 9, 12, 33, 36, 73, 76, 97, 100, 265, 268, 289, 292, 585, 588, 609, 612, 777, 780, 801, 804, 2121, 2124, 2145, 2148, 2313, 2316, 2337, 2340, 4681, 4684, 4705, 4708, 4873, 4876, 4897, 4900, 6217, 6220, 6241, 6244, 6409 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(1)=1, a(2)=4; a(n) = 8*a(floor(n/2))+1 for n odd, otherwise a(n) = 8*a(floor((n-1)/2))+4. - Bruno Berselli, May 28 2012
MATHEMATICA
Flatten[Table[FromDigits[#, 8]&/@Tuples[{1, 4}, n], {n, 9}]] (* Vincenzo Librandi, May 28 2012 *)
PROG
(Magma) [n: n in [1..7000] | Set(IntegerToSequence(n, 8)) subset {1, 4}]; // Vincenzo Librandi, May 28 2012
(Maxima) a[1]:1$ a[2]:4$ a[n]:= if oddp(n) then 8*a[floor(n/2)]+1 else 8*a[floor((n-1)/2)]+4$ makelist(a[n], n, 1, 43); /* Bruno Berselli, May 28 2012 */
CROSSREFS
Sequence in context: A287498 A359301 A174911 * A197615 A125848 A225752
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)