OFFSET
1,1
COMMENTS
For a guide to related sequences, see A204892.
From Robert Israel, Nov 20 2024: (Start)
a(n) <= ceil(A002034(n)/2) + 1.
The last occurrence of k >= 2 in the sequence is a((2*k)! - 2) = k. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
1 divides (2*2)!-(2*1)! -> k=2, j=1
2 divides (2*2)!-(2*1)! -> k=2, j=1
3 divides (2*3)!-(2*2)! -> k=3, j=2
4 divides (2*3)!-(2*2)! -> k=3, j=2
5 divides (2*4)!-(2*3)! -> k=4, j=3
MAPLE
f:= proc(n) local S, j, x;
S:= {}:
x:= 1:
for j from 1 do
x:=x*2*j*(2*j-1) mod n;
if member(x, S) then return j fi;
S:= S union {x}
od
end proc:
map(f, [$1..100]); # Robert Israel, Nov 18 2024
MATHEMATICA
s = Table[(2n)!, {n, 1, 120}];
lk = Table[NestWhile[# + 1 &, 1,
Min[Table[Mod[s[[#]] - s[[j]], z], {j, 1, # - 1}]] =!= 0 &], {z, 1, Length[s]}]
Table[NestWhile[# + 1 &, 1,
Mod[s[[lk[[j]]]] - s[[#]], j] =!= 0 &],
{j, 1, Length[lk]}]
(* Peter J. C. Moses, Jan 27 2012 *)
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Clark Kimberling, Feb 01 2012
STATUS
approved