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.

A070940 Number of digits that must be counted from left to right to reach the last 1 in the binary representation of n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, May 18 2002

Keywords

Comments

Length of longest carry sequence when adding numbers <= n to n in binary representation: a(n) = T(n, A080079(n)) and T(n,k) <= a(n) for 1 <= k <= n, with T defined as in A080080. - Reinhard Zumkeller, Jan 26 2003
a(n+1) is the number of distinct values of gcd(2^n, binomial(n,j)) (or, equivalently, A007814(binomial(n,j))) arising for j=0..n-1. Proof using Kummer's Theorem given by Marc Schwartz. - Labos Elemer, Apr 23 2003
E.g., n=10: 10th row of Pascal's triangle = {1,10,45,120,210,252,210,120,45,10,1}, largest powers of 2 dividing binomial coefficients is: {1,2,1,8,2,4,2,8,1,2,1}; including distinct powers of 2, thus a(10)=4. If m=-1+2^k, i.e., m=0,1,3,7,15,31,... then a(m)=1. This corresponds to "odd rows" of Pascal's triangle. - Labos Elemer
Smallest x > 0 for which a(x)=n equals 2^n. - Labos Elemer
a(n) <= A070939(n), a(n) = A070939(n) iff n is odd, where A070939(n) = floor(log_2(n)) + 1. - Reinhard Zumkeller, Jan 26 2003
Can be regarded as a table with row n having 2^(n-1) columns, with odd columns repeating the previous row, and even columns containing the row number. - Franklin T. Adams-Watters, Nov 08 2011
It appears that a(n) is the greatest number in a periodicity equivalence class defined at A269570; e.g., the 5 classes for n = 35 are (1, 1, 2, 2, 6), (1, 1, 1, 1, 4, 2, 2), (3), (1, 3), (1, 2); in these the greatest number is 6, so that a(35) = 6. - Clark Kimberling, Mar 01 2016
Number of binary digits of the largest odd factor of n. - Andres Cicuttin, May 18 2017

Examples

			a(10)=3 is the number of digits that must be counted from left to right to reach the last 1 in 1010, the binary representation of 10.
The table starts:
  1
  1 2
  1 3 2 3
  1 4 3 4 2 4 3 4
		

Crossrefs

Cf. A070939, A001511. Differs from A002487 around 11th term.
Bisections give A070941 and this sequence (again).
Cf. A002064 (row sums), A199570.

Programs

  • Haskell
    a070940 = maximum . a080080_row  -- Reinhard Zumkeller, Apr 22 2013
    
  • Maple
    A070940 := n -> if n mod 2 = 0 then A070939(n)-A001511(n/2) else A070939(n); fi;
  • Mathematica
    Table[Length[Union[Table[GCD[2^n, Binomial[n, j]], {j, 0, n}]]], {n, 0, 256}]
    f[n_] := Position[ IntegerDigits[n, 2], 1][[ -1, 1]]; Table[ f[n], {n, 105}] (* Robert G. Wilson v, Dec 01 2004 *)
    (* By exploiting the "positional" regularity of the sequence *)
    b = {}; a = {1, 1};
    Do[a = Riffle[a, j];
      b = AppendTo[b, a[[1 ;; Floor[Length[a]/2]]]] // Flatten, {j, 1, 10}];
    Print[b[[1 ;; 100]]] (* Andres Cicuttin, May 18 2017 *)
    (* By following the alternative definition "Number of binary digits of the largest integer odd factor of n" *)
    c = Table[IntegerDigits[n/(2^IntegerExponent[n, 2]), 2] // Length , {n,
        2^10 - 1}];
    Print[c[[1 ;; 100]]] (* Andres Cicuttin, May 18 2017 *)
    lidn[n_]:=Module[{idn=IntegerDigits[n,2]},idn=If[Last[idn]==0,Flatten[ Most[ Split[ idn]]],idn];Length[idn]]; Array[lidn,100] (* Harvey P. Dale, Oct 18 2020 *)
    Table[IntegerLength[FromDigits[Reverse[IntegerDigits[n,2]]]],{n,100}] (* Harvey P. Dale, Jan 26 2025 *)
  • Python
    def A070940(n):
        while n%2 == 0:
            n = n//2
        a = 0
        while n != 0:
            n, a = n//2, a+1
        return a
    n = 0
    while n < 100:
        n = n+1
        print(n,A070940(n)) # A.H.M. Smeets, Aug 19 2019
    
  • Python
    def A070940(n): return n.bit_length()-(~n&n-1).bit_length() # Chai Wah Wu, Jul 13 2022
  • R
    blocklevel <- 7  # by choice
    a <- 1
    for(m in 0:blocklevel)
      for(k in 0:(2^m-1)){
        a[2^(m+1)+2*k  ] <-  a[2^m+k]
        a[2^(m+1)+2*k+1] <-  m + 2
    }
    a
    # Yosu Yurramendi, Aug 08 2019
    

