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-3 of 3 results.

A332425 If n = Product (p_j^k_j) then a(n) = Sum ((-1)^(pi(p_j) + 1) * p_j * k_j), where pi = A000720.

Original entry on oeis.org

0, 2, -3, 4, 5, -1, -7, 6, -6, 7, 11, 1, -13, -5, 2, 8, 17, -4, -19, 9, -10, 13, 23, 3, 10, -11, -9, -3, -29, 4, 31, 10, 8, 19, -2, -2, -37, -17, -16, 11, 41, -8, -43, 15, -1, 25, 47, 5, -14, 12, 14, -9, -53, -7, 16, -1, -22, -27, 59, 6, -61, 33, -13, 12, -8, 10, 67, 21, 20
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 12 2020

Keywords

Comments

Sum of prime factors of n (counted with multiplicity) with odd indices minus the sum of prime factors of n (counted with multiplicity) with even indices.

Examples

			a(252) = a(2^2 * 3^2 * 7) = a(prime(1)^2 * prime(2)^2 * prime(4)) = 2 + 2 - 3 - 3 - 7 = -9.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Plus @@ ((-1)^(PrimePi[#[[1]]] + 1) #[[1]] #[[2]] & /@ FactorInteger[n]); a[1] = 0; Table[a[n], {n, 1, 69}]

A382331 If n = Product (p_j^k_j) then a(n) = -Sum ((-1)^k_j * p_j).

Original entry on oeis.org

0, 2, 3, -2, 5, 5, 7, 2, -3, 7, 11, 1, 13, 9, 8, -2, 17, -1, 19, 3, 10, 13, 23, 5, -5, 15, 3, 5, 29, 10, 31, 2, 14, 19, 12, -5, 37, 21, 16, 7, 41, 12, 43, 9, 2, 25, 47, 1, -7, -3, 20, 11, 53, 5, 16, 9, 22, 31, 59, 6, 61, 33, 4, -2, 18, 16, 67, 15, 26, 14, 71, -1, 73, 39, -2
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 22 2025

Keywords

Examples

			a(72) = a(2^3*3^2) = 2 - 3 = -1.
		

Crossrefs

Programs

  • Mathematica
    Join[{0}, Table[-Plus @@ ((-1)^#[[2]] #[[1]] & /@ FactorInteger[n]), {n, 2, 75}]]
  • PARI
    a(n) = my(f=factor(n)); -sum(i=1, #f~, (-1)^f[i,2]*f[i,1]); \\ Michel Marcus, Mar 22 2025

Formula

Additive with a(p^e) = (-1)^(e+1) * p.

A382477 If n = Product (p_j^k_j) then a(n) = -Sum ((-1)^k_j * k_j * p_j).

Original entry on oeis.org

0, 2, 3, -4, 5, 5, 7, 6, -6, 7, 11, -1, 13, 9, 8, -8, 17, -4, 19, 1, 10, 13, 23, 9, -10, 15, 9, 3, 29, 10, 31, 10, 14, 19, 12, -10, 37, 21, 16, 11, 41, 12, 43, 7, -1, 25, 47, -5, -14, -8, 20, 9, 53, 11, 16, 13, 22, 31, 59, 4, 61, 33, 1, -12, 18, 16, 67, 13, 26, 14, 71, 0, 73, 39, -7
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 10 2025

Keywords

Examples

			a(72) = a(2^3*3^2) = 3*2 - 2*3 = 0.
		

Crossrefs

Programs

  • Mathematica
    Join[{0}, Table[-Plus @@ ((-1)^#[[2]] #[[2]] #[[1]] & /@ FactorInteger[n]), {n, 2, 75}]]
  • PARI
    a(n) = my(f=factor(n)); -sum(k=1, #f~, (-1)^f[k,2]*f[k,2]*f[k,1]); \\ Michel Marcus, Apr 17 2025
Showing 1-3 of 3 results.