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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A003602 Kimberling's paraphrases: if n = (2k-1)*2^m then a(n) = k.
(Formerly M0145)
51
1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 4, 8, 1, 9, 5, 10, 3, 11, 6, 12, 2, 13, 7, 14, 4, 15, 8, 16, 1, 17, 9, 18, 5, 19, 10, 20, 3, 21, 11, 22, 6, 23, 12, 24, 2, 25, 13, 26, 7, 27, 14, 28, 4, 29, 15, 30, 8, 31, 16, 32, 1, 33, 17, 34, 9, 35, 18, 36, 5, 37, 19, 38, 10, 39, 20, 40, 3, 41, 21, 42 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Fractal sequence obtained from powers of 2.

k occurs at (2*k-1)*A000079(m), m >= 0. - Robert G. Wilson v, May 23 2006

Sequence is T^(infty)(1) where T is acting on a word w = w(1)w(2)..w(m) as follows: T(w) = "1"w(1)"2"w(2)"3"(...)"m"w(m)"m+1". For instance T(ab) = 1a2b3. Thus T(1) = 112, T(T(1)) = 1121324, T(T(T(1))) = 112132415362748. - Benoit Cloitre, Mar 02 2009

In the binary expansion of n, first swallow all zeros from the right, then add 1, and swallow the now-appearing 0 bit as well. - Ralf Stephan, Aug 22 2013

REFERENCES

J.-P. Delahaye, L'arithmétique géométrique, Pour la Science, No. 360, October 2007.

Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

N. J. A. Sloane, Table of n, a(n) for n = 1..10000

J.-P. Allouche and J. Shallit, The ring of k-regular sequences, II, Theoret. Computer Sci., 307 (2003), 3-29.

Dale Gerdemann, Plotting Adjacent Points in A003602, Kimberling's Paraphrase, YouTube Video, 2015.

Dale Gerdemann, Plotting Adjacent Terms of A003602 Modulo Increasing Powers of 2, YouTube Video, 2015.

C. Kimberling, Numeration systems and fractal sequences, Acta Arithmetica 73 (1995) 103-117.

C. Kimberling, Fractal sequences

R. Stephan, Some divide-and-conquer sequences ...

R. Stephan, Table of generating functions

Index entries for sequences related to binary expansion of n

FORMULA

a(n) = (A000265(n) + 1)/2.

a((2*k-1)*2^m) = k, for m >= 0 and k >= 1. - Robert G. Wilson v, May 23 2006

Inverse Weigh transform of A035528. - Christian G. Bower

G.f.: 1/x * Sum_{k>=0} x^2^k/(1-2*x^2^(k+1) + x^2^(k+2)). - Ralf Stephan, Jul 24 2003

a(2*n-1) = n and a(2*n) = a(n). - Pab Ter (pabrlos2(AT)yahoo.com), Oct 25 2005

a(A118413(n,k)) = A002024(n,k); = a(A118416(n,k)) = A002260(n,k); a(A014480(n)) = A001511(A014480(n)). - Reinhard Zumkeller, Apr 27 2006

Ordinal transform of A001511. - Franklin T. Adams-Watters, Aug 28 2006

a(n) = A249745(A126760(A003961(n))) = A249745(A253887(A048673(n))). [That is, this sequence plays the same role for the numbers in array A135764 as A126760 does for the odd numbers in array A135765.] - Antti Karttunen, Feb 04 2015 & Jan 19 2016.

G.f. satisfies g(x) = g(x^2) + x/(1-x^2)^2. - Robert Israel, Apr 24 2015

a(n) = A181988(n)/A001511(n). - L. Edson Jeffery, Nov 21 2015.

a(n) = A025480(n-1)+1. - R. J. Mathar, May 19 2016

MAPLE

A003602:=proc(n) options remember: if n mod 2 = 1 then RETURN((n+1)/2) else RETURN(procname(n/2)) fi: end proc:

seq(A003602(n), n=1..83); # Pab Ter

nmax := 83: for m from 0 to ceil(simplify(log[2](nmax))) do for k from 1 to ceil(nmax/(m+2)) do a((2*k-1)*2^m) := k od: od: seq(a(k), k=1..nmax); # Johannes W. Meijer, Feb 04 2013

A003602 := proc(n)

    a := 1;

    for p in ifactors(n)[2] do

        if op(1, p) > 2 then

            a := a*op(1, p)^op(2, p) ;

        end if;

    end do  :

    (a+1)/2 ;

end proc: # R. J. Mathar, May 19 2016

MATHEMATICA

f[n_] := Block[{m = n}, While[ EvenQ@m, m /= 2]; (m + 1)/2]; Array[a, 84] (* or *)

a[1] = 1; a[n_] := a[n] = If[OddQ@n, (n + 1)/2, a[n/2]]; Array[a, 84] (* Robert G. Wilson v, May 23 2006 *)

a[n_] := Ceiling[NestWhile[Floor[#/2] &, n, EvenQ]/2]; Array[a, 84] (* Birkas Gyorgy, Apr 05 2011 *)

a003602 = {1}; max = 7; Do[b = {}; Do[AppendTo[b, {k, a003602[[k]]}], {k, Length[a003602]}]; a003602 = Flatten[b], {n, 2, max}]; a003602 (* L. Edson Jeffery, Nov 21 2015 *)

PROG

(PARI) A003602(n)=(n/2^valuation(n, 2)+1)/2; /* Joerg Arndt, Apr 06 2011 */

(Haskell)

a003602 = (`div` 2) . (+ 1) . a000265

-- Reinhard Zumkeller, Feb 16 2012, Oct 14 2010

(Haskell)

import Data.List (transpose)

a003602 = flip div 2 . (+ 1) . a000265

a003602_list = concat $ transpose [[1..], a003602_list]

-- Reinhard Zumkeller, Aug 09 2013, May 23 2013

(Scheme, two versions)

(define (A003602 n) (let loop ((n n)) (if (even? n) (loop (/ n 2)) (/ (+ 1 n) 2))))

(define (A003602 n) (/ (+ 1 (A000265 n)) 2))

;; Antti Karttunen, Feb 04 2015

CROSSREFS

a(n) is the index of the column in A135764 where n appears (see also A054582).

Cf. A000079, A000265, A001511, A003603, A003961, A025480, A035528, A048673, A101279, A117303, A126760, A181988, A220466, A249745, A253887.

Although A003602 and A264646 initially agree in their digit-streams, they differ after about 48 digits. - N. J. A. Sloane, Nov 20 2015

Sequence in context: A094193 A278539 A108712 * A265650 A181733 A049773

Adjacent sequences:  A003599 A003600 A003601 * A003603 A003604 A003605

KEYWORD

nonn,easy,nice,hear

AUTHOR

N. J. A. Sloane, Mira Bernstein

EXTENSIONS

More terms from Pab Ter (pabrlos2(AT)yahoo.com), Oct 25 2005

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified March 29 15:10 EDT 2017. Contains 284273 sequences.