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.

A065333 Characteristic function of 3-smooth numbers, i.e., numbers of the form 2^i*3^j (i, j >= 0).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 29 2001

Keywords

Comments

Dirichlet inverse of b(n) where b(n) = 0 except for: b(1) = b(6) = -b(2) = -b(3) = 1. - Alexander Adam, Dec 26 2012

Crossrefs

Characteristic function of A003586.
Cf. A000265, A007814, A007949, A038502, A065330, A065332, A071521 (partial sums), A072078 (inverse Möbius transform).

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) = signum(A065332(n)), where signum = A057427.
a(n) = if A065330(n) = 1 then 1 else 0 = 1 - signum(A065330(n) - 1).
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) = 0^(A038502(A000265(n)) - 1). - Reinhard Zumkeller, Sep 28 2008
a(n) = Sum_{d|n} mu(6*d). - Benoit Cloitre, Oct 18 2009