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

A194959 Fractalization of (1 + floor(n/2)).

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 1, 3, 4, 2, 1, 3, 5, 4, 2, 1, 3, 5, 6, 4, 2, 1, 3, 5, 7, 6, 4, 2, 1, 3, 5, 7, 8, 6, 4, 2, 1, 3, 5, 7, 9, 8, 6, 4, 2, 1, 3, 5, 7, 9, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 12, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 13, 12, 10, 8, 6, 4, 2, 1, 3, 5
Offset: 1

Views

Author

Clark Kimberling, Sep 06 2011

Keywords

Comments

Suppose that p(1), p(2), p(3), ... is an integer sequence satisfying 1 <= p(n) <= n for n >= 1. Define g(1)=(1) and for n > 1, form g(n) from g(n-1) by inserting n so that its position in the resulting n-tuple is p(n). The sequence f obtained by concatenating g(1), g(2), g(3), ... is clearly a fractal sequence, here introduced as the fractalization of p. The interspersion associated with f is here introduced as the interspersion fractally induced by p, denoted by I(p); thus, the k-th term in the n-th row of I(p) is the position of the k-th n in f. Regarded as a sequence, I(p) is a permutation of the positive integers; its inverse permutation is denoted by Q(p).
...
Example: Let p=(1,2,2,3,3,4,4,5,5,6,6,7,7,...)=A008619. Then g(1)=(1), g(2)=(1,2), g(3)=(1,3,2), so that
f=(1,1,2,1,3,2,1,3,4,2,1,3,5,4,2,1,3,5,6,4,2,1,...)=A194959; and I(p)=A057027, Q(p)=A064578.
The interspersion I(P) has the following northwest corner, easily read from f:
1 2 4 7 11 16 22
3 6 10 15 21 28 36
5 8 12 17 23 30 38
9 14 20 27 35 44 54
...
Following is a chart of selected p, f, I(p), and Q(p):
p f I(p) Q(p)
Count odd numbers up to n, then even numbers down from n. - Franklin T. Adams-Watters, Jan 21 2012
This sequence defines the square array A(n,k), n > 0 and k > 0, read by antidiagonals and the triangle T(n,k) = A(n+1-k,k) for 1 <= k <= n read by rows (see Formula and Example). - Werner Schulte, May 27 2018

Examples

			The sequence p=A008619 begins with 1,2,2,3,3,4,4,5,5,..., so that g(1)=(1). To form g(2), write g(1) and append 2 so that in g(2) this 2 has position p(2)=2: g(2)=(1,2). Then form g(3) by inserting 3 at position p(3)=2: g(3)=(1,3,2), and so on. The fractal sequence A194959 is formed as the concatenation g(1)g(2)g(3)g(4)g(5)...=(1,1,2,1,3,2,1,3,4,2,1,3,5,4,2,...).
From _Werner Schulte_, May 27 2018: (Start)
This sequence seen as a square array read by antidiagonals:
  n\k: 1  2  3  4  5   6   7   8   9  10  11  12 ...
  ===================================================
   1   1  2  2  2  2   2   2   2   2   2   2   2 ... (see A040000)
   2   1  3  4  4  4   4   4   4   4   4   4   4 ... (see A113311)
   3   1  3  5  6  6   6   6   6   6   6   6   6 ...
   4   1  3  5  7  8   8   8   8   8   8   8   8 ...
   5   1  3  5  7  9  10  10  10  10  10  10  10 ...
   6   1  3  5  7  9  11  12  12  12  12  12  12 ...
   7   1  3  5  7  9  11  13  14  14  14  14  14 ...
   8   1  3  5  7  9  11  13  15  16  16  16  16 ...
   9   1  3  5  7  9  11  13  15  17  18  18  18 ...
  10   1  3  5  7  9  11  13  15  17  19  20  20 ...
  etc.
