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.

A191775 Positions of 1 in A191774; complement of A191775.

Original entry on oeis.org

1, 3, 4, 6, 7, 8, 11, 12, 13, 14, 16, 18, 19, 20, 21, 23, 26, 27, 29, 30, 31, 32, 33, 35, 38, 39, 40, 42, 43, 44, 45, 46, 48, 50, 51, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 71, 72, 77, 78, 79, 80, 81, 82, 84, 86, 87, 88, 89, 91, 93, 94, 96, 97
Offset: 1

Views

Author

Clark Kimberling, Jun 16 2011

Keywords

Comments

See A191774.

Crossrefs

Cf. A191774.

Programs

A191776 Positions of 2 in A191774; complement of A191775.

Original entry on oeis.org

2, 5, 9, 10, 15, 17, 22, 24, 25, 28, 34, 36, 37, 41, 47, 49, 52, 53, 54, 60, 67, 70, 73, 74, 75, 76, 83, 85, 90, 92, 95, 100, 101, 102, 103, 106, 112, 115, 120, 122, 126, 131, 132, 133, 134, 138, 145, 147, 149, 155, 157, 158, 161, 163, 170, 171, 172, 174
Offset: 1

Views

Author

Clark Kimberling, Jun 16 2011

Keywords

Comments

See A191774.

Crossrefs

Programs

A191770 Lim f(f(...f(n)...)) where f(n) is the fractal sequence A022446.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jun 16 2011

Keywords

Comments

Suppose that f(1), f(2), ... is a fractal sequence (such as 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, ..., which contains itself as a proper subsequence - 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}. If f(2)>2, then L(n)=1 for all n; if f(2)=2 and f(3)>3, then L(n) equals 1 or 2 for all n. Examples: A020903, A191770, A191774.

Examples

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

Crossrefs

Programs

  • Mathematica
    g[n_] :=  Length[Select[Table[FixedPoint[i + PrimePi[#] + 1 &, i + PrimePi[i] + 1], {i, n}], # <= n &]];
    f[n_] := PrimePi[NestWhile[g, n, ! PrimeQ[#] && # != 1 &]] + 1;
    Array[f, 80]             (* A022446 *)
    h[n_] := Nest[f, n, 40]; t = Table[h[n], {n, 1, 300}]  (* A191770 *)
    Flatten[Position[t, 1]]  (* A191771 *)
    Flatten[Position[t, 2]]  (* A191772 *)
    Flatten[Position[t, 3]]  (* A191773 *)

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