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!)
A032925 Numbers whose set of base-4 digits is a subset of {1,2}. 10
1, 2, 5, 6, 9, 10, 21, 22, 25, 26, 37, 38, 41, 42, 85, 86, 89, 90, 101, 102, 105, 106, 149, 150, 153, 154, 165, 166, 169, 170, 341, 342, 345, 346, 357, 358, 361, 362, 405, 406, 409, 410, 421, 422, 425, 426, 597, 598, 601, 602, 613, 614, 617, 618, 661, 662, 665 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Intersection of A023705 and A023717; A179888 is the intersection of this sequence and A053754. - Reinhard Zumkeller, Jul 31 2010
LINKS
FORMULA
a(2n) = 4a(n-1) + 2, a(2n+1) = 4a(n) + 1. - Ralf Stephan, Oct 07 2003, corrected by R. J. Mathar, Sep 07 2016
MAPLE
A032925 := proc(n)
option remember;
if n <= 2 then
n;
else
if type(n, 'even') then
2+4*procname(n/2-1) ;
else
1+4*procname(floor(n/2)) ;
end if;
end if;
end proc:
seq(A032925(n), n=1..100) ; # R. J. Mathar, Sep 07 2016
MATHEMATICA
Flatten[Table[FromDigits[#, 4]&/@Tuples[{1, 2}, n], {n, 5}]] (* Vincenzo Librandi, Jun 05 2012 *)
PROG
(Magma) [n: n in [1..1000] | Set(IntegerToSequence(n, 4)) subset {1, 2}]; // Vincenzo Librandi, Jun 05 2012
(Haskell)
import Data.List (transpose)
a032925 n = a032925_list !! (n-1)
a032925_list = 1 : 2 : (concat $ transpose [map (+ 1) fs, map (+ 2) fs])
where fs = map (* 4) a032925_list
-- Reinhard Zumkeller, Apr 18 2015
(C)
uint32_t a_next(uint32_t a_n) {
uint32_t t = (a_n + 0x55555556) ^ 0x55555555;
return (a_n - t) & t;
} /* Falk Hüffner, Jan 22 2022 */
CROSSREFS
Sequence in context: A078632 A309242 A122701 * A244749 A166087 A333545
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 11:21 EDT 2024. Contains 371936 sequences. (Running on oeis4.)