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.

A090740 Exponent of 2 in 3^n - 1.

This page as a plain text file.
%I A090740 #47 Jun 28 2025 09:12:33
%S A090740 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,
%T A090740 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,
%U A090740 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
%N A090740 Exponent of 2 in 3^n - 1.
%C A090740 Also the 2-adic order of Fibonacci(3n) [Lengyel]. - _R. J. Mathar_, Nov 05 2008
%H A090740 Robert Israel, <a href="/A090740/b090740.txt">Table of n, a(n) for n = 1..10000</a>
%H A090740 T. Lengyel, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/33-3/lengyel.pdf">The order of the Fibonacci and Lucas numbers</a>, Fib. Quart. 33 (1995), 234-239.
%H A090740 Diego Marques and Pavel Trojovský, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Marques2/marques11.html">The p-adic order of some fibonomial coefficients</a>, J. Int. Seq. 18 (2015), Article 15.3.1, proposition 7.
%F A090740 a(n) = A007814(n) + A059841(n) + 1.
%F A090740 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
%F A090740 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
%F A090740 a(n) = A337923(3*n). [Lengyel]. - _R. J. Mathar_, Nov 05 2008
%F A090740 G.f. A(x) satisfies A(x) = A(x^2) + x/(1-x) + x^2/(1-x^4). - _Robert Israel_, Dec 28 2015
%F A090740 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 5/2. - _Amiram Eldar_, Nov 28 2022
%F A090740 Dirichlet g.f.: zeta(s)*(2^s+1-1/2^s)/(2^s-1). - _Amiram Eldar_, Jan 04 2023
%e A090740 n=2: 3^2 - 1 = 8 = 2^3 so a(2)=3.
%p A090740 seq(padic:-ordp(3^n-1, 2), n=1..100); # _Robert Israel_, Dec 28 2015
%t A090740 Table[Part[Flatten[FactorInteger[ -1+3^n]], 2], {n, 1, 70}]
%t A090740 IntegerExponent[#,2]&/@(3^Range[110]-1) (* _Harvey P. Dale_, Jan 28 2017 *)
%o A090740 (PARI) a(n)=if(n<1,0,if(n%2==0,a(n/2)+1+(n/2)%2,1)) /* _Ralf Stephan_, Jan 23 2004 */
%o A090740 (PARI) a(n)=valuation(fibonacci(3*n),2); \\ _Joerg Arndt_, Oct 28 2012
%o A090740 (PARI) a(n)=my(t=valuation(n,2)); if(t,t+2,1) \\ _Charles R Greathouse IV_, Mar 14 2014
%o A090740 (Python)
%o A090740 def A090740(n): return (n&-n).bit_length()+int(not n&1) # _Chai Wah Wu_, Jul 11 2022
%Y A090740 Cf. A069895, A091512, A088660, A090739, A001511.
%Y A090740 Cf. A007814, A014445, A059841.
%K A090740 nonn,mult,easy
%O A090740 1,2
%A A090740 _Labos Elemer_ and _Ralf Stephan_, Jan 19 2004