OFFSET
1,1
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
EXAMPLE
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.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Nick Hobson, May 31 2010
EXTENSIONS
Offset changed to 1 by Jinyuan Wang, May 02 2020
STATUS
approved