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-8 of 8 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

A188568 Enumeration table T(n,k) by descending antidiagonals. The order of the list - if n is odd: T(n,1), T(2,n-1), T(n-2,3), ..., T(n-1,2), T(1,n); if n is even: T(1,n), T(n-1,2), T(3,n-2), ..., T(2,n-1), T(n,1).

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Dec 27 2012

Keywords

Comments

Self-inverse permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Call a "layer" a pair of sides of square from T(1,n) to T(n,n) and from T(n,n) to T(n,1). This table read layer by layer clockwise is A194280. This table read by boustrophedonic ("ox-plowing") method - layer clockwise, layer counterclockwise and so on - is A064790. - Boris Putievskiy, Mar 14 2013

Examples

			The start of the sequence as table:
   1,  2,  6,  7, 15, 16, 28, ...
   3,  5,  9, 12, 20, 23, 35, ...
   4,  8, 13, 18, 26, 31, 43, ...
  10, 14, 19, 25, 33, 40, 52, ...
  11, 17, 24, 32, 41, 50, 62, ...
  21, 27, 34, 42, 51, 61, 73, ...
  22, 30, 39, 49, 60, 72, 85, ...
  ...
The start of the sequence as triangular array read by rows:
   1;
   2,  3;
   6,  5,  4;
   7,  9,  8, 10;
  15, 12, 13, 14, 11;
  16, 20, 18, 19, 17, 21;
  28, 23, 26, 25, 24, 27, 22;
  ...
Row number k contains permutation of the k numbers:
{ (k^2-k+2)/2, (k^2-k+2)/2 + 1, ..., (k^2+k-2)/2 + 1 }.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{t, i, j},
    t = Floor[(Sqrt[8n-7]-1)/2];
    i = n-t(t+1)/2;
    j = (t^2+3t+4)/2-n;
    ((i+j-1)(i+j-2) + ((-1)^Max[i,j]+1)i - ((-1)^Max[i,j]-1)j)/2];
    Array[a, 55] (* Jean-François Alcover, Jan 26 2019 *)
  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    m=((i+j-1)*(i+j-2)+((-1)**max(i,j)+1)*i-((-1)**max(i,j)-1)*j)/2

Formula

a(n) = ((i+j-1)*(i+j-2)+((-1)^max(i,j)+1)*i-((-1)^max(i,j)-1)*j)/2, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor[(-1+sqrt(8*n-7))/2].

A194981 Interspersion fractally induced by A194979, a rectangular array, by antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 10, 8, 9, 11, 15, 12, 14, 13, 16, 21, 17, 20, 18, 19, 22, 28, 23, 27, 24, 25, 26, 29, 36, 30, 35, 31, 32, 34, 33, 37, 45, 38, 44, 39, 40, 43, 41, 42, 46, 55, 47, 54, 48, 49, 53, 50, 52, 51, 56, 66, 57, 65, 58, 59, 64, 60, 63, 61, 62, 67, 78, 68
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, A194981 is a permutation of the positive integers, with inverse A194982.

Examples

			Northwest corner:
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
13..18..24..31..39..48..58
		

Crossrefs

Programs

  • Mathematica
    r = Sqrt[3]; p[n_] := 1 + Floor[n/r]
    Table[p[n], {n, 1, 90}]  (* A194979 = 1+ A097337 *)
    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] (* A194980 *)
    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}]]  (* A194981 *)
    q[n_] := Position[w, n]; Flatten[Table[q[n],
    {n, 1, 80}]]  (* A194982 *)

A185180 Enumeration table T(n,k) by antidiagonals. The order of the list is symmetrical movement from center to edges diagonal.

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Dec 26 2012

Keywords

Comments

The natural numbers are grouped in chunks of 1, 2, 3, 4,... as (1), (2,3), (4,5,6), (7,8,9,10), etc and each group fills a diagonal in the table. The smallest number in a group is in A000124, the largest in A000217. Numbers in a group are placed on free spots as close as possible to the middle of the diagonal, given preference to the smaller row numbers in the table if there is a draw.
The resulting array is apparently a transposed version of A064789 (if this was also written as an array).
The order of the list table T(n,k):
if n is odd:
T (floor(n+1)/2,floor(n+1)/2), T(floor(n+1)/2-1,floor(n+1)/2+1), T(floor(n+1)/2+1,floor(n+1)/2-1),...T(1,n), T(n,1)
if n is even:
T(floor(n+1)/2-1,floor(n+1)/2+1), T(floor(n+1)/2+1,floor(n+1)/2-1),...T(1,n), T(n,1).
Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.

Examples

			The start of the sequence as table:
  1....2....5....9...14...20...27 ...
  3....4....7...12...18...25...33 ...
  6....8...11...16...23...31...40 ...
  10..13...17...22...29...38...48 ...
  15..19...24...30...37...46...57 ...
  21..26...32...39...47...56...67 ...
  28..34...41...49...58...68...79 ...
  ...
The start of the sequence as triangle array read by rows:
  1;
  2,   3;
  5,   4,  6;
  9,   7,  8, 10;
  14, 12, 11, 13, 15;
  20, 18, 16, 17, 19, 21;
  27, 25, 23, 22, 24, 26, 28;
