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!)
A003602 Kimberling's paraphrases: if n = (2k-1)*2^m then a(n) = k.
(Formerly M0145)
147

%I M0145 #230 Jan 04 2024 03:20:29

%S 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,

%T 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,

%U 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

%N Kimberling's paraphrases: if n = (2k-1)*2^m then a(n) = k.

%C Fractal sequence obtained from powers of 2.

%C k occurs at (2*k-1)*A000079(m), m >= 0. - _Robert G. Wilson v_, May 23 2006

%C Sequence is T^(oo)(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

%C Note that iterating the post-numbering operator U(w) = w(1) 1 w(2) 2 w(3) 3... produces the same limit sequence except with an additional "1" prepended, i.e., 1,1,1,2,1,3,2,4,... - _Glen Whitney_, Aug 30 2023

%C 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

%C Although A264646 and this sequence initially agree in their digit-streams, they differ after 48 digits. - _N. J. A. Sloane_, Nov 20 2015

%C "[This is a] fractal because we get the same sequence after we delete from it the first appearance of all positive integers" - see Cobeli and Zaharescu link. - _Robert G. Wilson v_, Jun 03 2018

%C From _Peter Munn_, Jun 16 2022: (Start)

%C The sequence is the list of positive integers interleaved with the sequence itself. Provided the offset is suitable (which is the case here) a term of such a self-interleaved sequence is determined by the odd part of its index. Putting some of the formulas given here into words, a(n) is the position of the odd part of n in the list of odd numbers.

%C Applying the interleaving transform again, we get A110963.

%C (End)

%C Omitting all 1's leaves A131987 + 1. - _David James Sycamore_, Jul 26 2022

%C a(n) is also the smallest positive number not among the terms between a(a(n-1)) and a(n-1) inclusive (with a(0)=1 prepended). - _Neal Gersh Tolunsky_, Mar 07 2023

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

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

%H N. J. A. Sloane, <a href="/A003602/b003602.txt">Table of n, a(n) for n = 1..10000</a>

%H J.-P. Allouche and J. Shallit, <a href="http://dx.doi.org/10.1016/S0304-3975(03)00090-2">The ring of k-regular sequences, II</a>, Theoret. Computer Sci., 307 (2003), 3-29.

%H Cristian Cobeli and Alexandru Zaharescu, <a href="http://rms.unibuc.ro/bulletin/pdf/56-1/PromenadePascalPart1.pdf">Promenade around Pascal Triangle - Number Motives</a>, Bull. Math. Soc. Sci. Math. Roumanie, Tome 56(104) No. 1, 2013, 73-98.

%H J.-P. Delahaye, <a href="https://www.pourlascience.fr/sd/histoire-sciences/la-marelle-arithmetique-3846.php">La marelle arithmétique</a>, Pour la Science, No. 360, October 2007. In French.

%H Dale Gerdemann, <a href="https://youtu.be/bOfRc8jeFsQ">Plotting Adjacent Points in A003602, Kimberling's Paraphrase</a>, YouTube Video, 2015.

%H Dale Gerdemann, <a href="https://youtu.be/h3VY0gu0uY0">Plotting Adjacent Terms of A003602 Modulo Increasing Powers of 2</a>, YouTube Video, 2015.

%H Douglas E. Iannucci and Urban Larsson, <a href="https://arxiv.org/abs/2101.07608">Game values of arithmetic functions</a>, arXiv:2101.07608 [math.NT], 2021.

%H Jonas Kaiser, <a href="https://arxiv.org/abs/1608.00862">On the relationship between the Collatz conjecture and Mersenne prime numbers</a>, arXiv preprint arXiv:1608.00862 [math.GM], 2016.

%H Clark Kimberling, <a href="http://matwbn.icm.edu.pl/ksiazki/aa/aa73/aa7321.pdf">Numeration systems and fractal sequences</a>, Acta Arithmetica 73 (1995) 103-117.

%H Clark Kimberling, <a href="http://faculty.evansville.edu/ck6/integer/fractals.html">Fractal sequences</a>

%H Ralf Stephan, <a href="/somedcgf.html">Some divide-and-conquer sequences ...</a>

%H Ralf Stephan, <a href="/A079944/a079944.ps">Table of generating functions</a>

%H Matty van-Son, <a href="https://arxiv.org/abs/1804.10802">Palindromic sequences of the Markov spectrum</a>, arXiv:1804.10802 [math.NT], 2018.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/OddPart.html">Odd Part</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

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

%F a((2*k-1)*2^m) = k, for m >= 0 and k >= 1. - _Robert G. Wilson v_, May 23 2006

%F Inverse Weigh transform of A035528. - _Christian G. Bower_

%F 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

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

%F 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

%F Ordinal transform of A001511. - _Franklin T. Adams-Watters_, Aug 28 2006

%F 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

%F G.f. satisfies g(x) = g(x^2) + x/(1-x^2)^2. - _Robert Israel_, Apr 24 2015

%F a(n) = A181988(n)/A001511(n). - _L. Edson Jeffery_, Nov 21 2015

%F a(n) = A025480(n-1) + 1. - _R. J. Mathar_, May 19 2016

%F a(n) = A110963(2n-1) = A349135(4*n). - _Antti Karttunen_, Apr 18 2022

%F a(n) = (A000035(n) + n)/2, for n odd; a(n) = a(A000035(n) + n)/2), for n even. - _David James Sycamore_, Jul 28 2022

