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.
%I A162642 #63 Jul 04 2025 19:16:46 %S A162642 0,1,1,0,1,2,1,1,0,2,1,1,1,2,2,0,1,1,1,1,2,2,1,2,0,2,1,1,1,3,1,1,2,2, %T A162642 2,0,1,2,2,2,1,3,1,1,1,2,1,1,0,1,2,1,1,2,2,2,2,2,1,2,1,2,1,0,2,3,1,1, %U A162642 2,3,1,1,1,2,1,1,2,3,1,1,0,2,1,2,2,2,2,2,1,2,2,1,2,2,2,2,1,1,1,0,1,3,1,2,3 %N A162642 Number of odd exponents in the canonical prime factorization of n. %C A162642 a(n) is also known as the squarefree rank of n. - _Jason Kimberley_, Jul 08 2017 %C A162642 The number of primes that are infinitary divisors of n. - _Amiram Eldar_, Oct 01 2023 %H A162642 Jason Kimberley, <a href="/A162642/b162642.txt">Table of n, a(n) for n = 1..20000</a> %H A162642 R. B. Eggleton, J. S. Kimberley and J. A. MacDougall, <a href="http://combinatorialmath.com/index.php/JCMCC/article/view/4161">Square-free rank of integers</a>, Journal of Combinatorial Mathematics and Combinatorial Computing, Vol. 106 (2018). %H A162642 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>. %F A162642 a(n) = A001221(n) - A162641(n). %F A162642 a(n) = A001221(A007913(n)). - _Jason Kimberley_, Jan 06 2016 %F A162642 a(A000290(n)) = 0, n > 0. - _Michel Marcus_, Jan 08 2016 %F A162642 G.f.: Sum_{i>=1} Sum_{j>=1} (-1)^j x^(prime(i)^j)/(x^(prime(i)^j) - 1). - _Robert Israel_, Jan 15 2016 %F A162642 From _Antti Karttunen_, Nov 28 2017: (Start) %F A162642 Additive with a(p^e) = A000035(e). %F A162642 a(n) = A056169(n) + A295662(n). %F A162642 A056169(n) <= a(n) <= A056169(n) + A295659(n). %F A162642 a(n) <= A295664(n). %F A162642 (End) %F A162642 Sum_{k=1..n} a(k) = n * log(log(n)) + c * n + O(n/log(n)), where c = gamma + Sum_{p prime} (log(1-1/p) + 1/(p+1)) = A077761 - A179119 = -0.0687327134... and gamma is Euler's constant (A001620). - _Amiram Eldar_, Dec 25 2021 %p A162642 A162642 := proc(n) add ( op(2,f) mod 2 ,f=ifactors(n)[2]) ; end proc: # _R. J. Mathar_, Mar 30 2011 %t A162642 {0}~Join~Table[Count[Last /@ FactorInteger@ n, e_ /; OddQ@ e], {n, 2, 105}] (* _Michael De Vlieger_, Jan 06 2016 *) %o A162642 (Magma) A162642:=func<n|#{pe:pe in Factorisation(n)|IsOdd(pe[2])}>; %o A162642 [A162642(n):n in[1..105]]; // _Jason Kimberley_, Dec 30 2015 %o A162642 (PARI) a(n) = {my(f = factor(n)); sum(k=1, #f~, f[k,2] % 2);} \\ _Michel Marcus_, Jan 08 2016 %o A162642 (Scheme) %o A162642 ;; With memoization-macro definec. %o A162642 (definec (A162642 n) (if (= 1 n) 0 (+ (A000035 (A067029 n)) (A162642 (A028234 n))))) ;; _Antti Karttunen_, Nov 28 2017 %Y A162642 Cf. A000290 (positions of zeros), A001221, A001620, A002035, A007913, A056169, A162641, A295316, A295659, A295662, A295664. %K A162642 nonn,easy %O A162642 1,6 %A A162642 _Reinhard Zumkeller_, Jul 08 2009