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.

A378157 The least prime dividing !n = A000166(n).

Original entry on oeis.org

2, 3, 2, 5, 2, 7, 2, 3, 2, 11, 2, 13, 2, 3, 2, 17, 2, 11, 2, 3, 2, 23, 2, 5, 2, 3, 2, 29, 2, 31, 2, 3, 2, 5, 2, 11, 2, 3, 2, 11, 2, 43, 2, 3, 2, 47, 2, 7, 2, 3, 2, 53, 2, 5, 2, 3, 2, 11, 2, 61, 2, 3, 2, 5, 2, 67, 2, 3, 2, 71, 2, 73, 2, 3, 2, 7, 2, 79, 2, 3, 2
Offset: 3

Views

Author

Amiram Eldar, Nov 18 2024

Keywords

Crossrefs

Programs

  • Mathematica
    lpf[n_] := Module[{p = 2}, While[! Divisible[n, p], p = NextPrime[p]]; p]; Array[lpf[Subfactorial[#]] &, 50, 3]
  • PARI
    lpf(n) = {my(p = 2); while(n % p, p = nextprime(p+1)); p;}
    lista(nmax) = {my(s = 1); for(n = 3, nmax, s = n * s + (-1)^n; print1(lpf(s), ", ")); }

Formula

a(n) = A020639(A000166(n)).
a(n) = min(A020639(n-1), A378159(n-2)) for n >= 2.