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-6 of 6 results.

A090129 Smallest exponent such that -1 + 3^a(n) is divisible by 2^n.

Original entry on oeis.org

1, 2, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184
Offset: 1

Views

Author

Labos Elemer and Ralf Stephan, Jan 19 2004

Keywords

Comments

A131577 and A011782 are companions, A131577(n) + A011782(n) = 2^n, (and differences each other). - Paul Curtz, Jan 18 2009
A090127 with offset 0: (1, 2, 2, 4, 8, ...) = A(x) / A(x^2), when A(x) = (1 + 2x + 4x^2 + 8x^3 + ...). - Gary W. Adamson, Feb 20 2010
From Wolfdieter Lang, Apr 18 2012: (Start)
a(n) is the order of 3 modulo 2^n. For n=1 and 2 this is obviously 1 and 2, respectively, and for n >= 3 it is 2^(n-2).
For a proof see, e.g., the Graeme McRae link under A068531, the section 'A Different Approach', proposed by Alexander Monnas, the first part, where the result from the expansion of (4-1)^(2^(k-2)) holds only for k >= 3. See also the Charles R Greathouse IV program below where this result has been used.
This means that the cycle generated by 3, taken modulo 2^n, has length a(n), and that 3 is not a primitive root modulo 2^n, if n >= 3 (because Euler's phi(2^n) = 2^(n-1), n >= 1, see A000010).
(End)
Let r(x) = (1 + 2x + 2x^2 + 4x^3 + ...). Then (1 + 2x + 4x^2 + 8x^3 + ...) = (r(x) * r(x^2) * r(x)^4 * r(x^8) * ...). - Gary W. Adamson, Sep 13 2016

Examples

			a(1) = 1 since -1 + 3 = 2 is divisible by 2^1;
a(2) = a(3) = 2 since -1 + 9 = 8 is divisible by 4 = 2^2 and also by 8 = 2^3;
a(5) = 8 since -1 + 6561 = 6560 = 32*205 is divisible by 2^5.
From _Wolfdieter Lang_, Apr 18 2012: (Start)
n=3: the order of 3 (mod 8) is a(3)=2 because the cycle generated by 3 is [3, 3^2==1 (mod 8)].
n=5: a(5) = 2^3 = 8 because the cycle generated by 3 is [3^1=3, 3^2=9, 3^3=27, 17, 19, 25, 11, 1] (mod 32).
  The multiplicative group mod 32 is non-cyclic (see A033949(10)) with the additional four cycles  [5, 25, 29, 17, 21, 9, 13, 1], [7, 17, 23, 1], [15, 1], and [31, 1]. This is the cycle structure of the (Abelian) group Z_8 x Z_2 (see one of the cycle graphs shown in the Wikipedia link 'List of small groups' for the order phi(32)=16, given under A192005).
(End)
		

Crossrefs

Essentially the same as A000079.

Programs

  • Mathematica
    t=Table[Part[Flatten[FactorInteger[ -1+3^(n)]], 2], {n, 1, 130}] Table[Min[Flatten[Position[t, j]]], {j, 1, 10}]
    Join[{1,2},2^Range[30]] (* or *) Join[{1,2},NestList[2#&,2,30]] (* Harvey P. Dale, Nov 08 2012 *)
  • PARI
    a(n)=2^(n+(n<3)-2) \\ Charles R Greathouse IV, Apr 09 2012
    
  • Python
    def A090129(n): return n if n<3 else 1<Chai Wah Wu, Jul 11 2022

Formula

a(n) = 2^(n-2) if n >= 3, 1 for n=1 and 2 for n=2 (see the order comment above).
a(n+2) = A152046(n) + A152046(n+1) = 2*A011782(n). - Paul Curtz, Jan 18 2009

Extensions

a(11) through a(20) from R. J. Mathar, Aug 08 2008
More terms (powers of 2, see a comment above) from Wolfdieter Lang, Apr 18 2012

A090739 Exponent of 2 in 9^n - 1.

Original entry on oeis.org

3, 4, 3, 5, 3, 4, 3, 6, 3, 4, 3, 5, 3, 4, 3, 7, 3, 4, 3, 5, 3, 4, 3, 6, 3, 4, 3, 5, 3, 4, 3, 8, 3, 4, 3, 5, 3, 4, 3, 6, 3, 4, 3, 5, 3, 4, 3, 7, 3, 4, 3, 5, 3, 4, 3, 6, 3, 4, 3, 5, 3, 4, 3, 9, 3, 4, 3, 5, 3, 4, 3, 6, 3, 4, 3, 5, 3, 4, 3, 7, 3, 4, 3, 5, 3, 4, 3
Offset: 1

Views

Author

Labos Elemer and Ralf Stephan, Jan 19 2004

Keywords

Comments

The exponent of 2 in the factorization of Fibonacci(6n). - T. D. Noe, Mar 14 2014
Records of 3, 4, 5, 6, 7, 8,.. occur at n= 1, 2, 4, 8, 16, 32,... - R. J. Mathar, Jun 28 2025

Examples

			For n = 2, we see that -1 + 3^4 = 80 = 2^4 * 5 so a(2) = 4.
For n = 3, we see that -1 + 3^6 = 728 = 2^3 * 7 * 13, so a(3) = 3.
		

Crossrefs

Cf. A000005, A006519, A120738 (partial sums).
Appears in A161737.

Programs

  • Maple
    A090739 := proc(n)
        padic[ordp](9^n-1,2) ;
    end proc:
    seq(A090739(n),n=1..80) ; # R. J. Mathar, Jun 28 2025
  • Mathematica
    Table[Part[Flatten[FactorInteger[ -1+3^(2*n)]], 2], {n, 1, 70}]
    Table[IntegerExponent[Fibonacci[n], 2], {n, 6, 600, 6}] (* T. D. Noe, Mar 14 2014 *)
  • PARI
    a(n)=valuation(n,2)+3 \\ Charles R Greathouse IV, Mar 14 2014
    
  • Python
    def A090739(n): return (~n&n-1).bit_length()+3 # Chai Wah Wu, Jul 11 2022

Formula

a(n) = A007814(n) + 3.
a((2*n-1)*2^p) = p + 3, p >= 0. - Johannes W. Meijer, Feb 08 2013
a(n) = log_2(A006519(9^n - 1)). - Alonso del Arte, Feb 08 2013
a(n) = 2*tau(4*n)/(tau(4*n) - tau(n)), where tau(n) = A000005(n). - Peter Bala, Jan 06 2021
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 4. - Amiram Eldar, Nov 28 2022

Extensions

More terms from T. D. Noe, Mar 14 2014

A090740 Exponent of 2 in 3^n - 1.

Original entry on oeis.org

1, 3, 1, 4, 1, 3, 1, 5, 1, 3, 1, 4, 1, 3, 1, 6, 1, 3, 1, 4, 1, 3, 1, 5, 1, 3, 1, 4, 1, 3, 1, 7, 1, 3, 1, 4, 1, 3, 1, 5, 1, 3, 1, 4, 1, 3, 1, 6, 1, 3, 1, 4, 1, 3, 1, 5, 1, 3, 1, 4, 1, 3, 1, 8, 1, 3, 1, 4, 1, 3, 1, 5, 1, 3, 1, 4, 1, 3, 1, 6, 1, 3, 1, 4, 1, 3, 1, 5, 1, 3, 1, 4, 1, 3, 1, 7, 1, 3, 1, 4, 1, 3, 1, 5, 1
Offset: 1

Views

Author

Labos Elemer and Ralf Stephan, Jan 19 2004

Keywords

Comments

Also the 2-adic order of Fibonacci(3n) [Lengyel]. - R. J. Mathar, Nov 05 2008

Examples

			n=2: 3^2 - 1 = 8 = 2^3 so a(2)=3.
		

Crossrefs

Programs

  • Maple
    seq(padic:-ordp(3^n-1, 2), n=1..100); # Robert Israel, Dec 28 2015
  • Mathematica
    Table[Part[Flatten[FactorInteger[ -1+3^n]], 2], {n, 1, 70}]
    IntegerExponent[#,2]&/@(3^Range[110]-1) (* Harvey P. Dale, Jan 28 2017 *)
  • PARI
    a(n)=if(n<1,0,if(n%2==0,a(n/2)+1+(n/2)%2,1)) /* Ralf Stephan, Jan 23 2004 */
    
  • PARI
    a(n)=valuation(fibonacci(3*n),2); \\ Joerg Arndt, Oct 28 2012
    
  • PARI
    a(n)=my(t=valuation(n,2)); if(t,t+2,1) \\ Charles R Greathouse IV, Mar 14 2014
    
  • Python
    def A090740(n): return (n&-n).bit_length()+int(not n&1) # Chai Wah Wu, Jul 11 2022

Formula

a(n) = A007814(n) + A059841(n) + 1.
Multiplicative with a(p^e) = e+2 if p = 2; 1 if p > 2. G.f.: A(x) = 1/(1-x^2) + Sum_{k>=0} x^(2^k)/(1-x^(2^k)). - Vladeta Jovovic, Jan 19 2004
G.f.: Sum_{k>=0} t*(1+2*t+t^2+t^3)/(1-t^4) with t=x^2^k. Recurrence: a(2n) = a(n) + 1 + [n odd], a(2n+1) = 1. - Ralf Stephan, Jan 23 2004
a(n) = A337923(3*n). [Lengyel]. - R. J. Mathar, Nov 05 2008
G.f. A(x) satisfies A(x) = A(x^2) + x/(1-x) + x^2/(1-x^4). - Robert Israel, Dec 28 2015
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 5/2. - Amiram Eldar, Nov 28 2022
Dirichlet g.f.: zeta(s)*(2^s+1-1/2^s)/(2^s-1). - Amiram Eldar, Jan 04 2023

A091512 a(n) is the largest integer m such that 2^m divides (2*n)^n, i.e., the exponent of 2 in (2*n)^n.

Original entry on oeis.org

1, 4, 3, 12, 5, 12, 7, 32, 9, 20, 11, 36, 13, 28, 15, 80, 17, 36, 19, 60, 21, 44, 23, 96, 25, 52, 27, 84, 29, 60, 31, 192, 33, 68, 35, 108, 37, 76, 39, 160, 41, 84, 43, 132, 45, 92, 47, 240, 49, 100, 51, 156, 53, 108, 55, 224, 57, 116, 59, 180, 61, 124, 63
Offset: 1

Views

Author

Ralf Stephan and Labos Elemer, Jan 18 2004

Keywords

Comments

n times one more than the trailing 0's in the binary representation of n. - Ralf Stephan, Aug 22 2013

Crossrefs

Programs

  • Magma
    [n*(Valuation(n, 2)+1): n in [1..80]]; // Vincenzo Librandi, May 16 2013
    
  • Maple
    nmax:=63: 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) := (2*n-1)*(p+1)*2^p od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Feb 08 2013
    # second Maple program:
    a:= n-> n*padic[ordp](2*n, 2):
    seq(a(n), n=1..63);  # Alois P. Heinz, Jan 02 2024
  • Mathematica
    Table[ Part[ Flatten[ FactorInteger[(2 n)^n]], 2], {n, 1, 124}]
    Table[IntegerExponent[(2n)^n,2],{n,70}] (* Harvey P. Dale, Sep 11 2015 *)
  • PARI
    a(n)=n*(valuation(n,2)+1)
    
  • PARI
    a(n)=if(n<1,0,if(n%2==0,2*a(n/2)+n,n))
    
  • Python
    def A091512(n): return n*(n&-n).bit_length() # Chai Wah Wu, Jul 11 2022

Formula

a(n) = A007814(A000312(n)) = n*A001511(n) = A069895(n)/2.
G.f.: Sum_{k>=0} 2^k*x^2^k/(1-x^2^k)^2.
Recurrence: a(0) = 0, a(2*n) = 2*a(n) + 2*n, a(2*n+1) = 2*n+1.
Dirichlet g.f.: zeta(s-1)*2^s/(2^s-2). - Ralf Stephan, Jun 17 2007
Mobius transform of A162728, where x/(1-x)^2 = Sum_{n>=1} A162728(n)*x^n/(1+x^n). - Paul D. Hanna, Jul 12 2009
a(n) = A162728(2*n)/phi(2*n), where x/(1-x)^2 = Sum_{n>=1} A162728(n)*x^n/(1+x^n). - Paul D. Hanna, Jul 12 2009
a((2*n-1)*2^p) = (2*n-1)*(p+1)*2^p, p >= 0. Observe that a(2^p) = A001787(p+1). - Johannes W. Meijer, Feb 08 2013
Sum_{k=1..n} a(k) ~ n^2. - Amiram Eldar, Oct 22 2022
a(n) = Sum_{d divides n} d*A048298(n/d); that is, a(n) is the Dirichlet product of A048298(n) and A000027(n). - Peter Bala, Jan 02 2024

A249153 Exponent of 2 in the hyperfactorial of 2n: a(n) = A007814(A002109(2n)).

Original entry on oeis.org

0, 2, 10, 16, 40, 50, 74, 88, 152, 170, 210, 232, 304, 330, 386, 416, 576, 610, 682, 720, 840, 882, 970, 1016, 1208, 1258, 1362, 1416, 1584, 1642, 1762, 1824, 2208, 2274, 2410, 2480, 2696, 2770, 2922, 3000, 3320, 3402, 3570, 3656, 3920, 4010, 4194, 4288, 4768, 4866, 5066, 5168, 5480, 5586, 5802, 5912
Offset: 0

Views

Author

Antti Karttunen, Oct 25 2014

Keywords

Crossrefs

Bisection of A249152.
Cf. A002109, A007814, A143157, A069895 (first differences).

Programs

  • Mathematica
    Table[IntegerExponent[Hyperfactorial[2*n], 2], {n, 0, 55}] (* Amiram Eldar, Sep 10 2024 *)
  • Python
    from sympy import multiplicity
    A249153_list, n = [0], 0
    for i in range(2,20002,2):
        n += multiplicity(2,i)*i
        A249153_list.append(n) # Chai Wah Wu, Aug 21 2015

Formula

a(n) = A249152(2*n) = A007814(A002109(2*n)).
a(n) = 2*A143157(n).
a(n) ~ 2*n^2. - Amiram Eldar, Sep 10 2024

A084432 Expansion of 2/(1-x) + Sum_{k>=0} t^2(3-t)/(1+t)/(1-t)^2, where t=x^2^k.

Original entry on oeis.org

2, 5, 4, 10, 6, 11, 8, 19, 10, 17, 12, 24, 14, 23, 16, 36, 18, 29, 20, 38, 22, 35, 24, 49, 26, 41, 28, 52, 30, 47, 32, 69, 34, 53, 36, 66, 38, 59, 40, 79, 42, 65, 44, 80, 46, 71, 48, 98, 50, 77, 52, 94, 54, 83, 56, 109, 58, 89, 60, 108, 62, 95, 64, 134, 66, 101, 68, 122, 70, 107, 72, 139, 74, 113
Offset: 1

Views

Author

Ralf Stephan, Jun 27 2003

Keywords

Crossrefs

Programs

  • PARI
    for(n=1, 100, l=ceil(log(n)/log(2)); t=polcoeff(sum(k=0, l, 1/(1-x^2^k)^2) + O(x^(n+1)), n); print1(t", "))

Formula

a(1)=2, a(2*n) = a(n)+2*n+1, a(2*n+1) = 2*n+2.
Dirichlet g.f.: 2^s/(2^s-1) * (zeta(s)+zeta(s-1)). - Ralf Stephan, Jun 17 2007
From Seiichi Manyama, May 27 2024: (Start)
G.f. A(x) satisfies A(x) = 1/(1 - x)^2 - 1 + A(x^2).
G.f.: A(x) = Sum_{k>=0} (1/(1 - x^(2^k))^2 - 1). (End)
Conjecture: a(n) is the number of integer solutions (x,y,z) to the Diophantine equation 2^x*(y+z) = n, where 0 <= x,y,z <= n. - Joseph M. Shunia, Aug 27 2024
Sum_{k=1..n} a(k) ~ 2*n^2/3 + 2*n. - Vaclav Kotesovec, Aug 28 2024
Showing 1-6 of 6 results.