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.

A381641 Numerators of Sum_{i=1..omega(n)-1} (1 - p_{i}/p_{i+1}), where omega(n) = A001221(n) and p_1 < p_2 < ... p_omega(n) are the distinct prime factors of n; a(1) = 0.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 1, 0, 5, 2, 0, 0, 1, 0, 3, 4, 9, 0, 1, 0, 11, 0, 5, 0, 11, 0, 0, 8, 15, 2, 1, 0, 17, 10, 3, 0, 19, 0, 9, 2, 21, 0, 1, 0, 3, 14, 11, 0, 1, 6, 5, 16, 27, 0, 11, 0, 29, 4, 0, 8, 35, 0, 15, 20, 31, 0, 1, 0, 35, 2, 17, 4, 43, 0, 3, 0
Offset: 1

Views

Author

Amiram Eldar, Mar 03 2025

Keywords

Examples

			Fractions begin with 0, 0, 0, 0, 0, 1/3, 0, 0, 0, 3/5, 0, 1/3, ...
		

Crossrefs

Cf. A000961, A001221, A381638, A381639 (denominators).

Programs

  • Mathematica
    a[n_] := Module[{p = FactorInteger[n][[;; , 1]]}, Numerator[Total[1 - Most[p]/Rest[p]]]]; Array[a, 100]
  • PARI
    a(n) = {my(p = factor(n)[,1]); numerator(sum(i = 1, #p-1, 1 - p[i]/p[i+1]));}

Formula

a(n) = 0 if and only if n is a power of a prime (A000961).
a(n)/A381639(n) = A001221(n) - 1 - A381638(n)/A381639(n).