cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A096535 a(0) = a(1) = 1; a(n) = (a(n-1) + a(n-2)) mod n.

Original entry on oeis.org

1, 1, 0, 1, 1, 2, 3, 5, 0, 5, 5, 10, 3, 0, 3, 3, 6, 9, 15, 5, 0, 5, 5, 10, 15, 0, 15, 15, 2, 17, 19, 5, 24, 29, 19, 13, 32, 8, 2, 10, 12, 22, 34, 13, 3, 16, 19, 35, 6, 41, 47, 37, 32, 16, 48, 9, 1, 10, 11, 21, 32, 53, 23, 13, 36, 49, 19, 1, 20, 21, 41, 62, 31, 20, 51, 71, 46, 40, 8, 48, 56
Offset: 0

Views

Author

Keywords

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

Crossrefs

Cf. A079777, A096274 (location of 0's), A096534, A132678.

Programs

  • 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
  • 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 *)

A122277 Length of n-th run of zeros in A122276.

Original entry on oeis.org

5, 3, 5, 4, 2, 2, 2, 1, 4, 3, 2, 1, 5, 2, 4, 2, 2, 1, 3, 1, 2, 1, 3, 2, 1, 2, 4, 1, 2, 3, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 3, 2, 3, 2, 2, 2, 3, 3, 2, 1, 2, 1, 2, 2, 3, 2, 1, 5, 2, 2, 2, 2, 1, 4, 4, 2, 1, 2, 1, 2, 1, 2, 2, 2, 3, 3, 2, 3, 1, 1, 2, 1, 2, 1, 2, 2, 3, 1, 5, 1, 2, 3, 3, 3, 2, 1, 2
Offset: 1

Views

Author

Klaus Brockhaus, Aug 29 2006

Keywords

Comments

A run of zeros in A122276 corresponds to a section of A096535 where a(j) = a(j-1) + a(j-2) holds.

Crossrefs

Cf. A096535, A122276, A122278 (records), A122279 (where records occur).

Programs

  • Mathematica
    f[s_] := f[s] = Append[s, Mod[s[[ -2]] + s[[ -1]], Length[s]]]; k = 435; t = Nest[f, {1, 1}, k]; s = {}; Do[ AppendTo[s, If[t[[n]] + t[[n + 1]] < n + 1, 0, 1]], {n, k}]; Length /@ Select[Split@s, Union@# == {0} &] (* Robert G. Wilson v Sep 02 2006 *)
  • PARI
    {m=1000;a=1;b=1;c=0;for(n=2,m,d=divrem(a+b,n);if(d[1]==0,c++,if(c>0,print1(c,",");c=0));a=b;b=d[2])}

A122279 Where records occur in A122277.

Original entry on oeis.org

1, 114, 472, 86520, 397603, 514911, 5123504, 382611481, 1166422075, 24846586495, 62401902289, 344065155571
Offset: 1

Views

Author

Klaus Brockhaus, Aug 30 2006

Keywords

Crossrefs

Cf. A096535, A122276, A122277, A122278 (records).

Extensions

More terms from Martin Fuller, Nov 22 2007

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

Original entry on oeis.org

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, 22, 18, 14, 22, 21, 23, 31, 3, 20, 16, 0, 36, 11, 5, 9, 25, 39, 27, 44, 14, 36, 44, 43, 19, 0, 8, 27, 35, 13, 17, 6, 36, 59, 39, 8, 42, 24, 8, 7, 39, 54, 30
Offset: 0

Views

Author

Jonathan Vos Post, Oct 05 2007

Keywords

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

Crossrefs

Programs

  • 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 *)
  • 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
Showing 1-4 of 4 results.