OFFSET
0,5
COMMENTS
Tribonacci (A000213) analog of A096535. The analogous 3 Klaus Brockhaus conjectures are applicable: (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) + a(j-3) and a(j) = a(j-1) + a(j-2) + a(j-3) - 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) + a(j-3) and y_n is the number of j <= n such that a(j) = a(j-1) + a(j-2) + a(j-3) - 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) + a(g+h-3) for h = 1,...,k, i.e., the sequence is nondecreasing in these sections (cf. A122277, A122278, A122279).
LINKS
Ivan Neretin, Table of n, a(n) for n = 0..10000
MATHEMATICA
RecurrenceTable[{a[0]==a[1]==a[2]==1, a[n]==Mod[a[n-1]+a[n-2]+a[n-3], n]}, a[n], {n, 80}] (* Harvey P. Dale, May 14 2011 *)
Fold[Append[#1, Mod[#1[[-1]] + #1[[-2]] + #1[[-3]], #2]] &, {1, 1, 1}, Range[68] + 2] (* Ivan Neretin, Jun 28 2017 *)
PROG
(PARI) lista(nn) = {va = vector(nn, k, k<=3); for (n=4, nn, va[n] = (va[n-1] + va[n-2] + va[n-3]) % (n-1); ); va; } \\ Michel Marcus, Jul 02 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Oct 05 2007
STATUS
approved
