cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-9 of 9 results.

A075677 Reduced Collatz function R applied to the odd integers: a(n) = R(2n-1), where R(k) = (3k+1)/2^r, with r as large as possible.

Original entry on oeis.org

1, 5, 1, 11, 7, 17, 5, 23, 13, 29, 1, 35, 19, 41, 11, 47, 25, 53, 7, 59, 31, 65, 17, 71, 37, 77, 5, 83, 43, 89, 23, 95, 49, 101, 13, 107, 55, 113, 29, 119, 61, 125, 1, 131, 67, 137, 35, 143, 73, 149, 19, 155, 79, 161, 41, 167, 85, 173, 11, 179, 91, 185, 47, 191, 97, 197
Offset: 1

Views

Author

T. D. Noe, Sep 25 2002

Keywords

Comments

The even-indexed terms a(2i+2) = 6i+5 = A016969(i), i >= 0 [Comment corrected by Bob Selcoe, Apr 06 2015]. The odd-indexed terms are the same as A067745. Note that this sequence is A016789 with all factors of 2 removed from each term. Also note that a(4i-1) = a(i). No multiple of 3 is in this sequence. See A075680 for the number of iterations of R required to yield 1.
From Bob Selcoe, Apr 06 2015: (Start)
All numbers in this sequence appear infinitely often.
From Eq. 1 and Eq. 2 in Formulas: Eq. 1 is used with 1/3 of the numbers in this sequence, Eq. 2 is used with 2/3 of the numbers.
(End)
Empirical: For arbitrary m, Sum_{n=2..A007583(m)} (a(n) - a(n-1)) = 0. - Fred Daniel Kline, Nov 23 2015
From Wolfdieter Lang, Dec 07 2021: (Start)
Only positive numbers congruent to 1 or 5 modulo 6 appear.
i) For the sequence entry with value A016921(m), for m >= 0, that is, a value from {1, 7, 13, ...}, the indices n are given by the row of array A178415(2*m+1, k), for k >= 1.
ii) For the sequence entry with value A007528(m), for m >= 1, that is, a value from {5, 11, 17, ...}, the indices n are given by the row of array A178415(2*m, k), for k >= 1.
See also the array A347834 with permuted row numbers and columns k >= 0. (End)

Examples

			a(11) = 1 because 21 is the 11th odd number and R(21) = 64/64 = 1.
From _Wolfdieter Lang_, Dec 07 2021: (Start)
i) 1 (mod 6) entry 1 = A016921(0) appears for n = A178415(1, k) = A347834(1, k-1) (the arrays), for k >= 1, that is, for {1, 5, 21, ..} = A002450.
ii) 5 (mod 6) entry 11 = A007528(2) appears for n = A178415(4, k) = A347835(3, k-1) (the arrays), for k >= 1, that is, for {7, 29, 117, ..} = A072261. (End)
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section E16, pp. 330-336.
  • Victor Klee and Stan Wagon, Old and new unsolved problems in plane geometry and number theory, The Mathematical Association of America, 1991, p. 225, C(2n+1) = a(n+1), n >= 0.
  • Jeffrey C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010; see p. 57, also (90-9), p. 306.

Crossrefs

Cf. A006370, A014682 (for non-reduced Collatz maps), A087230 (A371093), A371094.
Odd bisection of A139391.
Even bisection of A067745, which is also the odd bisection of this sequence.
After the initial 1, the second leftmost column of A256598.
Row 2 of A372283.

