A089643 3^a(n) divides C(3n,n); 3-adic valuation of A005809.
0, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2, 3, 1, 1, 2, 2, 1, 2, 2, 2, 3, 2, 2, 3, 3, 1, 2, 2, 2, 3, 2, 2, 3, 3, 2, 3, 3, 3, 4, 1, 1, 2, 2, 1, 2, 2, 2, 3, 2, 2, 3, 3, 1, 2, 2, 2, 3, 2, 2, 3, 3, 2, 3, 3, 3, 4, 2, 2, 3, 3, 2, 3, 3, 3, 4, 3, 3, 4, 4, 1, 2, 2, 2, 3, 2, 2, 3, 3, 2, 3, 3, 3, 4, 2, 2, 3, 3, 2, 3, 3, 3, 4, 3
Offset: 0
Links
- Antti Karttunen, Table of n, a(n) for n = 0..19683
Programs
-
Mathematica
Table[IntegerExponent[Binomial[3 n, n], 3], {n, 0, 104}] (* Michael De Vlieger, Jul 29 2017 *)
-
PARI
a(n)=valuation(binomial(3*n,n),3)
-
Python
from sympy import binomial def a007949(n): return 0 if n%3 else a007949(n//3) + 1 def a(n): return a007949(binomial(3*n, n)) print([a(n) for n in range(151)]) # Indranil Ghosh, Jul 29 2017
Formula
a(n) = A053735(2*n)/2. - Amiram Eldar, Feb 21 2021