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-2 of 2 results.

A076839 A simple example of the Lyness 5-cycle: a(1) = a(2) = 1; a(n) = (a(n-1)+1)/a(n-2) (for n>2).

Original entry on oeis.org

1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2
Offset: 1

Views

Author

N. J. A. Sloane, Nov 21 2002

Keywords

Comments

Any sequence a(1),a(2),a(3),... defined by the recurrence a(n) = (a(n-1)+1)/a(n-2) (for n>2) has period 5. The theory of cluster algebras currently being developed by Fomin and Zelevinsky gives a context for these facts, but it doesn't really explain them in an elementary way. - James Propp, Nov 20 2002
Equivalently, for n>2, a(n) > 0 is such that a(n-1)^2+4*a(n-2)*a(n) is a minimal square, with a(1)=1, a(2)=1. - Ray Chandler, May 16 2024

References

  • J. H. Conway and R. L. Graham, On Periodic Sequences Defined by Recurrences, unpublished, date?
  • Martin Gardner, The Magic Numbers of Dr Matrix, Prometheus Books, 1985, pages 198 and 305.

Crossrefs

See A335688/A335689 for a very similar nonperiodic sequence.
This sequence and A135352 are bisections of each other.

Programs

  • Maple
    a := 1; b := 1; f := proc(n) option remember; global a,b; if n=1 then a elif n=2 then b else (f(n-1)+1)/f(n-2); fi; end;
  • Mathematica
    RecurrenceTable[{a[1]==a[2]==1,a[n]==(a[n-1]+1)/a[n-2]},a,{n,110}] (* or *) LinearRecurrence[{0,0,0,0,1},{1,1,2,3,2},110] (* Harvey P. Dale, Jan 17 2013 *)

Formula

Periodic with period 5.
a(1)=1, a(2)=1, a(3)=2, a(4)=3, a(5)=2, a(n)=a(n-5). - Harvey P. Dale, Jan 17 2013

Extensions

Thanks to Michael Somos for pointing out the Kocic et al. (1993) reference. Also I deleted some useless comments. - N. J. A. Sloane, Jul 19 2020

A139434 Frieze pattern with 4 rows, read by diagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 3, 2
Offset: 0

Views

Author

N. J. A. Sloane, Jun 09 2008

Keywords

Comments

Period 20: repeat [1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1]. - Wesley Ivan Hurt, Jun 05 2016
Every frieze is defined by its quiddity (the row below the row of 1's), which corresponds to the counts of triangles at vertices of a dissection of a regular polygon. The quiddity of this frieze is A135352. One can say that this frieze pattern has width 2 (not counting the rows of 1's), 4, or 5 (implying the additional row of 0's; this is also the period of the pattern and the number of vertices in the dissected polygon), depending on the convention. In any case, friezes of given width are enumerated by A000207 if we identify shifts and mirror images, otherwise by A000108. A000207(3) = 1 means that this is the only frieze of this width, and it has A000108(3) = 5 different horizontal shifts or reflections. The A000207(4) = 3 friezes having width 1 greater than this one are A139438, A139458, and one more with quiddity 1, 3, 1, 3, 1, 3, ... (currently not in the OEIS). The only frieze having width 1 less than this one has quiddity 1, 2, 1, 2, ... (A245477 can be interpreted as representing that frieze pattern). - Andrey Zabolotskiy, Jan 30 2024

Examples

			The frieze pattern is
...1 1 1 1 1 1 1 ...
....1 2 2 1 3 1 2 ...
.....1 3 1 2 2 1 3 ...
......1 1 1 1 1 1 1 ...
		

References

  • J. H. Conway and R. K. Guy, The Book of Numbers. New York: Springer-Verlag, p. 97, 1996.

Crossrefs

Showing 1-2 of 2 results.