Programs

  • Haskell
    a075677 = a000265 . subtract 2 . (* 6) -- Reinhard Zumkeller, Jan 08 2014
    
  • Maple
    f:=proc(n) local t1;
    if n=1 then RETURN(1) else
    t1:=3*n+1;
    while t1 mod 2 = 0 do t1:=t1/2; od;
    RETURN(t1); fi;
    end;
    # N. J. A. Sloane, Jan 21 2011
  • Mathematica
    nextOddK[n_] := Module[{m=3n+1}, While[EvenQ[m], m=m/2]; m]; (* assumes odd n *) Table[nextOddK[n], {n, 1, 200, 2}]
    v[x_] := IntegerExponent[x, 2]; f[x_] := (3*x + 1)/2^v[3*x + 1]; Table[f[2*n - 1], {n, 66}] (* L. Edson Jeffery, May 06 2015 *)
  • PARI
    a(n)=n+=2*n-1;n>>valuation(n,2) \\ Charles R Greathouse IV, Jul 05 2013
    
  • Python
    from sympy import divisors
    def a(n):
        return max(d for d in divisors(n) if d % 2)
    print([a(6*n - 2) for n in range(1, 101)]) # Indranil Ghosh, Apr 15 2017, after formula by Reinhard Zumkeller

Formula

a(n) = A000265(6*n-2) = A000265(3*n-1). - Reinhard Zumkeller, Jan 08 2014
From Bob Selcoe, Apr 05 2015: (Start)
For all n>=1 and for every k, there exists j>=0 dependent upon n and k such that either:
Eq. 1: a(n) = (3n-1)/2^(2j+1) when k = ((4^(j+1)-1)/3) mod 2^(2j+3). Alternatively: a(n) = A016789(n-1)/A081294(j+1) when k = A002450(j+1) mod A081294(j+2). Example: n=51; k=101 == 5 mod 32, j=1. a(51) = 152/8 = 19.
or
Eq. 2: a(n) = (3n-1)/4^j when k = (5*2^(2j+1) - 1)/3 mod 4^(j+1). Alternatively: a(n) = A016789(n-1)/A000302(j) when k = A072197(j) mod A000302(j+1). Example: n=91; k=181 == 53 mod 64, j=2. a(91) = 272/16 = 17.
(End) [Definition corrected by William S. Hilton, Jul 29 2017]
a(n) = a(n + g*2^r) - 6*g, n > -g*2^r. Examples: n=59; a(59)=11, r=5. g=-1: 11 = a(27) = 5 - (-1)*6; g=1: 11 = a(91) = 17 - 1*6; g=2: 11 = a(123) = 23 - 2*6; g=3: 11 = a(155) = 29 - 3*6; etc. - Bob Selcoe, Apr 06 2015
a(n) = a((1 + (3*n - 1)*4^(k-1))/3), k>=1 (cf. A191669). - L. Edson Jeffery, Oct 05 2015
a(n) = a(4n-1). - Bob Selcoe, Aug 03 2017
a(n) = A139391(2n-1). - Antti Karttunen, May 06 2024
Sum_{k=1..n} a(k) ~ n^2. - Amiram Eldar, Aug 26 2024
G.f.: Sum_{k>=1} ((3 + 2*(-1)^k)*x^(3*2^(k - 1) - (-2)^k/3 + 1/3) + (3 - 2*(-1)^k)*x^(2^(k - 1) - (-2)^k/3 + 1/3))/(x^(2^k) - 1)^2. - Miles Wilson, Oct 26 2024

A061547 Number of 132 and 213-avoiding derangements of {1,2,...,n}.

Original entry on oeis.org

1, 0, 1, 2, 6, 10, 26, 42, 106, 170, 426, 682, 1706, 2730, 6826, 10922, 27306, 43690, 109226, 174762, 436906, 699050, 1747626, 2796202, 6990506, 11184810, 27962026, 44739242, 111848106, 178956970, 447392426, 715827882, 1789569706, 2863311530, 7158278826
Offset: 0

Views

Author

Emeric Deutsch, May 16 2001

Keywords

Comments

