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

%I #67 Mar 31 2023 14:14:35

%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

%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(A000961(n)) = 1; a(A024619(n)) = 0. - _Reinhard Zumkeller_, Nov 17 2011

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

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

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

%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

%o (Python)

%o from sympy import primefactors

%o def A010055(n): return int(len(primefactors(n)) <= 1) # _Chai Wah Wu_, Mar 31 2023

%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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 04:56 EDT 2024. Contains 371767 sequences. (Running on oeis4.)