A065333 Characteristic function of 3-smooth numbers, i.e., numbers of the form 2^i*3^j (i, j >= 0).
1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- A. Pakapongpun and T. Ward, Functorial Orbit counting, JIS 12 (2009) 09.2.4, example 9.
- Index entries for characteristic functions
Crossrefs
Programs
-
Haskell
a065333 = fromEnum . (== 1) . a038502 . a000265 -- Reinhard Zumkeller, Jan 08 2013, Apr 12 2012
-
Mathematica
a[n_] := Boole[ 2^IntegerExponent[n, 2] * 3^IntegerExponent[n, 3] == n]; Table[a[n], {n, 1, 105}] (* Jean-François Alcover, May 16 2013, after Charles R Greathouse IV *)
-
PARI
a(n)=sumdiv(n,d,moebius(6*d)) \\ Benoit Cloitre, Oct 18 2009
-
PARI
a(n)=3^valuation(n,3)<
Charles R Greathouse IV, Aug 21 2011 -
Python
from sympy import multiplicity def A065333(n): return int(3**(multiplicity(3,m:=n>>(~n&n-1).bit_length()))==m) # Chai Wah Wu, Dec 20 2024
Formula
a(n) = if n = A003586(k) for some k then 1 else 0.
a(n) = Product_{p prime and p|n} 0^floor(p/4). - Reinhard Zumkeller, Nov 19 2004
Multiplicative with a(2^e) = a(3^e) = 1, a(p^e) = 0 for prime p > 3. Dirichlet g.f. 1/(1-2^-s)/(1-3^-s). - Franklin T. Adams-Watters, Sep 01 2006
a(n) = Sum_{d|n} mu(6*d). - Benoit Cloitre, Oct 18 2009
Comments