This sequence seen as a triangle read by rows:
  n\k:  1  2  3  4  5   6   7   8   9  10  11  12  ...
  ======================================================
   1    1
   2    1  2
   3    1  3  2
   4    1  3  4  2
   5    1  3  5  4  2
   6    1  3  5  6  4   2
   7    1  3  5  7  6   4   2
   8    1  3  5  7  8   6   4   2
   9    1  3  5  7  9   8   6   4   2
  10    1  3  5  7  9  10   8   6   4   2
  11    1  3  5  7  9  11  10   8   6   4   2
  12    1  3  5  7  9  11  12  10   8   6   4   2
  etc.
(End)
		

References

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

Crossrefs

Cf. A000142, A000217, A005408, A005843, A008619, A057027, A064578, A209229, A210535, A219977; A000012 (col 1), A157532 (col 2), A040000 (row 1), A113311 (row 2); A194029 (introduces the natural fractal sequence and natural interspersion of a sequence - different from those introduced at A194959).
Cf. A003558 (g permutation order), A102417 (index), A330081 (on bits), A057058 (inverse).

Programs

  • Mathematica
    r = 2; p[n_] := 1 + Floor[n/r]
    Table[p[n], {n, 1, 90}]  (* A008619 *)
    g[1] = {1}; g[n_] := Insert[g[n - 1], n, p[n]]
    f[1] = g[1]; f[n_] := Join[f[n - 1], g[n]]
    f[20] (* A194959 *)
    row[n_] := Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_] := Part[row[n], k];
    w = Flatten[Table[v[k, n - k + 1], {n, 1, 13},
    {k, 1, n}]]  (* A057027 *)
    q[n_] := Position[w, n]; Flatten[
    Table[q[n], {n, 1, 80}]]  (* A064578 *)
    Flatten[FoldList[Insert[#1, #2, Floor[#2/2] + 1] &, {}, Range[10]]] (* Birkas Gyorgy, Jun 30 2012 *)
  • PARI
    T(n,k) = min(k<<1-1,(n-k+1)<<1); \\ Kevin Ryde, Oct 09 2020

Formula

From Werner Schulte, May 27 2018 and Jul 10 2018: (Start)
Seen as a triangle: It seems that the triangle T(n,k) for 1 <= k <= n (see Example) is the mirror image of A210535.
Seen as a square array A(n,k) and as a triangle T(n,k):
A(n,k) = 2*k-1 for 1 <= k <= n, and A(n,k) = 2*n for 1 <= n < k.
A(n+1,k+1) = A(n,k+1) + A(n,k) - A(n-1,k) for k > 0 and n > 1.
A(n,k) = A(k,n) - 1 for n > k >= 1.
P(n,x) = Sum_{k>0} A(n,k)*x^(k-1) = (1-x^n)*(1-x^2)/(1-x)^3 for n >= 1.
Q(y,k) = Sum_{n>0} A(n,k)*y^(n-1) = 1/(1-y) for k = 1 and Q(y,k) = Q(y,1) + P(k-1,y) for k > 1.
G.f.: Sum_{n>0, k>0} A(n,k)*x^(k-1)*y^(n-1) = (1+x)/((1-x)*(1-y)*(1-x*y)).
Sum_{k=1..n} A(n+1-k,k) = Sum_{k=1..n} T(n,k) = A000217(n) for n > 0.
Sum_{k=1..n} (-1)^(k-1) * A(n+1-k,k) = Sum_{k=1..n} (-1)^(k-1) * T(n,k) = A219977(n-1) for n > 0.
Product_{k=1..n} A(n+1-k,k) = Product_{k=1..n} T(n,k) = A000142(n) for n > 0.
A(n+m,n) = A005408(n-1) for n > 0 and some fixed m >= 0.
A(n,n+m) = A005843(n) for n > 0 and some fixed m > 0.
Let A_m be the upper left part of the square array A(n,k) with m rows and m columns. Then det(A_m) = 1 for some fixed m > 0.
The P(n,x) satisfy the recurrence equation P(n+1,x) = P(n,x) + x^n*P(1,x) for n > 0 and initial value P(1,x) = (1+x)/(1-x).
Let B(n,k) be multiplicative with B(n,p^e) = A(n,e+1) for e >= 0 and some fixed n > 0. That yields the Dirichlet g.f.: Sum_{k>0} B(n,k)/k^s = (zeta(s))^3/(zeta(2*s)*zeta(n*s)).
Sum_{k=1..n} A(k,n+1-k)*A209229(k) = 2*n-1. (conjectured)
(End)
From Kevin Ryde, Oct 09 2020: (Start)
T(n,k) = 2*k-1 if 2*k-1 <= n, or 2*(n+1-k) if 2*k-1 > n. [Lévy, chapter 1 section 1 equations (a),(b)]
Fixed points T(n,k)=k for k=1 and k = (2/3)*(n+1) when an integer. [Lévy, chapter 1 section 2 equation (3)]
(End)

Extensions

Name corrected by Franklin T. Adams-Watters, Jan 21 2012

A049472 a(n) = floor(n/sqrt(2)).

Original entry on oeis.org

0, 0, 1, 2, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9, 9, 10, 11, 12, 12, 13, 14, 14, 15, 16, 16, 17, 18, 19, 19, 20, 21, 21, 22, 23, 24, 24, 25, 26, 26, 27, 28, 28, 29, 30, 31, 31, 32, 33, 33, 34, 35, 36, 36, 37, 38, 38, 39, 40, 41, 41, 42, 43, 43, 44, 45, 45, 46, 47
Offset: 0

Views

Author

Keywords

Comments

For n > 0: A006337(n) = number of repeating n's. - Reinhard Zumkeller, Jul 04 2015

Crossrefs

First differences give A080764.

Programs

A022776 Place where n-th 1 occurs in A023115.

Original entry on oeis.org

1, 2, 4, 7, 10, 14, 19, 24, 30, 37, 45, 53, 62, 72, 82, 93, 105, 118, 131, 145, 160, 175, 191, 208, 225, 243, 262, 282, 302, 323, 345, 367, 390, 414, 439, 464, 490, 517, 544, 572, 601, 630, 660, 691, 723, 755, 788, 822, 856, 891, 927, 964, 1001
Offset: 1

Views

Author

Keywords

Comments

Positions of the integers when the numbers a + b*sqrt(2) are arranged in increasing order. - Clark Kimberling, Mar 16 2015
It seems the name of this sequence could also be "Indices where records occur in A007336". - Ivan N. Ianakiev, Sep 09 2019

Examples

			The ordering of numbers a+b*r, where r = sqrt(2) as in Comments, begins with 0, 1, r, 2, 1+r, 2r, 3, 2+r, 1+2r, 4, ... in which the positions of integers are 1, 2, 4, 7, 10.
		

Crossrefs

Programs

  • Mathematica
    t = Table[n + 1 + Sum[Floor[(n - k)/Sqrt[2]], {k, 0, n}], {n, 0, 200}] (* A022776 *)
    Differences[t] (* A049474 *) (* Clark Kimberling, Mar 14 2015 *)
  • PARI
    a(n)=1+sum(k=1,n-1,ceil(k/sqrt(2))) \\ Benoit Cloitre, Jan 24 2009

Formula

a(n) = 1 + Sum_{k=1..n-1} ceiling(r*k) where r=1/sqrt(2). - Benoit Cloitre, Jan 24 2009

A194977 Interspersion fractally induced by A194976, a rectangular array, by antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 9, 11, 12, 15, 13, 14, 16, 17, 21, 18, 19, 20, 22, 23, 28, 24, 25, 27, 26, 29, 30, 36, 31, 32, 35, 33, 34, 37, 38, 45, 39, 40, 44, 41, 42, 43, 46, 47, 55, 48, 49, 54, 50, 51, 52, 53, 56, 57, 66, 58, 59, 65, 60, 61, 62, 64, 63, 67, 68, 78, 69, 70, 77, 71, 72, 73, 76, 74, 75
Offset: 1

Views

Author

Clark Kimberling, Sep 07 2011

Keywords

Comments

See A194959 for a discussion of fractalization and the interspersion fractally induced by a sequence. Every pair of rows eventually intersperse. As a sequence, A194977 is a permutation of the positive integers, with inverse A194978.

Examples

			Northwest corner:
   1  2  4  7 11 16 22
   3  5  8 12 17 23 30
   6 10 15 21 28 36 45
   9 13 18 24 31 39 48
  14 19 25 32 40 49 59
		

Crossrefs

Programs

  • Mathematica
    r = Sqrt[2]; p[n_] := 1 + Floor[n/r]
    Table[p[n], {n, 1, 90}]  (* A049474 *)
    g[1] = {1}; g[n_] := Insert[g[n - 1], n, p[n]]
    f[1] = g[1]; f[n_] := Join[f[n - 1], g[n]]
    f[20] (* A194976 *)
    row[n_] := Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_] := Part[row[n], k];
    w = Flatten[Table[v[k, n - k + 1], {n, 1, 13},
    {k, 1, n}]] (* A194977 *)
    q[n_] := Position[w, n]; Flatten[Table[q[n],
    {n, 1, 80}]] (* A194978 *)

Extensions

Terms a(70) and beyond from G. C. Greubel, Mar 28 2018

A194976 Fractalization of (1+[n/sqrt(2)]), where [ ]=floor.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 2, 4, 3, 1, 2, 4, 5, 3, 1, 2, 4, 5, 6, 3, 1, 2, 4, 5, 7, 6, 3, 1, 2, 4, 5, 7, 8, 6, 3, 1, 2, 4, 5, 7, 8, 9, 6, 3, 1, 2, 4, 5, 7, 8, 9, 10, 6, 3, 1, 2, 4, 5, 7, 8, 9, 11, 10, 6, 3, 1, 2, 4, 5, 7, 8, 9, 11, 12, 10, 6, 3, 1, 2, 4, 5, 7, 8, 9, 11, 12, 13, 10, 6, 3, 1, 2, 4
Offset: 1

Views

Author

Clark Kimberling, Sep 07 2011

Keywords

Comments

See A194959 for a discussion of fractalization and the interspersion fractally induced by a sequence. The sequence (1+[n/sqrt(2)]) is A049474.

Crossrefs

Programs

  • Mathematica
    r = Sqrt[2]; p[n_] := 1 + Floor[n/r]
    Table[p[n], {n, 1, 90}]  (* A049474 *)
    g[1] = {1}; g[n_] := Insert[g[n - 1], n, p[n]]
    f[1] = g[1]; f[n_] := Join[f[n - 1], g[n]]
    f[20] (* A194976 *)
    row[n_] := Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_] := Part[row[n], k];
    w = Flatten[Table[v[k, n - k + 1], {n, 1, 13},
    {k, 1, n}]] (* A194977 *)
    q[n_] := Position[w, n]; Flatten[Table[q[n],
    {n, 1, 80}]] (* A194978 *)

A099188 a(n) = 2*ceiling(n/sqrt(2)).

Original entry on oeis.org

0, 2, 4, 6, 6, 8, 10, 10, 12, 14, 16, 16, 18, 20, 20, 22, 24, 26, 26, 28, 30, 30, 32, 34, 34, 36, 38, 40, 40, 42, 44, 44, 46, 48, 50, 50, 52, 54, 54, 56, 58, 58, 60, 62, 64, 64, 66, 68, 68, 70, 72, 74, 74, 76, 78, 78, 80, 82, 84, 84, 86, 88, 88, 90, 92, 92, 94, 96, 98, 98, 100
Offset: 0

Views

Author

David W. Wilson, Mar 26 2005

Keywords

Comments

Conjecturally, length of shortest polygonal path from (0,0) to (n,n) with integer vertices and edges. This is true for n <= 10000.

Programs

Formula

a(n) = 2*A049474(n).
Showing 1-6 of 6 results.