login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A131971 a(0) = a(1) = a(2) = 1; a(n) = (a(n-1) + a(n-2) + a(n-3)) mod n. 1

%I #19 Jul 02 2017 07:59:53

%S 1,1,1,0,2,3,5,3,3,2,8,2,0,10,12,7,13,15,17,7,19,1,5,2,8,15,25,21,5,

%T 22,18,14,22,21,23,31,3,20,16,0,36,11,5,9,25,39,27,44,14,36,44,43,19,

%U 0,8,27,35,13,17,6,36,59,39,8,42,24,8,7,39,54,30

%N a(0) = a(1) = a(2) = 1; a(n) = (a(n-1) + a(n-2) + a(n-3)) mod n.

%C 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).

%H Ivan Neretin, <a href="/A131971/b131971.txt">Table of n, a(n) for n = 0..10000</a>

%t 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 *)

%t Fold[Append[#1, Mod[#1[[-1]] + #1[[-2]] + #1[[-3]], #2]] &, {1, 1, 1}, Range[68] + 2] (* _Ivan Neretin_, Jun 28 2017 *)

%o (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

%Y Cf. A000213, A096535.

%K easy,nonn

%O 0,5

%A _Jonathan Vos Post_, Oct 05 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 08:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)