%F a(n) = n/2^A001511(n) + 1/2. - _Alan Michael Gómez Calderón_, Oct 06 2023

%e From _Peter Munn_, Jun 14 2022: (Start)

%e Start of table showing the interleaving with the positive integers:

%e n a(n) (n+1)/2 a(n/2)

%e 1 1 1

%e 2 1 1

%e 3 2 2

%e 4 1 1

%e 5 3 3

%e 6 2 2

%e 7 4 4

%e 8 1 1

%e 9 5 5

%e 10 3 3

%e 11 6 6

%e 12 2 2

%e (End)

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

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

%p 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

%p A003602 := proc(n)

%p a := 1;

%p for p in ifactors(n)[2] do

%p if op(1,p) > 2 then

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

%p end if;

%p end do :

%p (a+1)/2 ;

%p end proc: # _R. J. Mathar_, May 19 2016

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

%t 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 *)

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

%t 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 *)

%o (PARI) A003602(n)=(n/2^valuation(n,2)+1)/2; /* _Joerg Arndt_, Apr 06 2011 */

%o (Haskell)

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

%o -- _Reinhard Zumkeller_, Feb 16 2012, Oct 14 2010

%o (Haskell)

%o import Data.List (transpose)

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

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

%o -- _Reinhard Zumkeller_, Aug 09 2013, May 23 2013

%o (Scheme) (define (A003602 n) (let loop ((n n)) (if (even? n) (loop (/ n 2)) (/ (+ 1 n) 2)))) ;; _Antti Karttunen_, Feb 04 2015

%o (Python)

%o import math

%o def a(n): return (n/2**int(math.log(n - (n & n - 1), 2)) + 1)/2 # _Indranil Ghosh_, Apr 24 2017

%o (Python)

%o def A003602(n): return (n>>(n&-n).bit_length())+1 # _Chai Wah Wu_, Jul 08 2022

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

%Y Cf. A000079, A000265, A001511, A003603, A003961, A014577 (with offset 1, reduction mod 2), A025480, A035528, A048673, A101279, A110963, A117303, A126760, A181988, A220466, A249745, A253887, A337821 (2-adic valuation).

%Y Cf. also A349134 (Dirichlet inverse), A349135 (sum with it), A349136 (Möbius transform), A349431, A349371 (inverse Möbius transform).

%Y Cf. A065120, A131987.

%Y Cf. A000035, A264646.

%K nonn,easy,nice,hear

%O 1,3

%A _N. J. A. Sloane_, _Mira Bernstein_

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

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 June 29 18:05 EDT 2024. Contains 373855 sequences. (Running on oeis4.)