OFFSET
0,6
COMMENTS
Suggested by Leroy Quet.
Three conjectures: (1) All numbers appear infinitely often, i.e., for every number k >= 0 and every frequency f > 0 there is an index i such that a(i) = k is the f-th occurrence of k in the sequence.
(2) a(j) = a(j-1) + a(j-2) and a(j) = a(j-1) + a(j-2) - j occur approximately equally often, i.e., lim_{n->infinity} x_n / y_n = 1, where x_n is the number of j <= n such that a(j) = a(j-1) + a(j-2) and y_n is the number of j <= n such that a(j) = a(j-1) + a(j-2) - j (cf. A122276).
(3) There are sections a(g+1), ..., a(g+k) of arbitrary length k such that a(g+h) = a(g+h-1) + a(g+h-2) for h = 1,...,k, i.e., the sequence is nondecreasing in these sections (cf. A122277, A122278, A122279). - Klaus Brockhaus, Aug 29 2006
a(A197877(n)) = n and a(m) <> n for m < A197877(n); see first conjecture. - Reinhard Zumkeller, Oct 19 2011
LINKS
T. D. Noe, Table of n, a(n) for n = 0..10000
MATHEMATICA
l = {1, 1}; For[i = 2, i <= 100, i++, len = Length[l]; l = Append[l, Mod[l[[len]] + l[[len - 1]], i]]]; l
f[s_] := f[s] = Append[s, Mod[s[[ -2]] + s[[ -1]], Length[s]]]; Nest[f, {1, 1}, 80] (* Robert G. Wilson v, Aug 29 2006 *)
RecurrenceTable[{a[0]==a[1]==1, a[n]==Mod[a[n-1]+a[n-2], n]}, a, {n, 90}] (* Harvey P. Dale, Apr 12 2013 *)
PROG
(Haskell)
a096535 n = a096535_list !! n
a096535_list = 1 : 1 : f 2 1 1 where
f n x x' = y : f (n+1) y x where y = mod (x + x') n
-- Reinhard Zumkeller, Oct 19 2011
CROSSREFS
KEYWORD
easy,nonn,nice
AUTHOR
Franklin T. Adams-Watters, Jun 23 2004
STATUS
approved