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.

A010055 1 if n is a prime power p^k (k >= 0), otherwise 0.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0
Offset: 1

Views

Author

Keywords

Comments

Characteristic function of unit or prime powers p^k (k >= 1). Characteristic function of prime powers p^k (k >= 0). - Daniel Forgues, Mar 03 2009
See A065515 for partial sums. - Reinhard Zumkeller, Nov 22 2009

Crossrefs

Cf. A069513 (1 if n is a prime power p^k (k >= 1), else 0.)
Cf. A268340.
Cf. A100995.

Programs

  • Haskell
    a010055 n = if a001221 n <= 1 then 1 else 0
    -- Reinhard Zumkeller, Nov 28 2015, Mar 19 2013, Nov 17 2011
    
  • Maple
    A010055 := proc(n)
        if n =1 then
            1;
        else
            if nops(ifactors(n)[2]) = 1 then
                1;
            else
                0 ;
            end if;
        end if;
    end proc: # R. J. Mathar, May 25 2017
  • Mathematica
    A010055[n_]:=Boole[PrimeNu[n]<=1]; A010055/@Range[20] (* Enrique Pérez Herrero, May 30 2011 *)
    {1}~Join~Table[Boole@ PrimePowerQ@ n, {n, 2, 105}] (* Michael De Vlieger, Feb 02 2016 *)
  • PARI
    for(n=1,120,print1(omega(n)<=1,","))
    
  • Python
    from sympy import primefactors
    def A010055(n): return int(len(primefactors(n)) <= 1) # Chai Wah Wu, Mar 31 2023

Formula

Dirichlet generating function: 1 + ppzeta(s). Here ppzeta(s) = Sum_{p prime} Sum_{k>=1} 1/(p^k)^s. Note that ppzeta(s) = Sum_{p prime} 1/(p^s-1) = Sum_{k>=1} primezeta(k*s). - Franklin T. Adams-Watters, Sep 11 2005
a(n) = 0^(A119288(n)-1). - Reinhard Zumkeller, May 13 2006
a(A000961(n)) = 1; a(A024619(n)) = 0. - Reinhard Zumkeller, Nov 17 2011
a(n) = if A001221(n) <= 1 then 1, otherwise 0. - Reinhard Zumkeller, Nov 28 2015
If n >= 2, a(n) = A069513(n). - Jeppe Stig Nielsen, Feb 02 2016
Conjecture: a(n) = (n - A048671(n))/A000010(n) for all n > 1. - Velin Yanev, Mar 10 2021 [The conjecture is true. - Andrey Zabolotskiy, Mar 11 2021]

Extensions

More terms from Charles R Greathouse IV, Mar 12 2008
Edited by Daniel Forgues, Mar 02 2009
Comment re Galois fields moved to A069513 by Franklin T. Adams-Watters, Nov 02 2009