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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

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, 41, 16, 42, 119, 43, 51, 73, 14, 23, 150, 49, 104, 20, 128, 44, 185, 66, 146, 159, 178, 150, 44, 51, 48, 4, 134, 143, 118, 143, 242, 141, 149, 108, 115, 205, 306, 196, 292, 242
Offset: 1

Views

Author

Amarnath Murthy, Mar 13 2004

Keywords

Comments

No term is 0. For positions of 1's see A067999.

Crossrefs

Programs

  • Mathematica
    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 *)
    Table[Mod[n!,Prime[n]],{n,70}] (* Harvey P. Dale, Mar 01 2015 *)

Extensions

Corrected and extended by Robert G. Wilson v, Mar 16 2004

A068000 Numbers k such that (k! + 1) == 0 ( mod prime(k) ).

Original entry on oeis.org

1, 2, 5, 18, 63
Offset: 1

Views

Author

Robert G. Wilson v, Feb 08 2002

Keywords

Comments

There are no other terms below 33333. Is 63 the last term? - Hauke Worpel (hw1(AT)email.com), May 24 2003
There are no other terms below 534000. - Rick L. Shepherd, May 26 2003
There are no other terms below 10^7. - Amiram Eldar, Apr 22 2025

Crossrefs

Programs

  • Mathematica
    Do[ If[ Mod[n! + 1, Prime[n]] == 0, Print[n]], {n, 1, 10000} ]
  • PARI
    for(k=1, 33333, if( (k!+1)%prime(k)==0, print1(k, ", ")))
    
  • PARI
    list(lim) = {my(k = 0, r = 1); forprime(p = 1, lim, k++; r *= k; if(!((r+1) % p), print1(k, ", ")));} \\ Amiram Eldar, Apr 22 2025
Showing 1-2 of 2 results.