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.

A075802 Characteristic function of perfect powers, A001597.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 13 2002

Keywords

Comments

Not multiplicative: for example, a(8)=a(9)=1, but a(72)=0. - Franklin T. Adams-Watters, Sep 09 2005

Crossrefs

Programs

  • Haskell
    a075802 1 = 1
    a075802 n = signum $ a052409 n - 1  -- Reinhard Zumkeller, May 26 2012
    
  • Mathematica
    a[n_] := Boole[GCD @@ FactorInteger[n][[All, 2]] > 1]; a[1] = 1; Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Dec 12 2011 *)
  • Python
    from sympy import perfect_power
    def A075802(n): return int(bool(perfect_power(n))) if n>1 else 1 # Chai Wah Wu, Mar 11 2025

Formula

a(n) = A057427(A052409(n) - 1);
a(A001597(n))=1 and a(A007916(n))=0.