Formula

a(n) = floor(log_2(n)) - A007814(n) = A070939(n) - A007814(n).
a(n) = f(n, 1), f(n, k) = if n=1 then k else f(floor(n/2), k+(if k>1 then 1 else n mod 2)). - Reinhard Zumkeller, Feb 01 2003
G.f.: Sum_{k>=0} (t/(1-t^2)) * (1 + Sum_{L>=1} t^2^L), where t=x^2^k. - Ralf Stephan, Mar 15 2004
a(n) = A070939(A000265(n)). - Andres Cicuttin, May 19 2017
a(1) = 1 and for m >= 0, 0 <= k < 2^m, a(2^(m+1)+2*k) = a(2^m+k), a(2^(m+1)+2*k+1) = m+2. - Yosu Yurramendi, Aug 08 2019

Extensions

Entry revised by Ralf Stephan, Nov 29 2004

A065040 Triangle read by rows: T(m,k) = exponent of the highest power of 2 dividing the binomial coefficient binomial(m,k).

Original entry on oeis.org

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

Views

Author

Claude Lenormand (hlne.lenormand(AT)voono.net), Nov 05 2001

Keywords

Comments

T(m,k) is the number of 'carries' that occur when adding k and m-k in base 2 using the traditional addition algorithm. - Tom Edgar, Jun 10 2014

Examples

			Triangle begins:
[0]
[0, 0]
[0, 1, 0]
[0, 0, 0, 0]
[0, 2, 1, 2, 0]
[0, 0, 1, 1, 0, 0]
[0, 1, 0, 2, 0, 1, 0]
[0, 0, 0, 0, 0, 0, 0, 0]
[0, 3, 2, 3, 1, 3, 2, 3, 0]
[0, 0, 2, 2, 1, 1, 2, 2, 0, 0]
[0, 1, 0, 3, 1, 2, 1, 3, 0, 1, 0]
... - _N. J. A. Sloane_, Aug 21 2021
		

Crossrefs

Programs

  • Maple
    A065040 := (n, k) -> padic[ordp](binomial(n, k), 2):
    seq(seq(A065040(n,k), k=0..n), n=0..13); # Peter Luschny, Aug 15 2017
  • Mathematica
    T[m_, k_] := IntegerExponent[Binomial[m, k], 2]; Table[T[m, k], {m, 0, 13}, {k, 0, m}] // Flatten (* Jean-François Alcover, Oct 06 2016 *)
  • PARI
    T(m,k)=hammingweight(k)+hammingweight(m-k)-hammingweight(m)
    for(m=0,9,for(k=0,m,print1(T(m,k)", "))) \\ Charles R Greathouse IV, Mar 26 2013

Formula

As an array f(i,j) = f(j,i) = T(i+j,j) read by antidiagonals: f(0,j) = 0, f(1,j) = A007814(j+1), f(i,j) = Sum_{k=0..i-1} (f(1,j+k) - f(1,k)). [corrected by Kevin Ryde, Oct 07 2021]
The n-th term a(n) is equal to the binomial coefficient binomial(m,k), where m = floor((1+sqrt(8*n+1))/2) - 1 and k = n - m(m+1)/2. Also a(n) = g(m) - g(k) - g(m-k), where g(x) = Sum_{i=1..floor(log_2(x))} floor(x/2^i), m = floor((1+sqrt(8*n+1))/2) - 1, k = n - m(m+1)/2. - Hieronymus Fischer, May 05 2007
T(m,k) <= log_2 m, for m > 0. - Charles R Greathouse IV, Mar 26 2013
T(m,k) = log_2(A082907(m,k)). - Tom Edgar, Jun 10 2014
From Antti Karttunen, Oct 28 2014: (Start)
a(n) = A007814(A007318(n)).
a(n) * A047999(n) = 0 and a(n) + A047999(n) > 0 for all n.
(End)

