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.

A260611 a(n) = superfactorial(prime(n)-1) mod prime(n).

Original entry on oeis.org

1, 2, 3, 6, 1, 8, 13, 1, 1, 17, 1, 6, 9, 1, 46, 30, 58, 50, 1, 1, 27, 78, 82, 34, 22, 10, 102, 106, 76, 15, 126, 1, 37, 138, 105, 1, 28, 1, 1, 93, 1, 19, 190, 81, 14, 198, 210, 1, 1, 107, 144, 1, 64, 250, 16, 262, 82, 1, 60, 53, 282, 155, 306, 1, 288, 203, 330, 189, 1, 136, 42, 1, 366
Offset: 1

Views

Author

Matthew Campbell, Aug 05 2015

Keywords

Examples

			a(2) = superfactorial(2) mod 3 = (2!*1!) mod 3 = 2 mod 3 = 2.
		

Crossrefs

The same for hyperfactorials: A260178.

Programs

  • Maple
    a:= proc(n) option remember; local i, p, r, v;
          p, r, v:= ithprime(n), 1$2;
          for i from 2 to p-1 do
            v:= v*i mod p; r:= r*v mod p
          od; r
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 05 2015
  • Mathematica
    Table[Mod[Superfactorial[Prime[n] - 1], Prime[n]], {n, 1, 175}]
  • PARI
    a(n,p=prime(n))=my(t=Mod(1,p)); lift(prod(k=2,p-1,t*=k)) \\ Charles R Greathouse IV, Aug 05 2015

Formula

a(n) = A000178(A000040(n)-1) mod A000040(n).