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.

A178629 Numbers k such that A003418(k-1) = lcm(1,2,...,k-1) is congruent to 1 modulo k.

Original entry on oeis.org

2, 11, 29, 787, 15773
Offset: 1

Views

Author

Nick Hobson, May 31 2010

Keywords

Comments

Numbers k such that A158851(k-1) = 1.
k must be prime.
No further terms below 3.8*10^8. - Max Alekseyev, Jun 19 2011

Examples

			For the first nontrivial example: lcm(1,2,3,4,5,6,7,8,9,10) = 2520 and 2520 mod 11 = 1, so 11 is in the sequence.
		

Crossrefs

Cf. A158851.

Programs

  • Mathematica
    fQ[n_] := Mod[ LCM @@ Range[n - 1], n] == 1; k = 2; lst = {}; While[k < 10^6, If[ fQ@k, Print@k; AppendTo[lst, k]]; k++ ]; lst (* Robert G. Wilson v, Jun 02 2010 *)
    Select[Range[2,16000],Mod[LCM@@(Range[#-1]),#]==1&] (* Harvey P. Dale, Oct 01 2024 *)
  • PARI
    { L=1; for(n=2,10^8, if(ispseudoprimepower(n,&p), if(p==n&&L%n==1,print(n)); L*=p); ); } \\ Max Alekseyev, Oct 04 2024

Extensions

Offset changed to 1 by Jinyuan Wang, May 02 2020