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.

A191655 Dispersion of (2,5,8,11,14,17,...), by antidiagonals.

Original entry on oeis.org

1, 3, 2, 6, 4, 5, 10, 7, 9, 8, 16, 12, 15, 13, 11, 25, 19, 24, 21, 18, 14, 39, 30, 37, 33, 28, 22, 17, 60, 46, 57, 51, 43, 34, 27, 20, 91, 70, 87, 78, 66, 52, 42, 31, 23, 138, 106, 132, 118, 100, 79, 64, 48, 36, 26, 208, 160, 199, 178, 151, 120, 97, 73, 55
Offset: 1

Views

Author

Clark Kimberling, Jun 10 2011

Keywords

Comments

Row 1: A152009.
For a background discussion of dispersions, see A191426.
...
Each of the sequences (3n, n>0), (3n+1, n>0), (3n+2, n>=0), generates a dispersion. Each complement (beginning with its first term >1) also generates a dispersion. The six sequences and dispersions are listed here:
...
A191449=dispersion of A008583 (0 mod 3)
A191451=dispersion of A016777 (1 mod 3)
A191450=dispersion of A016789 (2 mod 3)
A191656=dispersion of A001651 (1 or 2 mod 3)
A083044=dispersion of A007494 (0 or 2 mod 3)
A191655=dispersion of A032766 (0 or 1 mod 3)
...
EXCEPT for at most 2 initial terms (so that column 1 always starts with 1):
A191449 has 1st col A001651, all else A008583
A191451 has 1st col A007494, all else A016777
A191450 has 1st col A032766, all else A016789
A191656 has 1st col A008583, all else A001651
A083044 has 1st col A016777, all else A083044
A191655 has 1st col A016789, all else A032766
...
There is a formula for sequences of the type "(a or b mod m)", (as in the Mathematica program below):
If f(n)=(n mod 2), then (a,b,a,b,a,b,...) is given by
a*f(n+1)+b*f(n), so that "(a or b mod m)" is given by
a*f(n+1)+b*f(n)+m*floor((n-1)/2)), for n>=1.

Examples

			Northwest corner:
1...3...6....10...16
2...4...7....12...19
5...9...15...24...37
8...13..21...33...51
11..18..28...43...66
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of the increasing sequence f[n] *)
    r = 40; r1 = 12;  c = 40; c1 = 12;
    a = 3; b = 4; m[n_] := If[Mod[n, 2] == 0, 1, 0];
    f[n_] := a*m[n + 1] + b*m[n] + 3*Floor[(n - 1)/2]
    Table[f[n], {n, 1, 30}]  (* A032766: (3+5k,4+5k, k>=0) *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i,1,10}, {j,1,10}]]          (* A191655 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]]   (* A191655 sequence *)

A191450 Dispersion of (3*n-1), read by antidiagonals.

Original entry on oeis.org

1, 2, 3, 5, 8, 4, 14, 23, 11, 6, 41, 68, 32, 17, 7, 122, 203, 95, 50, 20, 9, 365, 608, 284, 149, 59, 26, 10, 1094, 1823, 851, 446, 176, 77, 29, 12, 3281, 5468, 2552, 1337, 527, 230, 86, 35, 13, 9842, 16403, 7655, 4010, 1580, 689, 257, 104, 38, 15, 29525
Offset: 1

Views

Author

Clark Kimberling, Jun 05 2011

Keywords

Comments

