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

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

A385458 Triangle read by rows: T(n,k) = exponent of the highest power of 2 dividing each Fibonomial coefficient fibonomial(n, k).

Original entry on oeis.org

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

Views

Author

David Radcliffe, Jun 29 2025

Keywords

Examples

			Triangle begins:
   n\k  0  1  2  3  4  5  6  7  8  9 10 11 12
   0:   0
   1:   0  0
   2:   0  0  0
   3:   0  1  1  0
   4:   0  0  1  0  0
   5:   0  0  0  0  0  0
   6:   0  3  3  2  3  3  0
   7:   0  0  3  2  2  3  0  0
   8:   0  0  0  2  2  2  0  0  0
   9:   0  1  1  0  3  3  0  1  1  0
  10:   0  0  1  0  0  3  0  0  1  0  0
  11:   0  0  0  0  0  0  0  0  0  0  0  0
  12:   0  4  4  3  4  4  1  4  4  3  4  4  0
		

Crossrefs

Programs

  • Julia
    function T_row(n)
        function T(n, k)
            c(a, b) = 2 * a + b ÷ 6 - count_ones(a)
            (nd, nm) = divrem(n, 3)
            (kd, km) = divrem(k, 3)
            !(nm < km || (kd & (nd - kd)) != 0) && return 0
            c(nd, n) - c(kd, k) - c((n - k) ÷ 3, n - k)
        end
        [T(n, k) for k in 0:n]
    end
    for n in 0:12 println(T_row(n)) end  # Peter Luschny, Jul 02 2025
  • Mathematica
    A385608[n_] := A385608[n] = 2*# + Quotient[n, 6] - DigitSum[#, 2] & [Quotient[n, 3]];
    A385458[n_, k_] := A385608[n] - A385608[k] - A385608[n-k];
    Table[A385458[n, k], {n, 0, 15}, {k, 0, n}] (* Paolo Xausa, Jul 04 2025 *)
  • Python
    def b(n): return 2*(n//3) + n//6 - (n//3).bit_count()
    def T(n, k): return b(n) - b(k) - b(n-k) # David Radcliffe, Jul 01 2025
    

Formula

T(n, k) = A007814(A010048(n, k)).
T(n, k) = Sum_{i=1..k} (A337923(n+1-i) - A337923(i)).
T(n, k) = b(n) - b(k) - b(n - k), where b(n) = 2*floor(n/3) + floor(n/6) - A000120(floor(n/3)) = A385608(n) is the 2-adic valuation of the product of the first n Fibonacci numbers.
sign(T(n, k)) = 1 - A385456(n, k). - Peter Luschny, Jul 03 2025

A385608 a(n) = 2-adic valuation of A003266(n).

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 4, 4, 4, 5, 5, 5, 9, 9, 9, 10, 10, 10, 13, 13, 13, 14, 14, 14, 19, 19, 19, 20, 20, 20, 23, 23, 23, 24, 24, 24, 28, 28, 28, 29, 29, 29, 32, 32, 32, 33, 33, 33, 39, 39, 39, 40, 40, 40, 43, 43, 43, 44, 44, 44, 48, 48, 48, 49, 49, 49, 52, 52, 52, 53, 53, 53
Offset: 0

Views

Author

Paolo Xausa, Jul 04 2025

Keywords

Crossrefs

Partial sums of A337923.

Programs

  • Mathematica
    A385608[n_] := 2*# + Quotient[n, 6] - DigitSum[#, 2] & [Quotient[n, 3]];
    Array[A385608, 100, 0] (* or *)
    Join[{0}, Accumulate[IntegerExponent[Fibonacci[Range[99]], 2]]]

Formula

a(n) = 2*floor(n/3) + floor(n/6) - A000120(floor(n/3)) (formula by David Radcliffe at A385458).
a(n) = A007814(A003266(n)).
For n >= 1, a(n) = Sum_{k=1..n} A337923(k).
a(3*k) = a(3*k+1) = a(3*k+2), for k >= 0.

A083523 Smallest Fibonacci number divisible by 2^n.

Original entry on oeis.org

1, 2, 8, 8, 144, 46368, 4807526976, 51680708854858323072, 5972304273877744135569338397692020533504, 79757008057644623350300078764807923712509139103039448418553259155159833079730688
Offset: 0

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 05 2003

Keywords

Comments

The index of the Fibonacci numbers above begin: 1, 3, 6, 6 and then doubles thereafter.

Crossrefs

Programs

  • Mathematica
    Do[k = 1; While[ !IntegerQ[ Fibonacci[k]/2^n], k++ ]; Print[ Fibonacci[k]], {n, 0, 10}]
    With[{fibs=Fibonacci[Range[1000]]},Table[SelectFirst[fibs, Divisible[#,2^n]&],{n,0,10}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 02 2021 *)
    Join[{1, 2, 8}, Table[Fibonacci[3*2^(n - 2)], {n, 3, 9}]] (* Amiram Eldar, Jan 29 2022 *)

Formula

From Amiram Eldar, Jan 29 2022: (Start)
a(n) = Fibonacci(3*2^(n-2)) = A000045(A007283(n-2)) = A079613(n-2), for n > 2.
Sum_{n>=0} 1/a(n) = 19/8 - 1/phi, where phi is the golden ratio (A001622). (End)

Extensions

Edited and extended by Robert G. Wilson v, May 06 2003
Showing 1-4 of 4 results.