A178629 Numbers k such that A003418(k-1) = lcm(1,2,...,k-1) is congruent to 1 modulo k.
2, 11, 29, 787, 15773
Offset: 1
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
Comments