OFFSET
1,1
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
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
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(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]
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
{1}~Join~Table[Boole@ PrimePowerQ@ n, {n, 2, 105}] (* Michael De Vlieger, Feb 02 2016 *)
PROG
(PARI) for(n=1, 120, print1(omega(n)<=1, ", "))
(Haskell)
a010055 n = if a001221 n <= 1 then 1 else 0
-- Reinhard Zumkeller, Nov 28 2015, Mar 19 2013, Nov 17 2011
(Python)
from sympy import primefactors
def A010055(n): return int(len(primefactors(n)) <= 1) # Chai Wah Wu, Mar 31 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
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
STATUS
approved