1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 6, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 7, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 6, 1, 2, 1, 3, 1, 2, 1, 4, 1
Offset: 1
A003602
Kimberling's paraphrases: if n = (2k-1)*2^m then a(n) = k.
Original entry on oeis.org
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
Offset: 1
From _Peter Munn_, Jun 14 2022: (Start)
Start of table showing the interleaving with the positive integers:
n a(n) (n+1)/2 a(n/2)
1 1 1
2 1 1
3 2 2
4 1 1
5 3 3
6 2 2
7 4 4
8 1 1
9 5 5
10 3 3
11 6 6
12 2 2
(End)
- 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).
- 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.
- Cristian Cobeli and Alexandru Zaharescu, Promenade around Pascal Triangle - Number Motives, Bull. Math. Soc. Sci. Math. Roumanie, Tome 56(104) No. 1, 2013, 73-98.
- J.-P. Delahaye, La marelle arithmétique, Pour la Science, No. 360, October 2007. In French.
- 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.
- Douglas E. Iannucci and Urban Larsson, Game values of arithmetic functions, arXiv:2101.07608 [math.NT], 2021.
- Jonas Kaiser, On the relationship between the Collatz conjecture and Mersenne prime numbers, arXiv preprint arXiv:1608.00862 [math.GM], 2016.
- Clark Kimberling, Numeration systems and fractal sequences, Acta Arithmetica 73 (1995) 103-117.
- Clark Kimberling, Fractal sequences
- Ralf Stephan, Some divide-and-conquer sequences ...
- Ralf Stephan, Table of generating functions
- Matty van-Son, Palindromic sequences of the Markov spectrum, arXiv:1804.10802 [math.NT], 2018.
- Eric Weisstein's World of Mathematics, Odd Part
- Index entries for sequences related to binary expansion of n
a(n) is the index of the column in
A135764 where n appears (see also
A054582).
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).
-
a003602 = (`div` 2) . (+ 1) . a000265
-- Reinhard Zumkeller, Feb 16 2012, Oct 14 2010
-
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
-
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
-
a[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 *)
-
A003602(n)=(n/2^valuation(n,2)+1)/2; /* Joerg Arndt, Apr 06 2011 */
-
import math
def a(n): return (n/2**int(math.log(n - (n & n - 1), 2)) + 1)/2 # Indranil Ghosh, Apr 24 2017
-
def A003602(n): return (n>>(n&-n).bit_length())+1 # Chai Wah Wu, Jul 08 2022
-
(define (A003602 n) (let loop ((n n)) (if (even? n) (loop (/ n 2)) (/ (+ 1 n) 2)))) ;; Antti Karttunen, Feb 04 2015
More terms from Pab Ter (pabrlos2(AT)yahoo.com), Oct 25 2005
A220466
a((2*n-1)*2^p) = 4^p*(n-1) + 2^(p-1)*(1+2^p), p >= 0 and n >= 1.
Original entry on oeis.org
1, 3, 2, 10, 3, 7, 4, 36, 5, 11, 6, 26, 7, 15, 8, 136, 9, 19, 10, 42, 11, 23, 12, 100, 13, 27, 14, 58, 15, 31, 16, 528, 17, 35, 18, 74, 19, 39, 20, 164, 21, 43, 22, 90, 23, 47, 24, 392, 25, 51, 26, 106, 27, 55, 28, 228, 29, 59, 30, 122, 31, 63, 32, 2080, 33, 67, 34, 138, 35
Offset: 1
Cf.
A000027 (the natural numbers),
A000120 (1's-counting sequence),
A000265 (remove 2's from n),
A001316 (Gould's sequence),
A001511 (the ruler function),
A003484 (Hurwitz-Radon numbers),
A003602 (a fractal sequence),
A006519 (highest power of 2 dividing n),
A007814 (binary carry sequence),
A010060 (Thue-Morse sequence),
A014577 (dragon curve),
A014707 (dragon curve),
A025480 (nim-values),
A026741,
A035263 (first Feigenbaum symbolic sequence),
A037227,
A038712,
A048460,
A048896,
A051176,
A053381 (smooth nowhere-zero vector fields),
A055975 (Gray code related),
A059134,
A060789,
A060819,
A065916,
A082392,
A085296,
A086799,
A088837,
A089265,
A090739,
A091512,
A091519,
A096268,
A100892,
A103391,
A105321 (a fractal sequence),
A109168 (a continued fraction),
A117973,
A129760,
A151930,
A153733,
A160467,
A162728,
A181988,
A182241,
A191488 (a companion to Gould's sequence),
A193365,
A220466 (this sequence).
-
-- Following Ralf Stephan's recurrence:
import Data.List (transpose)
a220466 n = a006519_list !! (n-1)
a220466_list = 1 : concat
(transpose [zipWith (-) (map (* 4) a220466_list) a006519_list, [2..]])
-- Reinhard Zumkeller, Aug 31 2014
-
# First Maple program
a := n -> 2^padic[ordp](n, 2)*(n+1)/2 : seq(a(n), n=1..69); # Peter Luschny, Dec 24 2012
# Second Maple program
nmax:=69: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 1 to ceil(nmax/(p+2)) do a((2*n-1)*2^p) := 4^p*(n-1) + 2^(p-1)*(1+2^p) od: od: seq(a(n), n=1..nmax);
# Third Maple program
nmax:=69: for p from 0 to ceil(simplify(log[2](nmax))) do n:=2^p: n1:=1: while n <= nmax do a(n) := 4^p*(n1-1)+2^(p-1)*(1+2^p): n:=n+2^(p+1): n1:= n1+1: od: od: seq(a(n), n=1..nmax);
-
A220466 = Module[{n, p}, p = IntegerExponent[#, 2]; n = (#/2^p + 1)/2; 4^p*(n - 1) + 2^(p - 1)*(1 + 2^p)] &; Array[A220466, 50] (* JungHwan Min, Aug 22 2016 *)
-
a(n)=if(n%2,n\2+1,4*a(n/2)-2^valuation(n/2,2)) \\ Ralf Stephan, Dec 17 2013
A347957
Dirichlet convolution of A001221 (omega) with A003602 (Kimberling's paraphrases).
Original entry on oeis.org
0, 1, 1, 2, 1, 5, 1, 3, 3, 6, 1, 9, 1, 7, 7, 4, 1, 14, 1, 11, 8, 9, 1, 13, 4, 10, 8, 13, 1, 28, 1, 5, 10, 12, 9, 25, 1, 13, 11, 16, 1, 34, 1, 17, 22, 15, 1, 17, 5, 25, 13, 19, 1, 38, 11, 19, 14, 18, 1, 49, 1, 19, 26, 6, 12, 46, 1, 23, 16, 44, 1, 36, 1, 22, 31, 25, 12, 52, 1, 21, 22, 24, 1, 60, 14, 25, 19, 25, 1, 86
Offset: 1
Comments
Examples
References
Links
Crossrefs
Programs
Haskell
Haskell
MATLAB
Magma
Maple
Mathematica
PARI
PARI
PARI
PARI
Python
Python
Python
Sage
Scheme
Formula
Extensions