Suppose that s is an increasing sequence of positive integers, that the complement t of s is infinite, and that t(1)=1. The dispersion of s is the array D whose n-th row is (t(n), s(t(n)), s(s(t(n))), s(s(s(t(n)))), ...). Every positive integer occurs exactly once in D, so that, as a sequence, D is a permutation of the positive integers. The sequence u given by u(n) = {index of the row of D that contains n} is a fractal sequence. In this case s(n) = A016789(n-1), t(n) = A032766(n) [from term A032766(1) onward] and u(n) = A253887(n). [Author's original comment edited by Antti Karttunen, Jan 24 2015]
For other examples of such sequences, please see the Crossrefs section.

Examples

			The northwest corner of the square array:
  1,  2,  5,  14,  41,  122,  365,  1094,  3281,   9842,  29525,   88574, ...
  3,  8, 23,  68, 203,  608, 1823,  5468, 16403,  49208, 147623,  442868, ...
  4, 11, 32,  95, 284,  851, 2552,  7655, 22964,  68891, 206672,  620015, ...
  6, 17, 50, 149, 446, 1337, 4010, 12029, 36086, 108257, 324770,  974309, ...
  7, 20, 59, 176, 527, 1580, 4739, 14216, 42647, 127940, 383819, 1151456, ...
  9, 26, 77, 230, 689, 2066, 6197, 18590, 55769, 167306, 501917, 1505750, ...
  etc.
The leftmost column is A032766, and each successive column to the right of it is obtained by multiplying the left neighbor on that row by three and subtracting one, thus the second column is (3*1)-1, (3*3)-1, (3*4)-1, (3*6)-1, (3*7)-1, (3*9)-1, ... = 2, 8, 11, 17, 20, 26, ...
		

Crossrefs

Inverse: A254047.
Transpose: A254051.
Column 1: A032766.
Cf. A007051, A057198, A199109, A199113 (rows 1-4).
Cf. A253887 (row index of n in this array) & A254046 (column index, see also A253786).
Examples of other arrays of dispersions: A114537, A035513, A035506, A191449, A191426-A191455.

Programs

  • Maple
    A191450 := proc(r, c)
        option remember;
        if c = 1 then
            A032766(r) ;
        else
            A016789(procname(r, c-1)-1) ;
        end if;
    end proc: # R. J. Mathar, Jan 25 2015
  • Mathematica
    (* Program generates the dispersion array T of increasing sequence f[n] *)
    r=40; r1=12; c=40; c1=12;
    f[n_] :=3n-1 (* complement of column 1 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]]
    (* A191450 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191450 sequence *)
    (* Program by Peter J. C. Moses, Jun 01 2011 *)
  • PARI
    a(n,k)=3^(n-1)*(k*3\2*2-1)\2+1 \\ =3^(n-1)*(k*3\2-1/2)+1/2, but 30% faster. - M. F. Hasler, Jan 20 2015
    
  • Scheme
    (define (A191450 n) (A191450bi (A002260 n) (A004736 n)))
    (define (A191450bi row col) (if (= 1 col) (A032766 row) (A016789 (- (A191450bi row (- col 1)) 1))))
    (define (A191450bi row col) (/ (+ 3 (* (A000244 col) (- (* 2 (A032766 row)) 1))) 6)) ;; Another implementation based on L. Edson Jeffery's direct formula.
    ;; Antti Karttunen, Jan 21 2015

Formula

Conjecture: A(n,k) = (3 + (2*A032766(n) - 1)*A000244(k))/6. - L. Edson Jeffery, with slight changes by Antti Karttunen, Jan 21 2015
a(n) = A254051(A038722(n)). [When both this and transposed array A254051 are interpreted as one-dimensional sequences.] - Antti Karttunen, Jan 22 2015

Extensions

Example corrected and description clarified by Antti Karttunen, Jan 24 2015

A191452 Dispersion of (4,8,12,16,...), by antidiagonals.

Original entry on oeis.org

1, 4, 2, 16, 8, 3, 64, 32, 12, 5, 256, 128, 48, 20, 6, 1024, 512, 192, 80, 24, 7, 4096, 2048, 768, 320, 96, 28, 9, 16384, 8192, 3072, 1280, 384, 112, 36, 10, 65536, 32768, 12288, 5120, 1536, 448, 144, 40, 11, 262144, 131072, 49152, 20480, 6144, 1792, 576
Offset: 1

Views

Author

Clark Kimberling, Jun 05 2011

Keywords

Comments

Background discussion: Suppose that s is an increasing sequence of positive integers, that the complement t of s is infinite, and that t(1)=1. The dispersion of s is the array D whose n-th row is (t(n), s(t(n)), s(s(t(n))), s(s(s(t(n)))), ...). Every positive integer occurs exactly once in D, so that, as a sequence, D is a permutation of the positive integers. The sequence u given by u(n)=(number of the row of D that contains n) is a fractal sequence. Examples:
(1) s=A000040 (the primes), D=A114537, u=A114538.
(2) s=A022343 (without initial 0), D=A035513 (Wythoff array), u=A003603.
(3) s=A007067, D=A035506 (Stolarsky array), u=A133299.
More recent examples of dispersions: A191426-A191455.

