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.

A020903 Lim f(f(...f(n))) where f is the fractal sequence given by f(n)=A002260(n+1).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Suppose that f(1), f(2), f(3),... is a fractal sequence (a sequence which contains itself as a proper subsequence, such as 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, ...; if the first occurrence of each n is deleted, the remaining sequence is identical to the original; see the Wikipedia article for details). Then for each n>=1, the limit L(n) of composites f(f(f...f(n)...)) exists and is one of the numbers in the set {k : f(k)=k}. If f(2)>2, then L(n)=1 for all n; if f(2)=2 and f(3)>3, then L(n) is 1 or 2 for all n, etc. Examples: A020903, A191770, A191774.
Conjecture: a(n) and a(n+1) are never both 2. - Robert Israel, Sep 03 2015
From Michel Dekking, Apr 09 2016: (Start)
Proof of the conjecture: Let f(n)=A002260(n+1)=1,2,1,2,3,1,2,3,4,... Then (f(n)) is a concatenation of ladders 1,2 followed by 1,2,3 followed by 1,2,3,4 etc. The proof is by induction. Note that the sequence (a(n)) can be seen as map from the positive integers to the positive integers. The induction starts from the observation that a(1) and a(2) are not both 2.
We use that f(k)2. Any pair (k,k+1) from a ladder has image (a(k),a(k+1)) = (a(f(k)),a(f(k+1))), which occurs either as image of two adjacent integers (j,j+1) earlier in the sequence, and so will not be equal to (2,2) by the induction hypothesis, or as image of a pair (j,1), whose image is also not equal to (2,2). The same holds for a pair consisting of the end of a ladder and the next entry. (End)

Examples

			f=(1,2,1,2,3,1,2,3,4,1,2,3,4,5,1,2,3,4,5,6,...); write
n->n1->n2-> to mean n1=f(n), n2=f(n1),... Then
1->1, 2->2, 3->1, 4->2, 5->3->1, 6->1, 7->2, ...
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; local t; t:= floor((sqrt(8*n+1)-1)/2); procname(n+1-t*(t+1)/2) end proc:
    f(1):= 1: f(2):=2:
    seq(f(i),i=1..1000); # Robert Israel, Sep 03 2015
  • Mathematica
    m[n_] := Floor[(-1 + Sqrt[8 n - 7])/2];
    b[n_] := n - m[n] (m[n] + 1)/2; f[n_] := b[n + 1];
    Table[m[n], {n, 1, 100}]      (*A003056*)
    Table[f[n], {n, 1, 100}]      (*A002260(n+1)*)
    h[n_] := Nest[f, n, 40]
    t = Table[h[n], {n, 1, 300}]  (* A020903 *)
    Flatten[Position[t, 1]]       (* A191777 *)
    Flatten[Position[t, 2]]       (* A020904 *)