Or, number of permutations with no fixed points avoiding 213 and 132.
Number of derangements of {1,2,...,n} having ascending runs consisting of consecutive integers. Example: a(4)=6 because we have 234/1, 34/12, 34/2/1, 4/123, 4/3/12, 4/3/2/1, the ascending runs being as indicated. - Emeric Deutsch, Dec 08 2004
Let c be twice the sequence A002450 interlaced with itself (from the second term), i.e., c = 2*(0, 1, 1, 5, 5, 21, 21, 85, 85, 341, 341, ...). Let d be powers of 4 interlaced with the zero sequence: d = (1, 0, 4, 0, 16, 0, 64, 0, 256, 0, ...). Then a(n+1) = c(n) + d(n). - Creighton Dement, May 09 2005
Inverse binomial transform of A094705 (0, 1, 4, 15). - Paul Curtz, Jun 15 2008
Equals row sums of triangle A177993. - Gary W. Adamson, May 16 2010
a(n-1) is also the number of order preserving partial isometries (of an n-chain) of fix 1 (fix of alpha equals the number of fixed points of alpha). - Abdullahi Umar, Dec 28 2010
a(n+1) <= A218553(n) is also the Moore lower bound on the order of a (5,n)-cage. - Jason Kimberley, Oct 31 2011
For n > 0, a(n) is the location of the n-th new number to make a first appearance in A087230. E.g., the 17th number to make its first appearance in A087230 is 18 and this occurs at A087230(43690) and a(17)=43690. - K D Pegrume, Jan 26 2022
Position in A002487 of 2 adjacent terms of A000045. E.g., 3/5 at 10, 5/8 at 26, 8/13 at 42, ... - Ed Pegg Jr, Dec 27 2022

Examples

			a(4)=6 because the only 132 and 213-avoiding permutations of {1,2,3,4} without fixed points are: 2341, 3412, 3421, 4123, 4312 and 4321.
		

Crossrefs

Cf. A177993. - Gary W. Adamson, May 16 2010
Cf. A183158, A183159. - Abdullahi Umar, Dec 28 2010
Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), A027383 (k=3), A062318 (k=4), this sequence (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), A094626 (k=11); columns: A020725 (g=3), A005843 (g=4), A002522 (g=5), A051890 (g=6), A188377 (g=7). - Jason Kimberley, Oct 31 2011

Programs

Formula

a(n) = (3/8)*2^n + (1/24)*(-2)^n - 2/3 for n>=1.
a(n) = 4*a(n-2) + 2, a(0)=1, a(1)=0, a(2)=1.
G.f: (5*z^3-3*z^2-z+1)/((z-1)*(4*z^2-1)).
a(n) = A020989((n-2)/2) for n=2, 4, 6, ... and A020988((n-3)/2) for n=3, 5, 7, ... .
a(n+1)-2*a(n) = A078008 signed. Differences: doubled A000302. - Paul Curtz, Jun 15 2008
a(2i+1) = 2*Sum_{j=0..i-1} 4^j = string "2"^i read in base 4.
a(2i+2) = 4^i + 2*Sum_{j=0..i-1} 4^j = string "1"*"2"^i read in base 4.
a(n+2) = Sum_{k=0..n} A144464(n,k)^2 = Sum_{k=0..n} A152716(n,k). - Philippe Deléham and Michel Marcus, Feb 26 2014
a(2*n-1) = A176965(2*n), a(2*n) = A176965(2*n-1) for n>0. - Yosu Yurramendi, Dec 23 2016
a(2*n-1) = A020988(k-1), a(2*n)= A020989(n-1) for n>0. - Yosu Yurramendi, Jan 03 2017
a(n+2) = 2*A086893(n), n > 0. - Yosu Yurramendi, Mar 07 2017
E.g.f.: (15 - 8*cosh(x) + 5*cosh(2*x) - 8*sinh(x) + 4*sinh(2*x))/12. - Stefano Spezia, Apr 07 2022

Extensions

a(0)=1 prepended by Alois P. Heinz, Jan 27 2022

A371093 a(n) is the 2-adic valuation of 3n+1.

Original entry on oeis.org

0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 8, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2
Offset: 0

Views

Author

Antti Karttunen, Apr 19 2024

Keywords

Comments

