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.

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

A131968 Interspersion of the Farey fractal sequence, A131967.

Original entry on oeis.org

1, 3, 2, 6, 5, 4, 11, 10, 8, 7, 18, 17, 14, 13, 9, 29, 28, 23, 21, 15, 12, 42, 41, 35, 33, 25, 20, 16, 61, 60, 51, 48, 37, 32, 26, 19, 86, 85, 71, 68, 54, 46, 38, 31, 22
Offset: 1

Views

Author

Clark Kimberling, Aug 02 2007

Keywords

Comments

A permutation of the natural numbers.

Examples

			Northwest corner:
1 3 6 11 18
2 5 10 17 28
4 8 14 23 35
7 13 21 33 48
		

References

  • C. Kimberling, "Fractal sequences and interspersions," Ars Combinatoria 45 (1997) 157-168.

Crossrefs

Cf. A131967.

Formula

Rectangular array T given by antidiagonals. T(i,j) = the j-th index n such that A131967(n)=i.

A049688 a(n) = Sum_{i=0..n} T(i,n-i), array T as in A049687.

Original entry on oeis.org

0, 2, 5, 10, 17, 28, 41, 60, 83, 112, 145, 188, 235, 294, 359, 432, 513, 610, 713, 834, 963, 1104, 1255, 1428, 1609, 1810, 2023, 2254, 2497, 2768, 3047, 3356, 3681, 4026, 4387, 4772, 5169, 5602, 6053, 6528, 7019
Offset: 0

Views

Author

Keywords

Comments

A131967(a(n)+1) = 1, A131967(a(n)) = 2. - Birkas Gyorgy, Feb 19 2011
Number of triples {A, B, C} where 1 <= A <= B <= C <= n+1 and gcd(C-B, B-A) = 1. E.g., for n=2, we have the 5 triples {1, 1, 2}, {1, 2, 2}, {2, 2, 3}, {2, 3, 3}, and {1, 2, 3}. - Griffin N. Macris, May 21 2016

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[EulerPhi[j], {j, i}] + 1, {i, n}], {n, 0, 30}] (* Birkas Gyorgy, Feb 19 2011 *)
    Table[n + Sum[ EulerPhi[ j], {i, n}, {j, i}], {n, 0, 30}] (* Robert G. Wilson v, Feb 12 2015 *)

Formula

a(n) ~ n^2*(3+n) / Pi^2. - Griffin N. Macris, May 21 2016
Showing 1-3 of 3 results.