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.

A347103 G.f.: Sum_{k>=1} k * x^prime(k) / (1 + x^prime(k)).

Original entry on oeis.org

0, 1, 2, -1, 3, -1, 4, -1, 2, -2, 5, -3, 6, -3, 5, -1, 7, -1, 8, -4, 6, -4, 9, -3, 3, -5, 2, -5, 10, -4, 11, -1, 7, -6, 7, -3, 12, -7, 8, -4, 13, -5, 14, -6, 5, -8, 15, -3, 4, -2, 9, -7, 16, -1, 8, -5, 10, -9, 17, -6, 18, -10, 6, -1, 9, -6, 19, -8, 11, -6, 20, -3
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 18 2021

Keywords

Comments

a(n) is the sum of indices of prime divisors p|n such that n/p is odd, minus the sum of indices of prime divisors p|n such that n/p is even.

Crossrefs

Programs

  • Mathematica
    nmax = 72; CoefficientList[Series[Sum[k x^Prime[k]/(1 + x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    Table[-DivisorSum[n, (-1)^(n/#) PrimePi[#] &, PrimeQ[#] &], {n, 1, 72}]
  • PARI
    a(n) = my(f=factor(n)[,1]); sum(k=1, #f, if ((n/f[k]) % 2, primepi(f[k]), -primepi(f[k]))); \\ Michel Marcus, Aug 19 2021

Formula

a(n) = -Sum_{p|n, p prime} (-1)^(n/p) * pi(p), where pi = A000720.