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.

A283939 Interspersion of the signature sequence of sqrt(2).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Mar 19 2017

Keywords

Comments

Row n is the ordered sequence of numbers k such that A007336(k)=n. As a sequence, A283939 is a permutation of the positive integers. As an array, A283939 is the joint-rank array (defined at A182801) of the numbers {i+j*r}, for i>=1, j>=1, where r = sqrt(2). This is a transposable interspersion; i.e., every row intersperses all other rows, and every column intersperses all other columns.

Examples

			Northwest corner:
  1   3   6   11   17   25   34   44   56
  2   5   9   15   22   31   41   52   65
  4   8   13  20   28   38   49   61   75
  7   12  18  26   35   46   58   71   86
  10  16  23  32   42   54   67   81   97
  14  21  29  39   50   63   77   91   109
		

Crossrefs

Programs

  • Mathematica
    r = Sqrt[2]; z = 100;
    s[0] = 1; s[n_] := s[n] = s[n - 1] + 1 + Floor[n*r];
    u = Table[n + 1 + Sum[Floor[(n - k)/r], {k, 0, n}], {n, 0, z}] (* A022776, col 1 of A283939 *)
    v = Table[s[n], {n, 0, z}] (* A022775, row 1 of A283939*)
    w[i_, j_] := u[[i]] + v[[j]] + (i - 1)*(j - 1) - 1;
    Grid[Table[w[i, j], {i, 1, 10}, {j, 1, 10}]] (* A283939, array *)
    p = Flatten[Table[w[k, n - k + 1], {n, 1, 20}, {k, 1, n}]] (* A283939, sequence *)
  • PARI
    r = sqrt(2);
    z = 100;
    s(n) = if(n<1, 1, s(n - 1) + 1 + floor(n*r));
    p(n) = n + 1 + sum(k=0, n, floor((n - k)/r));
    u = v = vector(z + 1);
    for(n=1, 101, (v[n] = s(n - 1)));
    for(n=1, 101, (u[n] = p(n - 1)));
    w(i, j) = u[i] + v[j] + (i - 1) * (j - 1) - 1;
    tabl(nn) = {for(n=1, nn, for(k=1, n, print1(w(k, n - k + 1), ", "); );print(); ); };
    tabl(10) \\ Indranil Ghosh, Mar 21 2017
    
  • Python
    sqrt2 = 2 ** 0.5
    def s(n): return 1 if n<1 else s(n - 1) + 1 + int(n*sqrt2)
    def p(n): return n + 1 + sum([int((n - k)/sqrt2) for k in range(0, n+1)])
    v=[s(n) for n in range(0, 101)]
    u=[p(n) for n in range(0, 101)]
    def w(i,j): return u[i - 1] + v[j - 1] + (i - 1) * (j - 1) - 1
    for n in range(1, 11):
        print ([w(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, Mar 21 2017

A293052 Rectangular array by antidiagonals: T(n,m) = rank of n*sqrt(3)+m when all the numbers k*sqrt(3)+h, for k >= 1, h >= 0, are jointly ranked.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 6, 8, 10, 13, 9, 11, 14, 17, 20, 12, 15, 18, 22, 25, 29, 16, 19, 23, 27, 31, 35, 40, 21, 24, 28, 33, 37, 42, 47, 53, 26, 30, 34, 39, 44, 49, 55, 61, 67, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 38, 43, 48, 54, 59, 65, 72, 79, 86, 93, 101, 45
Offset: 1

Views

Author

Clark Kimberling, Oct 06 2017

Keywords

Comments

Every positive integer occurs exactly once, so that as a sequence, this is a permutation of the positive integers. As an array, this is the interspersion of sqrt(1/3); see A283962.

Examples

			Northwest corner:
1    2    4    6    9    12   16
3    5    8    11   15   19   24
7    10   14   18   23   28   34
13   17   22   27   33   39   46
20   25   31   37   44   51   59
29   35   42   49   57   65   74
40   47   55   63   72   81   91
53   61   70   79   89   99   110
67   76   86   96   107  118  130
The numbers k*r+h, approximately:
(for k=1):   1.732   2.732   3.732 ...
(for k=2):   3.464   4.464   5.464 ...
(for k=3):   5.196   6.196   7.196 ...
Replacing each k*r+h by its rank gives
1   2   4
3   5   8
7   10  14
		

Crossrefs

Cf. A283962.

Programs

  • Mathematica
    r = Sqrt[3]; z = 12;
    t[n_, m_] := Sum[Floor[1 + m + (n - k) r], {k, 1, n + Floor[m/r]}];
    u = Table[t[n, m], {n, 1, z}, {m, 0, z}]
    Grid[u] (* A293052 array *)
    Table[t[n - k + 1, k - 1], {n, 1, z}, {k, n, 1, -1}] // Flatten  (* A293052 sequence *)

Formula

T(n,m) = Sum_{k=1...n + [m/r]} m+1+[(n-k)r], where r = sqrt(3), [ ]=floor.

A293054 Rectangular array by antidiagonals: T(n,m) = rank of n*sqrt(5)+m when all the numbers k*sqrt(5)+h, for k >= 1, h >= 0, are jointly ranked.

Original entry on oeis.org

1, 2, 4, 3, 6, 9, 5, 8, 12, 16, 7, 11, 15, 20, 25, 10, 14, 19, 24, 30, 37, 13, 18, 23, 29, 35, 43, 51, 17, 22, 28, 34, 41, 49, 58, 67, 21, 27, 33, 40, 47, 56, 65, 75, 85, 26, 32, 39, 46, 54, 63, 73, 83, 94, 106, 31, 38, 45, 53, 61, 71, 81, 92, 103, 116, 129
Offset: 1

Views

Author

Clark Kimberling, Oct 06 2017

Keywords

Comments

Every positive integer occurs exactly once, so that as a sequence, this is a permutation of the positive integers. As an array, this is the interspersion of sqrt(1/5); see A283962.

Examples

			Northwest corner:
1    2    3    5    7    10   13
4    6    8    11   14   18   22
9    12   15   19   23   28   33
16   20   24   29   34   40   46
25   30   35   41   47   54   61
37   43   49   56   63   71   79
51   58   65   73   81   90   99
67   75   83   92   101  111  121
85   94   103  113  123  134  145
The numbers k*r+h, approximately:
(for k=1):   2.236   3.236   3.236 ...
(for k=2):   4.472   5.472   6.472 ...
(for k=3):   6.708   7.708   8.708 ...
Replacing each k*r+h by its rank gives
1   2   3
4   6   8
9   12  15
		

Crossrefs

Cf. A283962.

Programs

  • Mathematica
    r = Sqrt[5]; z = 12;
    t[n_, m_] := Sum[Floor[1 + m + (n - k) r], {k, 1, n + Floor[m/r]}];
    u = Table[t[n, m], {n, 1, z}, {m, 0, z}]
    Grid[u] (* A293054 array *)
    Table[t[n - k + 1, k - 1], {n, 1, z}, {k, n, 1, -1}] // Flatten  (* A293054 sequence *)

Formula

T(n,m) = Sum_{k=1...n + [m/r]} m+1+[(n-k)r], where r = sqrt(5), [ ]=floor.

A293056 Rectangular array by antidiagonals: T(n,m) = rank of n*log(2)+m when all the numbers k*log(2)+h, for k >= 1, h >= 0, are jointly ranked.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Oct 06 2017

Keywords

Comments

Every positive integer occurs exactly once, so that as a sequence, this is a permutation of the positive integers. As an array, this is the interspersion of 1/log(2); see A283962.

Examples

			Northwest corner:
1      3      6      11     17     25     34
2      5      9      15     22     31     41
4      8      13     20     28     38     49
7      12     18     26     35     46     58
10     16     23     32     42     54     67
14     21     29     39     50     63     77
19     27     36     47     59     73     88
24     33     43     55     68     83     99
30     40     51     64     78     94     111
The numbers k*r+h, approximately:
(for k=1):   0.693   1.693   2.693 ...
(for k=2):   1.386   2.386   3.386 ...
(for k=3):   2.079   3.079   4.079 ...
Replacing each k*r+h by its rank gives
1    3    6
2    5    9
4    8    13
		

Crossrefs

Cf. A283962.

Programs

  • Mathematica
    r = Log[2]; z = 12;
    t[n_, m_] := Sum[Floor[1 + m + (n - k) r], {k, 1, n + Floor[m/r]}];
    u = Table[t[n, m], {n, 1, z}, {m, 0, z}]
    Grid[u] (* A293056 array *)
    Table[t[n - k + 1, k - 1], {n, 1, z}, {k, n, 1, -1}] // Flatten  (* A293056 sequence *)

Formula

T(n,m) = Sum_{k=1...n + [m/r]} m+1+[(n-k)r], where r = log(2) and [ ]=floor.
Showing 1-4 of 4 results.