cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A056170 Number of non-unitary prime divisors of n.

This page as a plain text file.
%I A056170 #89 Jan 09 2024 08:47:25
%S A056170 0,0,0,1,0,0,0,1,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,1,0,1,1,0,0,0,1,0,0,
%T A056170 0,2,0,0,0,1,0,0,0,1,1,0,0,1,1,1,0,1,0,1,0,1,0,0,0,1,0,0,1,1,0,0,0,1,
%U A056170 0,0,0,2,0,0,1,1,0,0,0,1,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,1,2,0,0,0,1,0
%N A056170 Number of non-unitary prime divisors of n.
%C A056170 A prime factor of n is unitary iff its exponent is 1 in the prime factorization of n. (Of course for any prime p, GCD(p, n/p) is either 1 or p. For a unitary prime factor it must be 1.)
%C A056170 Number of squared primes dividing n. - _Reinhard Zumkeller_, May 18 2002
%C A056170 a(A005117(n)) = 0; a(A013929(n)) > 0; a(A190641(n)) = 1. - _Reinhard Zumkeller_, Dec 29 2012
%C A056170 First differences of A013940. - _Jason Kimberley_, Feb 01 2017
%C A056170 Number of exponents larger than 1 in the prime factorization of n. - _Antti Karttunen_, Nov 28 2017
%H A056170 Reinhard Zumkeller, <a href="/A056170/b056170.txt">Table of n, a(n) for n = 1..10000</a>
%H A056170 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>.
%F A056170 Additive with a(p^e) = 0 if e = 1, 1 otherwise.
%F A056170 G.f.: Sum_{k>=1} x^(prime(k)^2)/(1 - x^(prime(k)^2)). - _Ilya Gutkovskiy_, Jan 01 2017
%F A056170 a(n) = log_2(A000005(A071773(n))). - observed by _Velin Yanev_, Aug 20 2017, confirmed by _Antti Karttunen_, Nov 28 2017
%F A056170 From _Antti Karttunen_, Nov 28 2017: (Start)
%F A056170 a(n) = A001221(n) - A056169(n).
%F A056170 a(n) = omega(A000188(n)) = omega(A003557(n)) = omega(A057521(n)) = omega(A295666(n)), where omega = A001221.
%F A056170 For all n >= 1 it holds that:
%F A056170 a(A003557(n)) = A295659(n).
%F A056170 a(n) >= A162641(n).
%F A056170 (End)
%F A056170 Dirichlet g.f.: primezeta(2s)*zeta(s). - _Benedict W. J. Irwin_, Jul 11 2018
%F A056170 Asymptotic mean: lim_{n->oo} (1/n) * Sum_{k=1..n} a(k) = Sum_{p prime} 1/p^2 = 0.452247... (A085548). - _Amiram Eldar_, Nov 01 2020
%F A056170 a(n) = A275812(n) - A046660(n). - _Amiram Eldar_, Jan 09 2024
%p A056170 A056170 := n -> nops(select(t -> (t[2]>1), ifactors(n)[2]));
%p A056170 seq(A056170(n),n=1..100); # _Robert Israel_, Jun 03 2014
%t A056170 a[n_] := Count[FactorInteger[n], {_, k_ /; k > 1}]; Table[a[n], {n, 105}]  (* _Jean-François Alcover_, Mar 23 2011 *)
%t A056170 Table[Count[FactorInteger[n][[All,2]],_?(#>1&)],{n,110}] (* _Harvey P. Dale_, Jul 08 2019 *)
%o A056170 (Haskell)
%o A056170 a056170 = length . filter (> 1) . a124010_row
%o A056170 -- _Reinhard Zumkeller_, Dec 29 2012
%o A056170 (PARI) a(n)=my(f=factor(n)[,2]); sum(i=1,#f,f[i]>1) \\ _Charles R Greathouse IV_, May 18 2015
%o A056170 (Magma)
%o A056170 A056170:=func<n|#[pe:pe in Factorisation(n)|pe[2]ne 1]>;
%o A056170 [A056170(n):n in[1..105]];
%o A056170 // _Jason Kimberley_, Jan 22 2017
%o A056170 (Python)
%o A056170 from sympy import factorint
%o A056170 def a(n):
%o A056170     f = factorint(n)
%o A056170     return sum([1 for i in f if f[i]!=1]) # _Indranil Ghosh_, Apr 24 2017
%Y A056170 Cf. A000188, A001221, A003557, A013940, A034444, A046660, A048105, A056169, A085548, A124010, A162641, A212177, A275812, A295659, A295666.
%Y A056170 Cf. A057427(a(n)) = 1 - A008966(n).
%K A056170 nice,nonn
%O A056170 1,36
%A A056170 _Labos Elemer_, Jul 27 2000
%E A056170 Minor edits by _Franklin T. Adams-Watters_, Mar 23 2011