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.

A366725 Sum of odd indices of distinct prime factors of n.

This page as a plain text file.
%I A366725 #24 Jul 03 2025 01:02:26
%S A366725 0,1,0,1,3,1,0,1,0,4,5,1,0,1,3,1,7,1,0,4,0,6,9,1,3,1,0,1,0,4,11,1,5,8,
%T A366725 3,1,0,1,0,4,13,1,0,6,3,10,15,1,0,4,7,1,0,1,8,1,0,1,17,4,0,12,0,1,3,6,
%U A366725 19,8,9,4,0,1,21,1,3,1,5,1,0,4,0,14,23,1,10,1,0,6,0,4,0,10,11,16,3,1,25,1,5,4
%N A366725 Sum of odd indices of distinct prime factors of n.
%H A366725 Amiram Eldar, <a href="/A366725/b366725.txt">Table of n, a(n) for n = 1..10000</a>
%F A366725 G.f.: Sum_{k>=1} (2*k-1) * x^prime(2*k-1) / (1 - x^prime(2*k-1)).
%F A366725 From _Amiram Eldar_, Jul 03 2025: (Start)
%F A366725 Additive with a(p^e) = pi(p) if pi(p) is odd, and 0 otherwise.
%F A366725 a(n) = A066328(n) - 2*A366784(n). (End)
%e A366725 a(60) = 4 because 60 = 2^2 * 3 * 5 = prime(1)^2 * prime(2) * prime(3) and 1 + 3 = 4.
%t A366725 nmax = 100; CoefficientList[Series[Sum[(2 k - 1) x^Prime[2 k - 1]/(1 - x^Prime[2 k - 1]), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
%t A366725 f[p_, e_] := Module[{i = PrimePi[p]}, If[OddQ[i], i, 0]]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Jul 03 2025 *)
%o A366725 (PARI) f(n) = if(n % 2, n, 0);
%o A366725 a(n) = vecsum(apply(x -> f(primepi(x)), factor(n)[, 1])); \\ _Amiram Eldar_, Jul 03 2025
%Y A366725 Cf. A000720 (pi), A066207 (positions of 0's), A066328, A324966, A332422, A344908, A366528, A366784.
%K A366725 nonn
%O A366725 1,5
%A A366725 _Ilya Gutkovskiy_, Oct 24 2023