%I #69 Oct 29 2024 12:23:28
%S 0,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,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0
%N Characteristic function of the prime powers p^k, k >= 1.
%C Also, number of Galois fields of order n. - _Charles R Greathouse IV_, Mar 12 2008
%C Also, number of abelian indecomposable groups of order n. - _Kevin Lamoreau_, Mar 13 2023
%H Daniel Forgues, <a href="/A069513/b069513.txt">Table of n, a(n) for n = 1..100000</a>.
%F If n >= 2, a(n) = A010055(n).
%F a(n) = Sum_{d|n} bigomega(d)*mu(n/d); equivalently, Sum_{d|n} a(d) = bigomega(n); equivalently, Möbius transform of bigomega(n).
%F Dirichlet g.f.: 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) = floor(1/A001221(n)), for n > 1. - _Enrique Pérez Herrero_, Jun 01 2011
%F a(n) = - Sum_{d|n} mu(d)*bigomega(d). - _Ridouane Oudra_, Oct 29 2024
%p A069513 := proc(n)
%p if n = 1 then
%p 0 ;
%p elif A001221(n) > 1 then
%p 0;
%p else
%p 1 ;
%p end if ;
%p end proc:
%p seq(A069513(n),n=1..80) ; # _R. J. Mathar_, Nov 02 2016
%t A069513[n_]:=Boole[PrimeNu[n]==1]; A069513/@Range[20] (* _Enrique Pérez Herrero_, May 30 2011 *)
%o (PARI) for(n=1,120,print1(omega(n)==1,","))
%o (Haskell)
%o a069513 1 = 0
%o a069513 n = a010055 n -- _Reinhard Zumkeller_, Mar 19 2013
%o (Python)
%o from sympy import primefactors
%o def A069513(n): return int(len(primefactors(n)) == 1) # _Chai Wah Wu_, Mar 31 2023
%Y Cf. A246655, A010055, A001222, A008683, A090751, A000688, A361414.
%Y The partial sums of this sequence give A025528. - _Daniel Forgues_, Mar 02 2009
%Y Cf. A014963, A003418. - _Enrique Pérez Herrero_, Jun 01 2011
%K easy,nonn,changed
%O 1,1
%A _Benoit Cloitre_, Apr 15 2002
%E Moved original definition to formula line. Used comment (that I previously added) as definition. - _Daniel Forgues_, Mar 08 2009
%E Edited by _Franklin T. Adams-Watters_, Nov 02 2009