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

A191771 Positions of 1 in A191770.

Original entry on oeis.org

1, 4, 5, 7, 9, 10, 13, 14, 16, 18, 19, 22, 23, 24, 26, 28, 30, 34, 35, 36, 37, 39, 41, 42, 45, 47, 50, 51, 52, 54, 56, 58, 59, 60, 61, 64, 66, 70, 72, 73, 74, 76, 78, 79, 81, 82, 83, 84, 85, 88, 91, 95, 97, 98, 99, 100, 103, 104, 106, 108, 109, 111, 112, 114
Offset: 1

Views

Author

Clark Kimberling, Jun 16 2011

Keywords

Comments

See A191770. This sequence and A191772 and A191773 partition the set of positive integers.

Crossrefs

Cf. A191770.

Programs

A191772 Positions of 2 in A191770.

Original entry on oeis.org

2, 6, 11, 12, 20, 21, 29, 31, 32, 33, 44, 46, 48, 49, 63, 65, 67, 68, 69, 71, 87, 90, 92, 93, 94, 96, 107, 113, 118, 121, 123, 124, 125, 127, 128, 131, 142, 148, 155, 159, 161, 162, 164, 166, 168, 171, 185, 191, 192, 197, 202, 206, 208, 209, 211, 212, 214
Offset: 1

Views

Author

Clark Kimberling, Jun 16 2011

Keywords

Comments

See A191770.

Crossrefs

Programs

A191773 Positions of 3 in A191770.

Original entry on oeis.org

3, 8, 15, 17, 25, 27, 38, 40, 43, 53, 55, 57, 62, 75, 77, 80, 86, 89, 101, 102, 105, 110, 117, 120, 134, 135, 140, 145, 154, 157, 158, 167, 175, 176, 181, 183, 188, 201, 204, 205, 215, 224, 225, 232, 235, 239, 242, 251, 256, 260, 261, 263, 274, 283, 286, 287
Offset: 1

Views

Author

Clark Kimberling, Jun 16 2011

Keywords

Comments

See A191770.

Crossrefs

Programs

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

A191774 Lim f(f(...f(n)...)) where f(n) is the Farey fractal sequence, A131967.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jun 16 2011

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 a rigorous definition). 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}. Thus, 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. Examples: A020903, A191770, A191774

Examples

			Write the counting numbers and A131967 like this:
1..2..3..4..5..6..7..8..9..10..11..12..13..14..15..
1..2..1..3..2..1..4..3..5..2...1...6...4...3...5...
It is then easy to check composites:
1->1, 2->2, 3->1, 4->3->1, 5->2, 6->1, 7->4->3->1,...
		

Crossrefs

Programs

  • Mathematica
    Farey[n_] := Select[Union@Flatten@Outer[Divide, Range[n + 1] - 1, Range[n]], # <= 1 &];
    newpos[n_] := Module[{length = Total@Array[EulerPhi, n] + 1, f1 = Farey[n], f2 = Farey[n - 1], to},
       to = Complement[Range[length], Flatten[Position[f1, #] & /@ f2]];
       ReplacePart[Array[0 &, length],
        Inner[Rule, to, Range[length - Length[to] + 1, length], List]]];
    a[n_] := Flatten@Table[Fold[ReplacePart[Array[newpos, i][[#2 + 1]], Inner[Rule, Flatten@Position[Array[newpos, i][[#2 + 1]], 0], #1, List]] &, Array[newpos, i][[1]], Range[i - 1]], {i, n}];
    t = a[12]; f[n_] := Part[t, n];
    Table[f[n], {n, 1, 100}]          (* A131967 *)
    h[n_] := Nest[f, n, 50]
    t = Table[h[n], {n, 1, 200}]      (* A191774 *)
    s = Flatten[Position[t, 1]]       (* A191775 *)
    s = Flatten[Position[t, 2]]       (* A191776 *)
Showing 1-5 of 5 results.