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-3 of 3 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 *)

A079777 a(0) = 0, a(1) = 1; for n > 1, a(n) = (a(n-1) + a(n-2)) (mod n).

Original entry on oeis.org

0, 1, 1, 2, 3, 0, 3, 3, 6, 0, 6, 6, 0, 6, 6, 12, 2, 14, 16, 11, 7, 18, 3, 21, 0, 21, 21, 15, 8, 23, 1, 24, 25, 16, 7, 23, 30, 16, 8, 24, 32, 15, 5, 20, 25, 0, 25, 25, 2, 27, 29, 5, 34, 39, 19, 3, 22, 25, 47, 13, 0, 13, 13, 26, 39, 0, 39, 39, 10, 49, 59, 37, 24, 61, 11, 72, 7, 2, 9, 11, 20
Offset: 0

Views

Author

Joseph L. Pe, Mar 08 2003

Keywords

Crossrefs

Programs

  • Mathematica
    l = {1, 1}; For[i = 3, 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, {0, 1}, 80] (* Robert G. Wilson v, Dec 16 2007 *)
    RecurrenceTable[{a[0]==0,a[1]==1,a[n]==Mod[a[n-1]+a[n-2],n]},a,{n,80}] (* Harvey P. Dale, Nov 29 2019 *)

Extensions

Edited by Robert G. Wilson v, Dec 16 2007

A072987 FIBMOD numbers: a(1) = a(2) = 1, a(n) = a(n-1) mod (n-1) + a(n-2) mod (n-2).

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 8, 6, 7, 13, 10, 13, 11, 12, 23, 20, 12, 16, 28, 25, 14, 19, 33, 29, 15, 20, 35, 28, 8, 8, 16, 24, 40, 31, 38, 34, 37, 34, 34, 68, 62, 49, 28, 35, 63, 53, 25, 32, 57, 40, 48, 88, 84, 67, 44, 57, 45, 46, 91, 78, 50, 68, 56, 62, 118, 115, 102
Offset: 1

Views

Author

Benoit Cloitre, Aug 14 2002

Keywords

Comments

Superseeker suggested that this sequence might be related to A096534 via the transformation T026 (coefficients of Sn(z)/(1+z)) for a(3) to a(76). - Eli Jaffe, Sep 16 2015
Superseeker's reply seems to be true: it appears that the present sequence has generating function equal to (1+x)*(1+x*G(X)), where G(x) is the g.f. for A096534. - N. J. A. Sloane, Nov 23 2015

Examples

			For n=8, a(8) = (a(7) mod 7) + (a(6) mod 6) = 1 + 5 = 6. - _Eli Jaffe_, Sep 16 2015
		

Crossrefs

Cf. A096534.

Programs

  • Magma
    I:=[1, 1]; [n le 2 select I[n] else Self(n-1) mod (n-1) + Self(n-2) mod (n-2): n in [1..80]]; // Vincenzo Librandi, Sep 26 2015
    
  • Maple
    a:= proc(n) option remember; `if`(n<3, 1,
          add(irem(a(n-j), n-j), j=1..2))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Mar 20 2018
  • Mathematica
    a = {1, 1}; Do[AppendTo[a, Mod[a[[n - 1]], n - 1] + Mod[a[[n - 2]], n - 2]], {n, 3, 76}]; a (* Michael De Vlieger, Sep 17 2015 *)
    RecurrenceTable[{a[1]==a[2]==1,a[n]==Mod[a[n-1],n-1]+Mod[a[n-2],n-2]},a,{n,80}] (* Harvey P. Dale, Oct 28 2017 *)
  • PARI
    a=vector(10^5); a[1]=a[2]=1; for(n=3, #a, a[n]=a[n-1]%(n-1)+a[n-2]%(n-2)); a \\ Altug Alkan, Mar 20 2018

Formula

a(n) < 2n.
A096534(n) == a(n) mod n. - Danny Rorabaugh, Oct 13 2015

Extensions

Corrected by Harvey P. Dale, Oct 28 2017
Showing 1-3 of 3 results.