Examples

			Northwest corner:
  1...4....16...64....256
  2...8....32...128...512
  3...12...48...192...768
  5...20...80...320...1280
  6...24...96...384...1536
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of increasing sequence f[n] *)
    r=40; r1=12; c=40; c1=12;
    f[n_] :=4n  (* complement of column 1 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]]
    (* A191452 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191452 sequence *)
    (* Program by Peter J. C. Moses, Jun 01 2011 *)

A254105 Dispersion of A055938; starting from its complementary sequence A005187 as the first column of square array A(row,col), read by antidiagonals A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

1, 2, 3, 5, 6, 4, 12, 13, 9, 7, 27, 28, 20, 14, 8, 58, 59, 43, 29, 17, 10, 121, 122, 90, 60, 36, 21, 11, 248, 249, 185, 123, 75, 44, 24, 15, 503, 504, 376, 250, 154, 91, 51, 30, 16, 1014, 1015, 759, 505, 313, 186, 106, 61, 33, 18, 2037, 2038, 1526, 1016, 632, 377, 217, 124, 68, 37, 19, 4084, 4085, 3061, 2039, 1271, 760, 440, 251, 139, 76, 40, 22
Offset: 1

Views

Author

Antti Karttunen, Jan 26 2015

Keywords

Comments

This sequence is one instance of Clark Kimberling's generic dispersion arrays. Paraphrasing his explanation in A191450, mutatis mutandis, we have the following definition:
Suppose that s is an increasing sequence of positive integers, that the complement t of s is infinite, and that t(1)=1. The dispersion of s is the array D whose n-th row is (t(n), s(t(n)), s(s(t(n))), s(s(s(t(n)))), ...). Every positive integer occurs exactly once in D, so that, as a sequence, D is a permutation of the positive integers. The sequence u given by u(n) = {index of the row of D that contains n} is a fractal sequence. In this case s(n) = A055938(n), t(n) = A005187(n) [from term A005187(1) onward] and u(n) = A254112(n).
For other examples of such sequences, see the Crossrefs section. For a general introduction, please follow the Kimberling references.
The main diagonal: 1, 6, 20, 60, 154, 377, 887, 2040, 4598, 10229, 22515, 49139, ...

Examples

			The top left corner of the array:
   1,  2,  5,  12,  27,  58,  121,  248,  503,  1014,  2037,  4084
   3,  6, 13,  28,  59, 122,  249,  504, 1015,  2038,  4085,  8180
   4,  9, 20,  43,  90, 185,  376,  759, 1526,  3061,  6132, 12275
   7, 14, 29,  60, 123, 250,  505, 1016, 2039,  4086,  8181, 16372
   8, 17, 36,  75, 154, 313,  632, 1271, 2550,  5109, 10228, 20467
  10, 21, 44,  91, 186, 377,  760, 1527, 3062,  6133, 12276, 24563
  11, 24, 51, 106, 217, 440,  887, 1782, 3573,  7156, 14323, 28658
  15, 30, 61, 124, 251, 506, 1017, 2040, 4087,  8182, 16373, 32756
  16, 33, 68, 139, 282, 569, 1144, 2295, 4598,  9205, 18420, 36851
  18, 37, 76, 155, 314, 633, 1272, 2551, 5110, 10229, 20468, 40947
etc.
		

Crossrefs

Inverse: A254106.
Transpose: A254107.
Column 1: A005187.
Cf. also A000325, A095768, A123720 (Seem to be rows 1 - 3, the last one from its second term onward.)
Columnd index of n: A254111, Row index: A254112.
Examples of other arrays of dispersions: A114537, A035513, A035506, A191449, A191450, A191426-A191455.

Programs

Formula

If col = 1, then A(row,col) = A005187(row), otherwise A(row,col) = A055938(A(row,col-1)).

A191451 Dispersion of (3*n-2), for n>=2, by antidiagonals.

Original entry on oeis.org