When a(n) is applied to square array A257852 we obtain square array A004736, or in other words, a(n) applied to any odd number gives the index of the row where it is located in array A257852.
See further comments in A087230.
The asymptotic density of the occurrences of k = 0, 1, 2, ... is 1/2^(k+1). The asymptotic mean of this sequence is 1. - Amiram Eldar, May 28 2024

Crossrefs

Bisections: A000004, A087230.
Cf. also A371092.

Programs

  • Mathematica
    Table[IntegerExponent[3*n+1, 2], {n, 0, 105}] (* James C. McMahon, Apr 21 2024 *)
  • PARI
    A371093(n) = valuation(1+3*n,2);
    
  • Python
    def A371093(n): return ((m:=3*n) & ~(m+1)).bit_length() # Chai Wah Wu, Apr 20 2024

Formula

a(n) = A007814(A016777(n)).
For all n >= 0, A067745(1+n) = A016777(n) / 2^a(n).
G.f.: Sum_{k>=1} k*x^(-1/3 + (-2)^(k + 1)/3 + 2^k)/(1 - x^(2^(k + 1))). - Miles Wilson, Sep 30 2024

A087963 Exponent of highest power of 2 dividing 3*prime(n)+1.

Original entry on oeis.org

0, 1, 4, 1, 1, 3, 2, 1, 1, 3, 1, 4, 2, 1, 1, 5, 1, 3, 1, 1, 2, 1, 1, 2, 2, 4, 1, 1, 3, 2, 1, 1, 2, 1, 6, 1, 3, 1, 1, 3, 1, 5, 1, 2, 4, 1, 1, 1, 1, 4, 2, 1, 2, 1, 2, 1, 3, 1, 6, 2, 1, 4, 1, 1, 2, 3, 1, 2, 1, 3, 2, 1, 1, 5, 1, 1, 4, 3, 2, 2, 1, 4, 1, 2, 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 3, 1, 3, 1, 2, 1
Offset: 1

Views

Author

Labos Elemer, Sep 18 2003

Keywords

Examples

			For n = 10: p = prime(10) = 29, 3*p + 1 = 88 = 2^3 * 11, a(10) = 3.
		

Crossrefs

Programs

  • Magma
    [Valuation(3*NthPrime(n)+1, 2): n in [1..80]]; // Vincenzo Librandi, Sep 01 2016
    
  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]]; e2[x_] := Part[[ffi[x]], 2]; Table[e2[3*Prime[w]+1], {w, 1, 100}]
    IntegerExponent[3 * Prime[Range[100]] + 1, 2] (* Amiram Eldar, Jul 12 2024 *)
  • PARI
    a(n) = valuation(3*prime(n)+1, 2); \\ Michel Marcus, Sep 01 2016
    
  • Python
    from sympy import prime
    def A087963(n): return (~(m:=prime(n)*3+1)&m-1).bit_length() # Chai Wah Wu, Jul 10 2022

Formula

a(n) = A007814(3*prime(n)+1).

Extensions

a(1)=0 corrected by Michel Marcus, Sep 01 2016

A087231 a(n) is the smallest number such that the exponent of p=2 factor in 6*a(n)+4 equals n.

Original entry on oeis.org

1, 4, 6, 2, 26, 10, 106, 42, 426, 170, 1706, 682, 6826, 2730, 27306, 10922, 109226, 43690, 436906, 174762, 1747626, 699050, 6990506, 2796202, 27962026, 11184810, 111848106, 44739242, 447392426, 178956970, 1789569706, 715827882, 7158278826, 2863311530
Offset: 1

Views

Author

Labos Elemer, Aug 28 2003

Keywords

Examples

			n = 10: m = 6*170+4 = 1024 = 2^10, so a(10) = 170.
		

Crossrefs

Programs

  • PARI
    Vec(x*(1 + 3*x - 2*x^2 - 16*x^3 + 16*x^4) / ((1 - x)*(1 - 2*x)*(1 + 2*x)) + O(x^40)) \\ Colin Barker, Mar 16 2017

