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.

A091858 a(n) = n! mod prime(n).

This page as a plain text file.
%I A091858 #21 Jun 05 2025 06:34:12
%S A091858 1,2,1,3,10,5,8,2,9,1,22,7,4,40,29,16,23,60,48,51,49,24,74,40,15,85,3,
%T A091858 41,16,42,119,43,51,73,14,23,150,49,104,20,128,44,185,66,146,159,178,
%U A091858 150,44,51,48,4,134,143,118,143,242,141,149,108,115,205,306,196,292,242
%N A091858 a(n) = n! mod prime(n).
%C A091858 No term is 0. For positions of 1's see A067999.
%H A091858 Alois P. Heinz, <a href="/A091858/b091858.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Zak Seidov)
%t A091858 A091858[n_] := Block[{k = p = 1, m = Prime[n]}, While[p = Mod[p k, m]; k < n, k++ ]; p]; Table[ A091858[ n], {n, 66}] (* _Robert G. Wilson v_, Mar 16 2004 *)
%t A091858 Table[Mod[n!,Prime[n]],{n,70}] (* _Harvey P. Dale_, Mar 01 2015 *)
%Y A091858 Cf. A000040, A000142, A067999.
%K A091858 nonn
%O A091858 1,2
%A A091858 _Amarnath Murthy_, Mar 13 2004
%E A091858 Corrected and extended by _Robert G. Wilson v_, Mar 16 2004