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.

A345161 If n = Product (p_j^k_j) then a(n) = max (nextprime(p_j) - p_j), where nextprime = A151800.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 4, 1, 2, 2, 2, 2, 4, 4, 2, 1, 2, 2, 4, 2, 4, 2, 6, 2, 2, 4, 2, 4, 2, 2, 6, 1, 2, 2, 4, 2, 4, 4, 4, 2, 2, 4, 4, 2, 2, 6, 6, 2, 4, 2, 2, 4, 6, 2, 2, 4, 4, 2, 2, 2, 6, 6, 4, 1, 4, 2, 4, 2, 6, 4, 2, 2, 6, 4, 2, 4, 4, 4, 4, 2, 2, 2, 6, 4, 2, 4, 2, 2, 8, 2
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 26 2021

Keywords

Examples

			a(39) = a(3 * 13) = a(prime(2) * prime(6)), prime(3) - prime(2) = 5 - 3 = 2, prime(7) - prime(6) = 17 - 13 = 4, so a(39) = max(2, 4) = 4.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Max @@ (NextPrime[#[[1]]] - #[[1]] & /@ FactorInteger[n]); Table[a[n], {n, 1, 90}]

Formula

If n = Product (p_j^k_j) then a(n) = max (prime(pi(p_j) + 1) - p_j), where pi = A000720.
a(2^j*n) = a(n).
a(n^j) = a(n), j > 0.
a(prime(n)^j) = A001223(n), j > 0.
a(n!) = A327441(n).
a(prime(n)#) = A063095(n).
2 + Sum_{k=1..n-1} a(prime(k)^j) = prime(n), j > 0.
Sum_{d|n} mu(n/d) * a(d) = 0 if n is an even number or an odd number divisible by a square > 1.