login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A010055 1 if n is a prime power p^k (k >= 0), otherwise 0. 94
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 (list; graph; refs; listen; history; text; internal format)
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
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]
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 *)
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
Cf. A069513 (1 if n is a prime power p^k (k >= 1), else 0.)
Cf. A268340.
Cf. A100995.
Sequence in context: A144473 A011750 A340375 * A324290 A325964 A344885
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 02:58 EDT 2024. Contains 370952 sequences. (Running on oeis4.)