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.

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

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Oct 24 2023

Keywords

Examples

			a(60) = 4 because 60 = 2^2 * 3 * 5 = prime(1)^2 * prime(2) * prime(3) and 1 + 3 = 4.
		

Crossrefs

Cf. A000720 (pi), A066207 (positions of 0's), A066328, A324966, A332422, A344908, A366528, A366784.

Programs

  • Mathematica
    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
    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 *)
  • PARI
    f(n) = if(n % 2, n, 0);
    a(n) = vecsum(apply(x -> f(primepi(x)), factor(n)[, 1])); \\ Amiram Eldar, Jul 03 2025

Formula

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