Extensions

Name clarified by Antti Karttunen, Oct 28 2014

A242849 Triangle read by rows: T(n,k) = A060828(n)/(A060828(k) * A060828(n-k)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 3, 3, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 3, 9, 9, 3, 9, 9, 1, 1, 1, 9, 3, 3, 9, 3, 3, 9, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 3, 3, 1, 9, 9, 3, 9, 9, 1
Offset: 0

Views

Author

Tom Edgar, May 23 2014

Keywords

Comments

This triangle can be obtained by replacing each entry of Pascal's Triangle by the largest power of 3 dividing that entry.
The exponent of T(n,k) is the number of 'carries' that occur when adding k and n-k in base 3 using the traditional addition algorithm.
If T(n,k) != 0 mod 3, then n dominates k in base 3.

Examples

			The triangle begins
1
1 1
1 1 1
1 3 3 1
1 1 3 1 1
1 1 1 1 1 1
1 3 3 1 3 3 1.
		

Crossrefs

Programs

  • Mathematica
    s3[n_] := 3^IntegerExponent[n!, 3];
    T[n_, k_] := s3[n]/(s3[k] s3[n-k]);
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 06 2018 *)
  • Sage
    m=50
    T=[0]+[3^valuation(i,3) for i in [1..m]]
    Table=[[prod(T[1:i+1])/(prod(T[1:j+1])*prod(T[1:i-j+1])) for j in [0..i]] for i in [0..m-1]]
    [x for sublist in Table for x in sublist]

Formula

T(n,k) = A060828(n)/(A060828(k) * A060828(n-k)).
T(n,k) = Product_{i=1..n} A038500(i)/(Product_{i=1..k} A038500(i)*Product_{i=1..n-k} A038500(i)).
T(n,k) = A038500(n)/n*(k/A038500(k)*T(n-1,k-1)+(n-k)/A038500(n-k)*T(n-1,k)).

A319861 Triangle read by rows, 0 <= k <= n: T(n,k) is the numerator of the k-th Bernstein basis polynomial of degree n evaluated at the interval midpoint t = 1/2; denominator is A319862.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 3, 1, 1, 1, 5, 5, 5, 5, 1, 1, 3, 15, 5, 15, 3, 1, 1, 7, 21, 35, 35, 21, 7, 1, 1, 1, 7, 7, 35, 7, 7, 1, 1, 1, 9, 9, 21, 63, 63, 21, 9, 9, 1, 1, 5, 45, 15, 105, 63, 105, 15, 45, 5, 1, 1, 11, 55, 165, 165, 231, 231, 165, 165, 55, 11, 1
Offset: 0

Views

Author

Keywords

Comments

In Computer-Aided Geometric Design, the affine combination Sum_{k=0..n} (T(n,k)/A319862(n,k))*P_k is the halfway point for the Bézier curve of degree n defined by the control points P_k, k = 0, 1, ..., n.

Examples

			Triangle begins:
  1;
  1, 1;
  1, 1,  1;
  1, 3,  3,  1;
  1, 1,  3,  1,   1;
  1, 5,  5,  5,   5,  1;
  1, 3, 15,  5,  15,  3,   1;
  1, 7, 21, 35,  35, 21,   7,  1;
  1, 1,  7,  7,  35,  7,   7,  1,  1;
  1, 9,  9, 21,  63, 63,  21,  9,  9, 1;
  1, 5, 45, 15, 105, 63, 105, 15, 45, 5, 1;
  ...
		

Crossrefs

