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.

A366784 Sum of even indices of distinct prime factors of n divided by 2.

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