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.

A378158 Numbers k such that lpf(!k) < lpf(k-1), where lpf(k) = A020639(k) and !k = A000166(k).

Original entry on oeis.org

20, 38, 42, 60, 90, 104, 108, 110, 114, 132, 138, 152, 164, 170, 174, 192, 194, 198, 240, 242, 258, 284, 294, 324, 338, 350, 360, 368, 390, 398, 434, 438, 450, 462, 482, 488, 500, 504, 510, 522, 524, 528, 542, 548, 564, 570, 588, 600, 602, 614, 618, 632, 642, 644, 648
Offset: 1

Views

Author

Amiram Eldar, Nov 18 2024

Keywords

Comments

Since (k-1) | !k, we have lpf(!k) <= lpf(k-1). This sequence gives the values of k for which the inequality holds.

Crossrefs

Programs

  • Mathematica
    okQ[k_, p_] := Module[{q = 2}, While[q < p && !Divisible[k, q], q = NextPrime[q]]; q < p]; q[k_] := okQ[Subfactorial[k], FactorInteger[k-1][[1, 1]]]; Select[Range[3, 650], q]
  • PARI
    ok(k, p) = {my(q = 2); while(q < p && k % q, q = nextprime(q+1)); q < p;}
    lista(kmax) = {my(s = 1); for(k = 3, kmax, s = k * s + (-1)^k; if(ok(s, factor(k-1)[1,1]), print1(k, ", ")));}