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

A249343 The exponent of the highest power of 3 dividing the product of the elements on the n-th row of Pascal's triangle (A001142(n)).

Original entry on oeis.org

0, 0, 0, 2, 1, 0, 4, 2, 0, 14, 10, 6, 13, 8, 3, 12, 6, 0, 28, 20, 12, 24, 15, 6, 20, 10, 0, 68, 55, 42, 58, 44, 30, 48, 33, 18, 73, 56, 39, 60, 42, 24, 47, 28, 9, 78, 57, 36, 62, 40, 18, 46, 23, 0, 136, 110, 84, 114, 87, 60, 92, 64, 36, 132, 102, 72, 107, 76, 45, 82, 50, 18, 128, 94, 60, 100, 65, 30, 72, 36, 0
Offset: 0

Views

Author

Antti Karttunen, Oct 28 2014

Keywords

Crossrefs

Row sums of A243759.
Row 2 of array A249421.

Programs

  • Haskell
    a249343 = a007949 . a001142  -- Reinhard Zumkeller, Mar 16 2015
  • Mathematica
    A249343[n_] := Sum[#*((#+1)*3^k - n - 1) & [Floor[n/3^k]], {k, Floor[Log[3, n]]}];
    Array[A249343, 100, 0] (* Paolo Xausa, Feb 11 2025 *)
  • PARI
    allocatemem(234567890);
    A249343(n) = sum(k=0, n, valuation(binomial(n, k), 3));
    for(n=0, 6560, write("b249343.txt", n, " ", A249343(n)));
    
  • Scheme
    (define (A249343 n) (add A243759 (A000217 n) (A000096 n)))
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (+ 1 i) (+ res (intfun i)))))))
    

Formula

a(n) = A007949(A001142(n)).
a(n) = Sum_{k=0..n} A243759(n,k).
a(n) = Sum_{i=1..n} (2*i-n-1)*v_3(i), where v_3(i) = A007949(i) is the exponent of the highest power of 3 dividing i. - Ridouane Oudra, Jun 02 2022
a(n) = Sum_{k=1..floor(log_3(n))} t*((t+1)*3^k - n - 1), where t = floor(n/(3^k)). - Paolo Xausa, Feb 11 2025, derived from Ridouane Oudra's formula above.

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
Showing 1-2 of 2 results.