. . .
Row number k (k > 1) of the triangle contains a permutation of the set of k numbers from (k^2-k+2)/2, (k^2-k+2)/2 + 1 ,...up to (k^2+k-2)/2 + 1, namely (k^2+k-2)/2, (k^2+k-2)/2 -2,...,(k^2-k+2)/2, (k^2-k+2)/2 + 2,..., (k^2+k-2)/2-1, (k^2+k-2)/2+1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{i, j, t}, i = n - t(t+1)/2; j = (t^2 + 3t + 4)/2 - n; t = Floor[(-1 + Sqrt[8n - 7])/2]; If[j <= i, (i(i+1) + (j-1)(j + 2i - 4))/2, (i(i+1) + (j-1)(j + 2i - 4))/2 + 2(j-i) - 1]];
    Array[a, 68] (* Jean-François Alcover, Nov 21 2018, from Python *)
  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    if j<=i:
       m=(i*(i+1) + (j-1)*(j+2*i-4))/2
    else:
       m=(i*(i+1) + (j-1)*(j+2*i-4))/2 +2*(j-i)-1

Formula

a(n) = (i*(i+1) + (j-1)*(j+2*i-4))/2, if j<=i, a(n)=(i*(i+1) + (j-1)*(j+2*i-4))/2 +2*(j-i)-1, if j>i, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor[(-1+sqrt(8*n-7))/2].

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

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, 6, 7, 4, 2, 1, 3, 5, 6, 8, 7, 4, 2, 1, 3, 5, 6, 8, 9, 7, 4, 2, 1, 3, 5, 6, 8, 10, 9, 7, 4, 2, 1, 3, 5, 6, 8, 10, 11, 9, 7, 4, 2, 1, 3, 5, 6, 8, 10, 12, 11, 9, 7, 4, 2, 1, 3, 5, 6, 8, 10, 12, 13, 11, 9, 7, 4, 2, 1, 3, 5
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(3)]) is A194979.

Crossrefs

Programs

  • Mathematica
    r = Sqrt[3]; p[n_] := 1 + Floor[n/r]
    Table[p[n], {n, 1, 90}]  (* A194979 = 1+ A097337 *)
    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] (* A194980 *)
    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}]]  (* A194981 *)
    q[n_] := Position[w, n]; Flatten[Table[q[n],
    {n, 1, 80}]]  (* A194982 *)

A057059 Let R(i,j) be the rectangle with antidiagonals 1; 2,3; 4,5,6; ... Define i(m) and j(m) by R(i(m),j(m)) = m. Then a(n) = j(A057027(n)).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jul 30 2000

Keywords

Comments

Since A057027 is a permutation of the natural numbers, every natural number occurs in this sequence infinitely many times.
Triangle of spiral permutations. In the Saclolo reference sigma_n(x) is called a spiral permutation. - Michael Somos, Apr 21 2011
Second inverse function (numbers of columns) for pairing function A194982. - Boris Putievskiy, Jan 10 2013
The triangle T(n, k) (see the formula by Michael Somos) has in row n a certain permutation of [1, 2, ..., n]. This permutation is useful for the proof of the identity Product_{k=1..n} f(sin(Pi*k/(2*n+1))) = Product_{m=1..n} f(sin(2*Pi*m/(2*n+1))) for any function f, n >= 1 (also for n = 0). The permutation of the arguments of f goes via m = T(n, k), and this is due to sin(Pi-x) = sin(x). Of course, one can replace the product by a sum in this identity. The product identity is used in a trivial variant of Eisenstein's proof of the quadratic reciprocity law. See the W. Lang Aug 28 2016 comment under A049310. - Wolfdieter Lang, Aug 28 2016
For the proof of the (slightly extended) conjecture stated in the formula section by L. Edson Jeffery see the W. Lang link. - Wolfdieter Lang, Sep 14 2016

