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.

A377774 a(n) = largest prime p < gpf(n) that does not divide n, or p = nextprime(gpf(n)) for n in A055932, where gpf = A006530.

Original entry on oeis.org

2, 3, 2, 3, 3, 5, 5, 3, 2, 3, 7, 5, 11, 5, 2, 3, 13, 5, 17, 3, 5, 7, 19, 5, 3, 11, 2, 5, 23, 7, 29, 3, 7, 13, 3, 5, 31, 17, 11, 3, 37, 5, 41, 7, 2, 19, 43, 5, 5, 3, 13, 11, 47, 5, 7, 5, 17, 23, 53, 7, 59, 29, 5, 3, 11, 7, 61, 13, 19, 3, 67, 5, 71, 31, 2, 17, 5
Offset: 1

Views

Author

Michael De Vlieger, Nov 22 2024

Keywords

Examples

			Let rad = A007947 and let P = A002110.
a(1) = 2 since P(0) = 1.
a(2) = 3 since P(1) = 2.
a(3) = 2 since prevprime(gpf(3)) = 2.
a(4) = 3 since rad(4) = 2 = P(1).
a(6) = 5 since P(2) = 6.
a(9) = 2 since gpf(9) = 3.
a(10) = 3 since 10 = 2*5.
a(12) = 5 since rad(12) = 6 = P(2).
a(14) = 5 since 14 = 2*7.
a(15) = 2 since 15 = 3*5, etc.
		

Crossrefs

Programs

  • Mathematica
    Table[If[
      Or[IntegerQ@ Log2[n],
        And[EvenQ[n], Union@ Differences@ PrimePi[#] == {1}] ],
      NextPrime[#[[-1]] ],
      q = NextPrime[#[[-1]], -1];
        While[Divisible[n, q], q = NextPrime[q, -1]]; q] &[
      FactorInteger[n][[All, 1]] ], {n, 120}]

Formula

a(n) = prime(i+1) for n in A002110.
a(p) = prevprime(p) for odd prime p.