1, 4, 2, 13, 7, 3, 40, 22, 10, 5, 121, 67, 31, 16, 6, 364, 202, 94, 49, 19, 8, 1093, 607, 283, 148, 58, 25, 9, 3280, 1822, 850, 445, 175, 76, 28, 11, 9841, 5467, 2551, 1336, 526, 229, 85, 34, 12, 29524, 16402, 7654, 4009, 1579, 688, 256, 103, 37, 14, 88573
Offset: 1

Views

Author

Clark Kimberling, Jun 05 2011

Keywords

Comments

Row 1: A003462
Row 2: A060816
Background discussion: Suppose that s is an increasing sequence of positive integers, that the complement t of s is infinite, and that t(1)=1. The dispersion of s is the array D whose n-th row is (t(n), s(t(n)), s(s(t(n))), s(s(s(t(n)))), ...). Every positive integer occurs exactly once in D, so that, as a sequence, D is a permutation of the positive integers. The sequence u given by u(n)=(number of the row of D that contains n) is a fractal sequence. Examples:
(1) s=A000040 (the primes), D=A114537, u=A114538.
(2) s=A022343 (without initial 0), D=A035513 (Wythoff array), u=A003603.
(3) s=A007067, D=A035506 (Stolarsky array), u=A133299.
More recent examples of dispersions: A191426-A191455.

Examples

			Northwest corner:
  1...4....13...40...121
  2...7....22...67...202
  3...10...31...94...283
  5...16...49...148..445
  6...19...58...175..526
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of increasing sequence f[n] *)
    r=40; r1=12; c=40; c1=12;
    f[n_] :=3n+1 (* complement of column 1 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]]
    (* A191451 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191451 sequence *)
    (* Program by Peter J. C. Moses, Jun 01 2011 *)

A191656 Dispersion of (2,4,5,7,8,10,...), by antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 9, 11, 13, 16, 14, 12, 17, 20, 25, 22, 19, 15, 26, 31, 38, 34, 29, 23, 18, 40, 47, 58, 52, 44, 35, 28, 21, 61, 71, 88, 79, 67, 53, 43, 32, 24, 92, 107, 133, 119, 101, 80, 65, 49, 37, 27, 139, 161, 200, 179, 152, 121, 98, 74, 56
Offset: 1

Views

Author

Clark Kimberling, Jun 10 2011

Keywords

Comments

Row 1: A006999.
For a background discussion of dispersions, see A191426.
...
Each of the sequences (3n, n>0), (3n+1, n>0), (3n+2, n>=0), generates a dispersion. Each complement (beginning with its first term >1) also generates a dispersion. The six sequences and dispersions are listed here:
...
A191449=dispersion of A008583 (0 mod 3)
A191451=dispersion of A016777 (1 mod 3)
A191450=dispersion of A016789 (2 mod 3)
A191656=dispersion of A001651 (1 or 2 mod 3)
A083044=dispersion of A007494 (0 or 2 mod 3)
A191655=dispersion of A032766 (0 or 1 mod 3)
...
EXCEPT for at most 2 initial terms (so that column 1 always starts with 1):
A191449 has 1st col A001651, all else A008583
A191451 has 1st col A007494, all else A016777
A191450 has 1st col A032766, all else A016789
A191656 has 1st col A008583, all else A001651
A083044 has 1st col A016777, all else A083044
A191655 has 1st col A016789, all else A032766
...
There is a formula for sequences of the type "(a or b mod m)", (as in the Mathematica program below):
If f(n)=(n mod 2), then (a,b,a,b,a,b,...) is given by
a*f(n+1)+b*f(n), so that "(a or b mod m)" is given by
a*f(n+1)+b*f(n)+m*floor((n-1)/2)), for n>=1.

Examples

			Northwest corner:
1...2....4....7....11
3...5....8....13...20
6...10...16...25...38
9...14...22...34...52
12..19...29...44...67
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of the increasing sequence f[n] *)
    r = 40; r1 = 12;  c = 40; c1 = 12;
    a = 2; b = 4; m[n_] := If[Mod[n, 2] == 0, 1, 0];
    f[n_] := a*m[n + 1] + b*m[n] + 3*Floor[(n - 1)/2]
    Table[f[n], {n, 1, 30}]  (* A001651: (2+5k,4+5k, k>=0) *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i,1,10}, {j,1,10}]]          (* A191656 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]]   (* A191656 sequence *)
Showing 1-6 of 6 results.