login
This site is supported by donations 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. 49

%I

%S 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,

%T 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,

%U 0,0,1,0,1,0,0,0,0,0,1,0

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

%C 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

%C See A065515 for partial sums. - _Reinhard Zumkeller_, Nov 22 2009

%C a(A000961(n)) = 1; a(A024619(n)) = 0. - _Reinhard Zumkeller_, Nov 17 2011

%C If n>=2, a(n)=A069513(n). - _Jeppe Stig Nielsen_, Feb 02 2016

%H Reinhard Zumkeller, <a href="/A010055/b010055.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%F 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.

%F a(n) = 0^(A119288(n)-1). - _Reinhard Zumkeller_, May 13 2006

%F a(n) = if A001221(n) <= 1 then 1 else 0. - _Reinhard Zumkeller_, Nov 28 2015

%p A010055 := proc(n)

%p if n =1 then

%p 1;

%p else

%p if nops(ifactors(n)[2]) = 1 then

%p 1;

%p else

%p 0 ;

%p end if;

%p end if;

%p end proc: # _R. J. Mathar_, May 25 2017

%t A010055[n_]:=Boole[PrimeNu[n]<=1]; A010055/@Range[20] (* _Enrique PĂ©rez Herrero_, May 30 2011 *)

%t {1}~Join~Table[Boole@ PrimePowerQ@ n, {n, 2, 105}] (* _Michael De Vlieger_, Feb 02 2016 *)

%o (PARI) for(n=1,120,print1(omega(n)<=1,","))

%o (Haskell)

%o a010055 n = if a001221 n <= 1 then 1 else 0

%o -- _Reinhard Zumkeller_, Nov 28 2015, Mar 19 2013, Nov 17 2011

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

%Y Cf. A268340.

%Y Cf. A100995.

%Y Cf. A001221, A000961, A024619, A065515,

%K nonn

%O 1,1

%A _N. J. A. Sloane_

%E More terms from _Charles R Greathouse IV_, Mar 12 2008

%E Edited by _Daniel Forgues_, Mar 02 2009

%E Comment re Galois fields moved to A069513 by _Franklin T. Adams-Watters_, Nov 02 2009

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 18 05:40 EST 2019. Contains 320245 sequences. (Running on oeis4.)