OFFSET
1,2
COMMENTS
No more terms up to n=15*10^6. - Lambert Klasen (Lambert.Klasen(AT)gmx.net) and Robert G. Wilson v, Aug 05 2005
MATHEMATICA
a = {0, 1, 1, 1, 1}; Do[a = Rest[ Join[a, {((n - 4)a[[2]] + (n - 3)a[[3]] + (n - 2)a[[4]] + (n - 1)a[[5]])/n}]]; If[ IntegerQ[ Last[ a]], Print[n]], {n, 5, 2*10^6}] (* Robert G. Wilson v *)
PROG
(PARI) v = [1, 1, 1, 1]; for(k=0, 15, s=k*10^6+1; e=(k+1)*10^6; if(s==1, s=5); print(s, " - ", e, ":"); for(n=s, e, v[(n-1)%4+1]=((n-4)*v[(n-1)%4+1]+(n-3)*v[(n)%4+1]+(n-2)*v[(n+1)%4+1]+(n-1)*v[(n+2)%4+1])/n; if(denominator(v[(n-1)%4+1])==1, print1(n, ", "))); print()) \\ (Klasen)
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Oct 14 2002
EXTENSIONS
Corrected and extended by Lambert Klasen (Lambert.Klasen(AT)gmx.net) and Robert G. Wilson v, Aug 05 2005
STATUS
approved