Formula

For n>2, a(n) = [3/2*2^n - (-2)^n - 2]/3. - Ralf Stephan, May 10 2004
From Colin Barker, Mar 16 2017: (Start)
G.f.: x*(1 + 3*x - 2*x^2 - 16*x^3 + 16*x^4) / ((1 - x)*(1 - 2*x)*(1 + 2*x)).
a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) for n>5.
(End)

A246425 In the Collatz 3x+1 problem: start at an odd number 2n+1 and find the next odd number 2m+1 in the trajectory; then a(n) = m-n.

Original entry on oeis.org

0, 1, -2, 2, -1, 3, -4, 4, -2, 5, -10, 6, -3, 7, -9, 8, -4, 9, -15, 10, -5, 11, -14, 12, -6, 13, -24, 14, -7, 15, -19, 16, -8, 17, -28, 18, -9, 19, -24, 20, -10, 21, -42, 22, -11, 23, -29, 24, -12, 25, -41, 26, -13, 27, -34, 28, -14, 29, -53, 30, -15, 31, -39, 32, -16, 33, -54, 34, -17, 35, -44, 36, -18, 37, -71, 38, -19, 39, -49, 40, -20, 41, -67, 42, -21, 43, -54, 44, -22, 45, -82, 46, -23, 47, -59, 48, -24, 49, -80, 50
Offset: 0

Views

Author

K. G. Stier, Aug 26 2014

Keywords

Comments

Positive terms indicate the next odd number 2m+1 in the trajectory is greater than 2n+1 which is the case every second time giving a(n) = m-n = (n+1)/2.
Negative terms indicate the next odd number 2m+1 in the trajectory is smaller than 2n+1. For behavior of this part refer to A087230.

Examples

			a(14)=-9 because 2*14 + 1 = 29 and the Collatz trajectory to reach the next odd number goes: 29, 88, 44, 22, 11. Thus, m=5 and 5 - 14 = -9.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local m;
       m:= 6*n+4;
       m/2^(1+padic:-ordp(m,2))-n-1/2
    end proc:
    map(f, [$0..100]); # Robert Israel, Mar 22 2020
  • Mathematica
    a[n_] := ((6n+4)/2^IntegerExponent[6n+4, 2] - (2n+1))/2;
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 15 2023 *)
  • PARI
    forstep(n=0, 1000, 1, m=6*n+4; print1(((m/2^valuation(m, 2)-(2*n+1))/2),", "))

Formula

a(n) = ((6*n+4)/2^A087230(n) - (2*n+1))/2.

A087964 a(n) is the least prime p such that exponent of highest power of 2 dividing 3p+1 equals n.

Original entry on oeis.org

3, 17, 13, 5, 53, 149, 1237, 1109, 853, 2389, 3413, 17749, 128341, 70997, 251221, 415061, 218453, 2708821, 27088213, 29709653, 3495253, 85284181, 13981013, 39146837, 794121557, 1498764629, 492131669, 626349397, 13779686741
Offset: 1

Views

Author

Labos Elemer, Sep 18 2003

Keywords

Examples

			p = 218453 is the first prime so that 3*p+1 = 655360 = (2^18)*5 has 18 as exponent of 2 in 3p+1, thus a(18) = 218453.
		

Crossrefs

Programs

  • Maple
    f:= proc(n)
       local m,t,p;
       t:= 2^n;
       for m from 1 + 4*(n mod 2) by 6 do
         p:= (t*m-1)/3;
         if isprime(p) then return p fi
       od
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 18 2017
  • Mathematica
    a[n_] := Module[{m, t = 2^n, p}, For[m = 1 + 4 Mod[n, 2], True, m += 6, p = (t m - 1)/3; If[PrimeQ[p], Return[p]]]];
    Array[a, 100] (* Jean-François Alcover, Aug 28 2020, after Robert Israel *)