Examples

			Formatted as a triangle T(n, k) (see Michael Somos' formula):
n, 2n+1\k 1 2  3 4  5 6  7 8  9 10 11 12 ..
1,   3:   1
2,   5:   2 1
3,   7:   3 1  2
4,   9:   4 1  3 2
5,  11:   5 1  4 2  3
6,  13:   6 1  5 2  4 3
7,  15:   7 1  6 2  5 3  4
8,  17:   8 1  7 2  6 3  5 4
9,  19:   9 1  8 2  7 3  6 4  5
10, 21:  10 1  9 2  8 3  7 4  6  5
11, 23:  11 1 10 2  9 3  8 4  7  5  6
12, 25:  12 1 11 2 10 3  9 4  8  5  7  6
... formatted by _Wolfdieter Lang_, Aug 28 2016
n=4: sin identity: sin(Pi*k/9) = sin(2*Pi*T(4, k)/9), for k = 1, ..., n. That is: sin(Pi*1/9) = sin(2*Pi*4/9) = sin(Pi*(1 - 8/9)), sin(Pi*3/9) = sin(2*Pi*3/9) = sin(Pi*(1 - 6/9)). For even k this is trivial. - _Wolfdieter Lang_, Aug 28 2016
		

Crossrefs

Cf. A057058, A194982; related to A141419.

Programs

  • Mathematica
    Table[If[OddQ@ k, n - (k - 1)/2, k/2], {n, 12}, {k, n}] // Flatten (* Michael De Vlieger, Aug 28 2016 *)
  • PARI
    {T(n, k) = if( k<1 || k>n, 0, if( k%2, n - (k - 1) / 2, k / 2))} /* Michael Somos, Apr 21 2011 */

Formula

T(n, k) = k / 2 if k is even, n - (k - 1) / 2 if k is odd where 0 < k <= n are integers. - Michael Somos, Apr 21 2011
(Conjecture) Define the Chebyshev polynomials of the second kind by U_0(t) = 1, U_1(t) = 2*t, and U_r(t) = 2*t*U_(r-1)(t) - U_(r-2)(t) (r>1). Then T(n,k) = Sum_{j=1..n} U_(k-1)(cos((2*j-1)*Pi/(2*n+1))), 1<=k<=n. - L. Edson Jeffery, Jan 09 2012 (See the Sep 14 2016 comment above.)
From Boris Putievskiy, Jan 10 2013: (Start)
a(n) = -(A004736(n)+(A002260(n)-1)/2)*((-1)^A002260(n)-1)/2+(A002260(n)/2)*((-1)^A002260(n)+1)/2.
a(n) = -(j+(i-1)/2)*((-1)^i-1)/2+(i/2)*((-1)^i+1)/2, where i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n, t = floor((-1+sqrt(8*n-7))/2). (End)

A057058 Let R(i,j) be the rectangle with antidiagonals 1; 2,3; 4,5,6; ...; each k is an R(i(k),j(k)) and a(n)=i(A057027(n)).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jul 30 2000

Keywords

Comments

Since A057027 is a permutation of the natural numbers, every natural number occurs infinitely many times in this sequence.
Consider the triangle TN := 1; 1, -2; 1, -3, 2; 1, -4, 2, -3; ... Antidiagonal sums give A129819(n+2). TN arises in studying the equation (E) dy/dx=Q(n,x,y)/P(n,x,y) involving saddle-points quantities, P and Q are bidimensional polynomials n=2,3,4.. . (E) leads also for instance to the one-dimension polynomials in A129326, A129587, A130679. - Paul Curtz, Aug 16 2008
First inverse function (numbers of rows) for pairing function A194982. - Boris Putievskiy, Jan 10 2013

Crossrefs

Formula

From Boris Putievskiy, Jan 10 2013: (Start)
a(n) = -((A002260(n)+1)/2)*((-1)^A002260(n)-1)/2+(A004736(n)+A002260(n)/2)*((-1)^A002260(n)+1)/2.
a(n) = -((i+1)/2)*((-1)^i-1)/2+(j+i/2)*((-1)^i+1)/2, where i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n, t = floor((-1+sqrt(8*n-7))/2). (End)

A360371 Triangle read by rows: lexicographically earliest sequence of distinct positive integers such that each column contains only multiples of the first number in that column. See example.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 9, 10, 8, 11, 12, 15, 16, 13, 14, 18, 20, 24, 26, 17, 19, 21, 25, 32, 39, 34, 22, 23, 27, 30, 40, 52, 51, 44, 28, 29, 33, 35, 48, 65, 68, 66, 56, 31, 36, 42, 45, 64, 78, 85, 88, 84, 62, 37, 38, 54, 50, 72, 91, 102, 110, 112, 93, 74, 41
Offset: 1

Views

Author

Samuel Harkness, Mar 17 2023

Keywords

Comments

A permutation of the natural numbers.
Among the first number of columns, are there more primes or composites? Of the first 500 columns, 296 are prime, 203 are composite (first column begins with 1).

Examples

			The start of the sequence as a triangular array read by rows:
   1;
   2,  3;
   4,  6,  5;
   7,  9, 10,  8;
  11, 12, 15, 16, 13;
  14, 18, 20, 24, 26, 17;
  19, 21, 25, 32, 39, 34, 22;
  23, 27, 30, 40, 52, 51, 44, 28;
  ...
Note that each column contains only multiples of the first number in the column.
For a(17), note that we are in the second column, so a(17) must be a positive multiple of 3. No numbers can be repeated, and we see that {3, 6, 9, 12, 15} have already been used, and 18 is the smallest unused positive multiple of 3. Therefore, a(17) = 18.
		

Crossrefs

Cf. A194982, A361251 (inverse).

Programs

  • MATLAB
    See Links section.
  • Maple
    b:= proc() false end:
    T:= proc(n, k) option remember; local j;
          if {n, k} = {1} then j:=1
        elif n=k then for j from T(n-1$2) while b(j) do od
        else for j from T(n-1, k) by T(k, k) while b(j) do od
          fi; b(j):=true; j
        end:
    seq(seq(T(n, k), k=1..n), n=1..12);  # Alois P. Heinz, Mar 19 2023
Showing 1-8 of 8 results.