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.

Showing 1-1 of 1 results.

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

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 24 2023

Keywords

Examples

			a(315) = 3 because 315 = 3^2 * 5 * 7 = prime(2)^2 * prime(3) * prime(4) and (2 + 4) / 2 = 3.
		

Crossrefs

Cf. A000720 (pi), A066208 (positions of 0's), A066328, A324967, A332422, A344931, A366533, A366725.

Programs

  • Mathematica
    nmax = 100; CoefficientList[Series[Sum[k x^Prime[2 k]/(1 - x^Prime[2 k]), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    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 *)
  • PARI
    f(n) = if(n % 2, 0, n/2);
    a(n) = vecsum(apply(x -> f(primepi(x)), factor(n)[, 1])); \\ Amiram Eldar, Jul 03 2025

Formula

G.f.: Sum_{k>=1} k * x^prime(2*k) / (1 - x^prime(2*k)).
From Amiram Eldar, Jul 03 2025: (Start)
Additive with a(p^e) = pi(p)/2 if pi(p) is even, and 0 otherwise.
a(n) = (A066328(n) - A366725(n))/2. (End)
Showing 1-1 of 1 results.