login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A179888 Starting with a(1)=2: if m is a term then also 4*m+1 and 4*m+2. 8
2, 9, 10, 37, 38, 41, 42, 149, 150, 153, 154, 165, 166, 169, 170, 597, 598, 601, 602, 613, 614, 617, 618, 661, 662, 665, 666, 677, 678, 681, 682, 2389, 2390, 2393, 2394, 2405, 2406, 2409, 2410, 2453, 2454, 2457, 2458, 2469, 2470, 2473, 2474, 2645, 2646, 2649 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

0 -> 01 and 1 -> 10 in binary representation of n;

intersection of A032925 and A053754;

subsequence of A063037;

A000120(a(n))=A023416(a(n))=A070939(n); A070939(a(n))=2*A070939(n).

LINKS

R. Zumkeller, Table of n, a(n) for n = 1..10000

Index entries for sequences related to binary expansion of n

Eric Weisstein's World of Mathematics, Quaternary

FORMULA

a(n) = 4*a(floor(n/2)) + n mod 2 + 1 for n>1;

a(n)=SUM((bit(k)+1)*4^k: 0<=k<=L), where bit() and L such that n=SUM(bit(k)*2^k: 0<=k<=L).

EXAMPLE

__ n | __ bin(n) || ___ bin(a(n)) | base-4(a(n)) | __ a(n)

-----|-----------||---------------|--------------|---------

.. 1 | ....... 1 || .......... 10 | .......... 2 | ..... 2;

.. 2 | ...... 10 || ........ 1001 | ......... 21 | ..... 9;

.. 3 | ...... 11 || ........ 1010 | ......... 22 | .... 10;

.. 4 | ..... 100 || ...... 100101 | ........ 211 | .... 37;

.. 5 | ..... 101 || ...... 100110 | ........ 212 | .... 38;

.. 6 | ..... 110 || ...... 101001 | ........ 221 | .... 41;

.. 7 | ..... 111 || ...... 101010 | ........ 222 | .... 42;

.. 8 | .... 1000 || .... 10010101 | ....... 2111 | ... 149;

.. 9 | .... 1001 || .... 10010110 | ....... 2112 | ... 150;

. 10 | .... 1010 || .... 10011001 | ....... 2121 | ... 153;

. 11 | .... 1011 || .... 10011010 | ....... 2122 | ... 154;

. 12 | .... 1100 || .... 10100101 | ....... 2211 | ... 165;

. 13 | .... 1101 || .... 10100110 | ....... 2212 | ... 166;

. 14 | .... 1110 || .... 10101001 | ....... 2221 | ... 169;

. 15 | .... 1111 || .... 10101010 | ....... 2222 | ... 170;

. 16 | ... 10000 || .. 1001010101 | ...... 21111 | ... 597;

. 17 | ... 10001 || .. 1001010110 | ...... 21112 | ... 598;

. 18 | ... 10010 || .. 1001011001 | ...... 21121 | ... 601;

. 19 | ... 10011 || .. 1001011010 | ...... 21122 | ... 602;

. 20 | ... 10100 || .. 1001100101 | ...... 21211 | ... 613.

MATHEMATICA

Union@ Flatten@ NestList[ {4 # + 1, 4 # + 2} &, 2, 5] (* Robert G. Wilson v, Aug 16 2011 *)

PROG

(Haskell)

a179888 n = a179888_list !! (n-1)

a179888_list = 2 : f a179888_list where

  f (x:xs) = x' : x'' : f (xs ++ [x', x'']) where x' = 4*x+1; x'' = x' + 1

-- Reinhard Zumkeller, Oct 29 2011

CROSSREFS

Cf. A132679, A196168.

Sequence in context: A290592 A058551 A119183 * A073082 A300129 A191401

Adjacent sequences:  A179885 A179886 A179887 * A179889 A179890 A179891

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller, Jul 31 2010

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 21 01:18 EDT 2019. Contains 321356 sequences. (Running on oeis4.)