Formula

a(n) = A000040(Min{x; A007814(1 + 3*A000040(x)) = n}).

Extensions

More terms from Ray Chandler, Sep 21 2003

A351123 Irregular triangle read by rows: row n lists the partial sums of the number of divisions by 2 after each tripling step in the Collatz trajectory of 2n+1.

Original entry on oeis.org

1, 5, 4, 1, 2, 4, 7, 11, 2, 3, 4, 6, 9, 13, 1, 3, 6, 10, 3, 7, 1, 2, 3, 8, 12, 2, 5, 9, 1, 4, 5, 7, 10, 14, 6, 1, 2, 7, 11, 2, 3, 6, 7, 9, 12, 16, 1, 3, 4, 5, 6, 7, 9, 11, 12, 14, 15, 16, 18, 19, 20, 21, 23, 26, 27, 28, 30, 31, 33, 34, 35, 36, 37, 38, 41, 42, 43, 44, 48, 50, 52, 56, 59, 60, 61, 66, 70
Offset: 1

Views

Author

Flávio V. Fernandes, Feb 01 2022

Keywords

Comments

The terms in row n are T(n,0), T(n,1), ..., T(n, A258145(n)-2), and are the partial sums of the terms in row n of A351122.
In each row n, the terms also satisfy the equation 3* (3* (3* (3* ... (3* (2n+1) +1) + 2^T(n,0)) + 2^T(n,1)) + 2^T(n,2)) + ... = 2^T(n, A258145(n)-2); e.g., for n=4, and A258145(4)-2=5: 3* (3* (3* (3* (3* (3*9+1) +2^2) +2^3) +2^4) +2^6) +2^9 = 2^13.
For row n, the right-hand side of the equation above is 2^A166549(n+1). E.g., for the above example (n=4), the right-hand side is 2^A166549(4+1) = 2^13.

Examples

			Triangle starts at T(1,0):
n\k   0   1   2   3   4   5   6   7   8   9   10 ...
1:    1   5
2:    4
3:    1   2   4   7  11
4:    2   3   4   6   9  13
5:    1   3   6  10
6:    3   7
7:    1   2   3   8   12
8:    2   5   9
...
E.g., row 3 of A351122 is [1, 1, 2, 3, 4]; its partial sums are [1, 2, 4, 7, 11].
		

Crossrefs

Programs

  • PARI
    orow(n) = my(m=2*n+1, list=List()); while (m != 1, if (m%2, m = 3*m+1, my(nb = valuation(m,2)); m/=2^nb; listput(list, nb));); Vec(list); \\ A351122
    row(n) = my(v = orow(n)); vector(#v, k, sum(i=1, k, v[i])); \\ Michel Marcus, Jul 18 2022

Extensions

Data corrected by Mohsen Maesumi, Jul 18 2022
Last row completed by Michel Marcus, Jul 18 2022

A375961 2-adic valuation of 6*n + 2.

Original entry on oeis.org

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, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 9, 1
Offset: 0

Views

Author

Ruud H.G. van Tol, Sep 04 2024

Keywords

Comments

6*i+2 is the first (3*x+1)/2 successor of 4*i+1, with i >= 0.
The first occurrence of odd t is before that of t-1.

Examples

			a(21) = A007814(6*21+2) = 7.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := IntegerExponent[6*n + 2, 2]; Array[a, 100, 0] (* Amiram Eldar, Sep 04 2024 *)
  • PARI
    a(n) = valuation(6*n+2, 2);
    
  • Python
    def A375961(n): return (~(3*n+1)&3*n).bit_length()+1 # Chai Wah Wu, Sep 27 2024

Formula

a(n) = A007814(6*n + 2).
a(n) = A371093(n) + 1.
a(n) = A087229(n) - 1.
a(n) = k for n == A096773(k) (mod 2^k), k >= 1.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2. - Amiram Eldar, Oct 01 2024
Showing 1-9 of 9 results.