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.

A329717 a(n) is n (plus or minus) the number of distinct primes dividing n according to parity (even or odd).

Original entry on oeis.org

1, 1, 2, 3, 4, 8, 6, 7, 8, 12, 10, 14, 12, 16, 17, 15, 16, 20, 18, 22, 23, 24, 22, 26, 24, 28, 26, 30, 28, 27, 30, 31, 35, 36, 37, 38, 36, 40, 41, 42, 40, 39, 42, 46, 47, 48, 46, 50, 48, 52, 53, 54, 52, 56, 57, 58, 59, 60, 58, 57, 60, 64, 65, 63, 67, 63, 66
Offset: 1

Views

Author

Lars Blomberg, Nov 20 2019

Keywords

Examples

			A001221(3) = 1, so a(3) = 3-1 = 2. A001221(6) = 2, so a(6) = 6+2 = 8.
		

Crossrefs

Programs

  • Mathematica
    Array[# + (om = PrimeNu[#]) * (-1)^om &, 67] (* Amiram Eldar, Nov 23 2019 *)
  • PARI
    a(n) = my(om=omega(n)); n + (-1)^om*om; \\ Michel Marcus, Nov 20 2019

Formula

a(n) = n + A001221(n)*(-1)^A001221(n).