OFFSET
1,2
COMMENTS
An open question is whether the sequence contains zeros except for the 3rd and the 5th number. I checked this up to a(10000), which happens to be 99990000. - Johan Claes, Jun 16 2004
FORMULA
Appears to satisfy a linear recurrence with characteristic polynomial (1+x)(1+x^3)^2(1-x^3)^3 (checked up to n = 10^4). - Ralf Stephan, Dec 04 2004
EXAMPLE
a(6) = 6*((1 + 2 + 0 + 12 + 0) mod 6) = 18.
MAPLE
MATHEMATICA
a[1] = 1; a[n_] := a[n] = n*Mod[Sum[a[i], {i, n - 1}], n]; Table[ a[n], {n, 55}] (* Robert G. Wilson v, Jun 16 2004 *)
PROG
(PARI) a=vector(1000); a[1]=1; for(i=2, 1000, a[i]=i*lift(Mod(sum(j=1, i-1, a[j]), i)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jun 15 2004
EXTENSIONS
More terms from Alec Mihailovs (alec(AT)mihailovs.com), Robert G. Wilson v and Johan Claes, Jun 16 2004
STATUS
approved