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.

A270838 Largest value k < p-2 such that k! mod p = 1 with p = prime(n).

Original entry on oeis.org

1, 1, 1, 1, 11, 1, 11, 10, 15, 1, 1, 1, 1, 37, 29, 52, 48, 35, 55, 1, 46, 67, 53, 1, 96, 53, 22, 1, 1, 1, 120, 122, 123, 75, 1, 1, 83, 1, 1, 1, 1, 90, 1, 117, 105, 111, 82, 1, 168, 119, 1, 125, 1, 1, 1, 135, 236, 1, 141, 1, 153, 281, 1, 1, 231, 1, 1, 1, 1, 236
Offset: 3

Views

Author

Alois P. Heinz, Mar 23 2016

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local k, p; p:=ithprime(n);
          for k from p-3 by -1 do if irem(k!, p)=1 then return k fi od
        end:
    seq(a(n), n=3..100);
  • Mathematica
    lvk[n_]:=Module[{p=Prime[n],k},k=p-3;While[Mod[k!,p]!=1,k--];k]; Array[ lvk,80,3] (* Harvey P. Dale, Mar 01 2020 *)