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.

A067397 Maximal power of 3 that divides n-th Catalan number.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Jan 22 2002

Keywords

Comments

Let v(n) = A007949(n) be the 3-adic valuation of n. For n == 0 or 1 (mod 3), we have a(n) = v(binomial(2*n,n)/(n+1)) = v(binomial(2*n,n)) = A000989(n), so a(n) = 0 if and only if n is in A005836. For n == 0 or 2 (mod 3), we have a(n) = v(binomial(2*n+2,n+1)/(4*n+2)) = v(binomial(2*n+2,n+1)) = A000989(n+1), so a(n) = 0 if and only if n+1 is in A005836. In other words, the indices of 0 are precisely numbers of the form 3*k-1 (k>0), 3*k or 3*k+1 for k in A005836. - Jianing Song, Feb 29 2024

Examples

			a(13)=0 since Catalan(13)=742900, which is not divisible by 3; a(14)=2 since Catalan(14)=2674440, which is divisible by 9 but not by 27.
		

Crossrefs

Programs

  • Maple
    ListTools:-PartialSums([seq(padic:-ordp((2*n-1)/(n+1),3),n=0..100)]); # Robert Israel, Sep 20 2015
  • Mathematica
    f[n_] := Block[{p = FactorInteger@ n}, Take[Last /@ p, Flatten@ Position[First /@ p, 3]]]; Table[f[(2 n)!/n!/(n + 1)!], {n, 104}] /. {} -> 0 // Flatten (* Michael De Vlieger, Sep 21 2015 *)
    IntegerExponent[#,3]&/@CatalanNumber[Range[0,110]] (* Harvey P. Dale, Oct 09 2015 *)
  • PARI
    a(n) = (sumdigits(n,3) + sumdigits(n+1,3) - sumdigits(2*n,3) - 1)/2 \\ Jianing Song, Feb 24 2024

Formula

Let k=floor(log3(n)), i.e., 3^k<=n<3^(k+1): if (3/2)*3^k
G.f.: Sum_{k>=1} (x^((3^k+1)/2) - x^(3^k-1))/((1-x^(3^k))*(1-x)). - Robert Israel, Sep 20 2015
a(n) = A000989(n) - A007949(n+1). - Amiram Eldar, Feb 21 2021
a(n) = A007949((2n)!) - A007949(n!) - A007949((n+1)!) = (A053735(n) + A053735(n+1) - A053735(2n) - 1)/2. - Jianing Song, Feb 24 2024

A263924 Numbers n such that there is a prime p > 3 and an exponent e such that the central binomial coefficient binomial(2n, n) is divisible by p^e but not by either 2^e or 3^e.

Original entry on oeis.org

64, 256, 272, 324, 513, 514, 516, 544, 1026, 1028, 1032, 1064, 1088, 1089, 1216, 1544, 1552, 1568, 1569, 2052, 2056, 2064, 2188, 2192, 2193, 2194, 2208, 2224, 2244, 2248, 2304, 2313, 2314
Offset: 1

Author

Keywords

Comments

How quickly does this sequence grow asymptotically?
A263922(a(n)) > max{A000120(a(n)),A000989(an(n))}. - Reinhard Zumkeller, Nov 19 2015

Examples

			64 is a member because binomial(128,64) = 2 * 3 * 5^3 * ..., where the exponent 3 of 5 is greater than the exponents 1 and 1 of 2 and 3, respectively.
		

Crossrefs

Programs

  • Haskell
    import Math.NumberTheory.Primes.Factorisation (factorise)
    a263924 n = a263924_list !! (n-1)
    a263924_list = filter f [2..] where
       f x = not (null pe23s) && any ((> e23) . snd) pes' where
             e23 = maximum (map snd pe23s)
             (pe23s, pes') = span ((<= 3) . fst) $ factorise $ a000984 x
    -- Reinhard Zumkeller, Nov 01 2015
  • PARI
    f(n,p)=my(d=Vecrev(digits(n,p)),c);sum(i=1,#d,c=(2*d[i]+c>=p))
    is(n)=my(r=max(hammingweight(n),f(n,3))); forprime(p=5,sqrtnint(n,r+1), if(f(n,p)>r, return(p))); 0
    

Formula

a(n) >> n^1.014. (This is surely not optimal.) - Charles R Greathouse IV, Jan 18 2016

A000999 5-adic valuation of binomial(2*n,n): largest k such that 5^k divides binomial(2*n, n).

Original entry on oeis.org

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

Keywords

Crossrefs

Programs

  • Mathematica
    Table[IntegerExponent[Binomial[2*n, n], 5], {n, 0, 100}] (* T. D. Noe, Jun 21 2012 *)
  • PARI
    a(n)=if(n<0,0,valuation(binomial(2*n,n),5))
    
  • PARI
    a(n) = my(v=digits(n,5),c=0); sum(i=0,#v-1, c=(c+v[#v-i]>=3)); \\ Kevin Ryde, Mar 07 2023

Formula

From Amiram Eldar, Feb 12 2021: (Start)
a(n) = A112765(A000984(n)).
a(n) = (2*A053824(n) - A053824(2*n))/4. (End)

Extensions

More terms from Michael Somos, Jun 27 2002

A082490 Exponent of highest power of 3 dividing sum(0<=k

Original entry on oeis.org

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

Author

Ralf Stephan, Apr 28 2003

Keywords

Crossrefs

Programs

  • Maple
    map(t -> padic:-ordp(t,3), ListTools:-PartialSums([seq(binomial(2*n,n),n=0..100)])); # Robert Israel, Mar 27 2018
  • Mathematica
    IntegerExponent[#,3]&/@Accumulate[Table[Binomial[2n,n],{n,0,100}]]
  • PARI
    s=0; for(n=1, 150, s=s+binomial(2*n-2, n-1); print1(valuation(s, 3)", "))
    
  • PARI
    a(n) = valuation(n^2 * binomial(2*n, n), 3); \\ Michel Marcus, Mar 27 2018

Formula

a(n) = A007949(A006134(n)) = A007949 (n^2 * C(2n, n)) (Allouche, Shallit; Zagier) = 2*A007949(n) + A000989(n).

A324469 Exponent of highest power of 3 that divides multinomial(4*n;n,n,n,n).

Original entry on oeis.org

0, 1, 2, 1, 2, 4, 2, 5, 6, 1, 2, 3, 2, 3, 6, 4, 6, 7, 2, 3, 4, 5, 6, 8, 6, 8, 9, 1, 2, 3, 2, 3, 5, 3, 6, 7, 2, 3, 4, 3, 4, 8, 6, 8, 9, 4, 5, 6, 6, 7, 9, 7, 9, 10, 2, 3, 4, 3, 4, 6, 4, 9, 10, 5, 6, 7, 6, 7, 10, 8, 10, 11, 6, 7, 8, 8, 9, 11, 9, 11, 12, 1, 2
Offset: 0

Author

N. J. A. Sloane, Mar 03 2019

Keywords

Crossrefs

Analogs for binomial and trinomials: A000989, A053735. See also A324467.
Cf. A007949 (3-adic valuation of n), A008977.

Programs

  • Maple
    [seq(padic[ordp](combinat[multinomial](4*n, n$4), 3), n=0..128)];
  • Mathematica
    s[n_] := Plus @@ IntegerDigits[n, 3]; a[n_] := 2*s[n] - s[4*n]/2; Array[a, 100, 0] (* Amiram Eldar, Feb 21 2021 *)

Formula

a(n) = 2*A000989(n) + A000989(2*n). - Charlie Neder, Mar 09 2019
From Amiram Eldar, Feb 21 2021: (Start)
a(n) = A007949(A008977(n)).
a(n) = 2*A053735(n) - A053735(4*n)/2. (End)

A370662 Numbers m such that 3 does not divide the m-th Catalan number A000108(m); m such that A067397(m) = 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 8, 9, 10, 11, 12, 13, 26, 27, 28, 29, 30, 31, 35, 36, 37, 38, 39, 40, 80, 81, 82, 83, 84, 85, 89, 90, 91, 92, 93, 94, 107, 108, 109, 110, 111, 112, 116, 117, 118, 119, 120, 121, 242, 243, 244, 245, 246, 247, 251, 252, 253, 254, 255, 256, 269, 270, 271, 272, 273, 274
Offset: 1

Author

Jianing Song, Feb 24 2024

Keywords

Comments

A number m is a term if and only if m = 3*k-1 (k>0), 3*k or 3*k+1 for k in A005836; see A067397.
Conjecture: the only terms of the form 2^r-1 are 0, 1, 3, 31 and 255. Since 2^r-1 !== 2 (mod 3), this is equivalent to saying that the only numbers of the form 2^r-1 that have no digits 2 in ternary are 0, 1, 3, 31, 255. The conjecture would imply that the n-th Catalan number is divisible by 2 or 3 other than n taking these values.

Examples

			11 is a term since that 3 does not divide the 11th Catalan number 58786. Note that 11 = 3*4 - 1, and 4 is in A005836.
31 is a term since that 3 does not divide the 31st Catalan number 14544636039226909. Note that 31 = 3*10 + 1, and 10 is in A005836.
		

Crossrefs

Programs

  • PARI
    a(n) = 3*fromdigits(binary(n\3), 3) + n%3 - 1 \\ adapted from Gheorghe Coserea's program for A005836
    
  • Python
    def A370662(n):
        a, b = divmod(n,3)
        return 3*int(bin(a)[2:],3)+b-1 # Chai Wah Wu, Feb 29 2024

Formula

a(3*k-3) = 3*A005836(k)-1 (k>1), a(3*k-2) = 3*A005836(k), a(3*k-1) = 3*A005836(k)+1.
a(3*2^r-1) = (3^(r+1)-1)/2, a(3*2^r) = 3^(r+1)-1.
Showing 1-6 of 6 results.