Programs

  • GAP
    Flat(List([0..11],n->List([0..n],k->Binomial(n,k)/Gcd(Binomial(n,k),2^n)))); # Muniru A Asiru, Sep 30 2018
    
  • Maple
    a:=(n,k)->binomial(n,k)/gcd(binomial(n,k),2^n): seq(seq(a(n,k),k=0..n),n=0..11); # Muniru A Asiru, Sep 30 2018
  • Mathematica
    T[n_, k_] = Binomial[n, k]/GCD[Binomial[n, k], 2^n];
    tabl[nn_] = TableForm[Table[T[n, k], {n, 0, nn}, {k, 0, n}]];
  • Maxima
    T(n,k) := binomial(n, k)/gcd(binomial(n, k), 2^n)$
    tabl(nn) := for n:0 thru nn do print(makelist(T(n, k), k, 0, n))$
    
  • Sage
    flatten([[numerator(binomial(n,k)/2^n) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jul 19 2021

Formula

T(n, k) = numerator of binomial(n,k)/2^n.
T(n, k) = binomial(n,k)/A082907(n,k).
T(n, k)/A319862(n,k) = binomial(n,k)/2^n.
T(n, n-k) = T(n,k).
T(n, 0) = 1.
T(n, 1) = A000265(n) (with offset 0, following Peter Luschny's formula).
T(n, 2) = A069834(n-1), n > 1.
Sum_{k=0..n} 2*k*T(n,k)/A319862(n,k) = n.
Sum_{k=0..n} 2*k^2*T(n,k)/A319862(n,k) = A000217(n).

A319862 Triangle read by rows, 0 <= k <= n: T(n,k) is the denominator of the k-th Bernstein basis polynomial of degree n evaluated at the interval midpoint t = 1/2; numerator is A319861.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 8, 8, 8, 8, 16, 4, 8, 4, 16, 32, 32, 16, 16, 32, 32, 64, 32, 64, 16, 64, 32, 64, 128, 128, 128, 128, 128, 128, 128, 128, 256, 32, 64, 32, 128, 32, 64, 32, 256, 512, 512, 128, 128, 256, 256, 128, 128, 512, 512, 1024, 512, 1024, 128, 512, 256, 512, 128, 1024, 512, 1024
Offset: 0

Views

Author

Keywords

Examples

			Triangle begins:
    1;
    2,   2;
    4,   2,   4;
    8,   8,   8,   8;
   16,   4,   8,   4,  16;
   32,  32,  16,  16,  32,  32;
   64,  32,  64,  16,  64,  32,  64;
  128, 128, 128, 128, 128, 128, 128, 128;
  256,  32,  64,  32, 128,  32,  64,  32, 256;
  512, 512, 128, 128, 256, 256, 128, 128, 512, 512;
  ...
		

Crossrefs

Programs

  • GAP
    Flat(List([0..11],n->List([0..n],k->2^n/Gcd(Binomial(n,k),2^n)))); # Muniru A Asiru, Sep 30 2018
    
  • Maple
    a:=(n,k)->2^n/gcd(binomial(n,k),2^n): seq(seq(a(n,k),k=0..n),n=0..11); # Muniru A Asiru, Sep 30 2018
  • Mathematica
    T[n_, k_] = 2^n/GCD[Binomial[n, k], 2^n];
    tabl[nn_] = TableForm[Table[T[n, k], {n, 0, nn}, {k, 0, n}]];
  • Maxima
    T(n, k) := 2^n/gcd(binomial(n, k), 2^n)$
    tabl(nn) := for n:0 thru nn do print(makelist(T(n, k), k, 0, n))$
    
  • Sage
    def A319862(n,k): return denominator(binomial(n,k)/2^n)
    flatten([[A319862(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jul 20 2021

Formula

T(n, k) = denominator of binomial(n,k)/2^n.
T(n, k) = 2^n/A082907(n,k).
A319862(n, k)/T(n, k) = binomial(n,k)/2^n.
T(n, n-k) = T(n, k).
T(n, 0) = 2^n.
T(n, 1) = A075101(n).

A254609 Triangle read by rows: T(n,k) = A243757(n)/(A243757(k)*A243757(n-k)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 1, 1, 1, 5, 5, 5, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 1, 5, 5, 5, 5, 1, 1, 1, 5, 5, 5, 1, 1, 5, 5, 5, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 5, 5
Offset: 0

Views

Author

Tom Edgar, Feb 02 2015

Keywords

Comments

These are the generalized binomial coefficients associated with A060904.
The exponent of T(n,k) is the number of 'carries' that occur when adding k and n-k in base 5 using the traditional addition algorithm.
If T(n,k) != 0 mod 5, then n dominates k in base 5.
A194459(n) = number of ones in row n. - Reinhard Zumkeller, Feb 04 2015

Examples

			The first five terms in A060904 are 1, 1, 1, 1, and 5 and so T(4,2) = 1*1*1*1/((1*1)*(1*1))=1 and T(5,3) = 5*1*1*1*1/((1*1*1)*(1*1))=5.
The triangle begins:
1
1, 1
1, 1, 1
1, 1, 1, 1
1, 1, 1, 1, 1
1, 5, 5, 5, 5, 1
1, 1, 5, 5, 5, 1, 1
1, 1, 1, 5, 5, 1, 1, 1
1, 1, 1, 1, 5, 1, 1, 1, 1
1, 1, 1, 1, 1, 1, 1, 1, 1, 1
1, 5, 5, 5, 5, 1, 5, 5, 5, 5, 1
1, 1, 5, 5, 5, 1, 1, 5, 5, 5, 1, 1
1, 1, 1, 5, 5, 1, 1, 1, 5, 5, 1, 1, 1
1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
		

Crossrefs

Programs

  • Haskell
    import Data.List (inits)
    a254609 n k = a254609_tabl !! n !! k
    a254609_row n = a254609_tabl !! n
    a254609_tabl = zipWith (map . div)
       a243757_list $ zipWith (zipWith (*)) xss $ map reverse xss
       where xss = tail $ inits a243757_list
    -- Reinhard Zumkeller, Feb 04 2015

Formula

T(n,k) = A243757(n)/(A243757(k)*A243757(n-k)).
T(n,k) = Product_{i=1..n} A060904(i)/(Product_{i=1..k} A060904(i)*Product_{i=1..n-k} A060904(i)).
T(n,k) = A060904(n)/n*(k/A060904(k)*T(n-1,k-1)+(n-k)/A060904(n-k)*T(n-1,k)).

A082908 Largest value of gcd(2^n, binomial(n,j)) with j=0..n-1; maximum value of largest power of 2 dividing binomial(n,j) in the n-th row of Pascal's triangle.

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 4, 1, 8, 4, 8, 2, 8, 4, 8, 1, 16, 8, 16, 4, 16, 8, 16, 2, 16, 8, 16, 4, 16, 8, 16, 1, 32, 16, 32, 8, 32, 16, 32, 4, 32, 16, 32, 8, 32, 16, 32, 2, 32, 16, 32, 8, 32, 16, 32, 4, 32, 16, 32, 8, 32, 16, 32, 1, 64, 32, 64, 16, 64, 32, 64, 8, 64, 32, 64, 16, 64, 32, 64, 4, 64, 32
Offset: 0

Views

Author

Labos Elemer, Apr 23 2003

Keywords

Examples

			For n = 10: the 10th row = {1,10,45,120,210,252,210,120,45,10,1}, the largest powers of 2 dividing the entries: {1,2,1,8,2,4,2,8,1,2,1}; maximum 2^k-divisor is a(10) = 8.
		

Crossrefs

Programs

  • Mathematica
    Table[Max[Table[GCD[2^n, Binomial[n, j]], {j, 0, n}]], {n, 0, 128}]
    a[n_] := 2^Floor[Log2[(n+1) / 2^IntegerExponent[n+1, 2]]]; Array[a, 82, 0] (* Amiram Eldar, Mar 15 2025 *)
  • PARI
    a(n)=n--; 2^(log(n>>valuation(n, 2)+.5)\log(2)) \\ Charles R Greathouse IV, May 06 2013

Formula

a(n) = Max_{gcd(2^n, binomial(n, j)), j=0..n}.
a(n-1) = 2^floor(log_2(A000265(n))). - Brad Clardy, May 06 2013

A243756 Triangle read by rows: T(n,k) = A242954(n)/(A242954(k) * A242954(n-k)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 4, 4, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 1, 4, 4, 4, 1, 1, 1, 4, 4, 1, 1, 4, 4, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 1, 4, 4, 4, 1, 4, 4, 4, 1
Offset: 0

Views

Author

Tom Edgar, Jun 09 2014

Keywords

Comments

The exponent of T(n,k) is the number of 'carries' that occur when adding k and n-k in base 4 using the traditional addition algorithm.
If T(n,k) != 0 mod 4, then n dominates k in base 4.

Examples

			The triangle begins:
1;
1, 1;
1, 1, 1;
1, 1, 1, 1;
1, 4, 4, 4, 1;
1, 1, 4, 4, 1, 1;
1, 1, 1, 4, 1, 1, 1;
1, 1, 1, 1, 1, 1, 1, 1;
1, 4, 4, 4, 1, 4, 4, 4, 1;
1, 1, 4, 4, 1, 1, 4, 4, 1, 1;
1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1;
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
		

Crossrefs

Programs

  • Sage
    m=50
    T=[0]+[4^valuation(i, 4) for i in [1..m]]
    Table=[[prod(T[1:i+1])/(prod(T[1:j+1])*prod(T[1:i-j+1])) for j in [0..i]] for i in [0..m-1]]
    [x for sublist in Table for x in sublist]

Formula

T(n,k) = A242954(n)/(A242954(k) * A242954(n-k)).
T(n,k) = Product_{i=1..n} A234957(i)/(Product_{i=1..k} A234957(i)*Product_{i=1..n-k} A234957(i)).
T(n,k) = A234957(n)/n*(k/A234957(k)*T(n-1,k-1)+(n-k)/A234957(n-k)*T(n-1,k)).

A254730 Triangle read by rows: T(n,k) = A243758(n)/(A243758(k)*A243758(n-k)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 1, 1, 1, 6, 6, 6, 6, 1, 1, 1, 1, 1, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 1, 6, 6, 6
Offset: 0

Views

Author

Tom Edgar, Feb 06 2015

Keywords

Comments

These are the generalized binomial coefficients associated with A234959.
The exponent of T(n,k) is the number of 'carries' that occur when adding k and n-k in base 6 using the traditional addition algorithm.
If T(n,k) != 0 mod 6, then n dominates k in base 6.

Examples

			The first six terms in A234959 are 1, 1, 1, 1, 1 and 6 and so T(4,2) = 1*1*1*1/((1*1)*(1*1))=1 and T(6,3) = 6*1*1*1*1*1/((1*1*1)*(1*1*1))=6.
The triangle begins:
1
1, 1
1, 1, 1
1, 1, 1, 1
1, 1, 1, 1, 1
1, 1, 1, 1, 1, 1
1, 6, 6, 6, 6, 6, 1
1, 1, 6, 6, 6, 6, 1, 1
1, 1, 1, 6, 6, 6, 1, 1, 1
1, 1, 1, 1, 6, 6, 1, 1, 1, 1
1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
1, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 1
1, 1, 6, 6, 6, 6, 1, 1, 6, 6, 6, 6, 1, 1
1, 1, 1, 6, 6, 6, 1, 1, 1, 6, 6, 6, 1, 1, 1
1, 1, 1, 1, 6, 6, 1, 1, 1, 1, 6, 6, 1, 1, 1, 1
1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
		

Crossrefs

Programs

  • Haskell
    import Data.List (inits)
    a254730 n k = a254730_tabl !! n !! k
    a254730_row n = a254730_tabl !! n
    a254730_tabl = zipWith (map . div)
       a243758_list $ zipWith (zipWith (*)) xss $ map reverse xss
       where xss = tail $ inits a243758_list
    -- Reinhard Zumkeller, Feb 09 2015
  • Sage
    P=[0]+[6^valuation(i,6) for i in [1..100]]
    [m for sublist in [[mul(P[1:n+1])/(mul(P[1:k+1])*mul(P[1:(n-k)+1])) for k in [0..n]] for n in [0..len(P)-1]] for m in sublist]
    

Formula

T(n,k) = A243758(n)/(A243758(k)*A243758(n-k)).
T(n,k) = Product_{i=1..n} A234959(i)/(Product_{i=1..k} A234959(i)*Product_{i=1..n-k} A234959(i)).
T(n,k) = A234959(n)/n*(k/A234959(k)*T(n-1,k-1)+(n-k)/A234959(n-k)*T(n-1,k)).
Showing 1-9 of 9 results.