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.

Previous Showing 21-30 of 32 results. Next

A191666 Dispersion of A042964 (numbers congruent to 2 or 3 mod 4), by antidiagonals.

Original entry on oeis.org

1, 2, 4, 3, 7, 5, 6, 14, 10, 8, 11, 27, 19, 15, 9, 22, 54, 38, 30, 18, 12, 43, 107, 75, 59, 35, 23, 13, 86, 214, 150, 118, 70, 46, 26, 16, 171, 427, 299, 235, 139, 91, 51, 31, 17, 342, 854, 598, 470, 278, 182, 102, 62, 34, 20, 683, 1707, 1195, 939, 555, 363
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2011

Keywords

Comments

Row 1: A005578
Row 2: A160113
For a background discussion of dispersions, see A191426.
...
Each of the sequences (4n, n>2), (4n+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:
...
A191663=dispersion of A042948 (0 or 1 mod 4 and >1)
A054582=dispersion of A005843 (0 or 2 mod 4 and >1; evens)
A191664=dispersion of A014601 (0 or 3 mod 4 and >1)
A191665=dispersion of A042963 (1 or 2 mod 4 and >1)
A191448=dispersion of A005408 (1 or 3 mod 4 and >1, odds)
A191666=dispersion of A042964 (2 or 3 mod 4)
...
EXCEPT for at most 2 initial terms (so that column 1 always starts with 1):
A191663 has 1st col A042964, all else A042948
A054582 has 1st col A005408, all else A005843
A191664 has 1st col A042963, all else A014601
A191665 has 1st col A014601, all else A042963
A191448 has 1st col A005843, all else A005408
A191666 has 1st col A042948, all else A042964
...
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...3....6...11
4...7...14....27...54
5...10...19...38...75
8...15..30...59...118
8...18..35...70...139
		

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 = 3; m[n_] := If[Mod[n, 2] == 0, 1, 0];
    f[n_] := a*m[n + 1] + b*m[n] + 4*Floor[(n - 1)/2]
    Table[f[n], {n, 1, 30}]  (* A042964: (2+4k,3+4k) *)
    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}]] (* A191666 *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191666  *)

A241957 Rectangular array A read by upward antidiagonals in which the entry in row n and column k is defined by A(n,k) = 2^n*(2*k - 1) - 1, n,k >= 1.

Original entry on oeis.org

1, 3, 5, 7, 11, 9, 15, 23, 19, 13, 31, 47, 39, 27, 17, 63, 95, 79, 55, 35, 21, 127, 191, 159, 111, 71, 43, 25, 255, 383, 319, 223, 143, 87, 51, 29, 511, 767, 639, 447, 287, 175, 103, 59, 33, 1023, 1535, 1279, 895, 575, 351, 207, 119, 67, 37
Offset: 1

Views

Author

L. Edson Jeffery, Aug 09 2014

Keywords

Comments

The sequence is a permutation of the odd natural numbers, since A(n,k) = 2*A054582(n-1,k-1) - 1 and A054582 is a permutation of the natural numbers.
For j a natural number, 2*j - 1 appears in row A001511(j) of A.
This is the square array A075300 with the first row omitted. - Peter Bala, Feb 07 2017

Examples

			Array begins:
.      1     5     9    13    17     21     25     29     33     37
.      3    11    19    27    35     43     51     59     67     75
.      7    23    39    55    71     87    103    119    135    151
.     15    47    79   111   143    175    207    239    271    303
.     31    95   159   223   287    351    415    479    543    607
.     63   191   319   447   575    703    831    959   1087   1215
.    127   383   639   895  1151   1407   1663   1919   2175   2431
.    255   767  1279  1791  2303   2815   3327   3839   4351   4863
.    511  1535  2559  3583  4607   5631   6655   7679   8703   9727
.   1023  3071  5119  7167  9215  11263  13311  15359  17407  19455
		

Crossrefs

Cf. A016813, A017101 (rows 1 and 2).
Cf. A000225, A083329, A153894, A086224, A052996, etc. (columns 1-5).
Cf. A005408 (odd natural numbers), A054582.
Cf. A075300.

Programs

  • Mathematica
    (* Array: *)
    Grid[Table[2^n*(2*k - 1) - 1, {n, 10}, {k, 10}]]
    (* Array antidiagonals flattened: *)
    Flatten[Table[2^(n - k + 1)*(2*k - 1) - 1, {n, 10}, {k, n}]]

Formula

A(n,k) = 2*A054582(n-1,k-1) - 1.

A182828 Array of the numbers (3*i+1)*3^j, i>=0, j>=0, read by antidiagonals.

Original entry on oeis.org

1, 3, 4, 9, 12, 7, 27, 36, 21, 10, 81, 108, 63, 30, 13, 243, 324, 189, 90, 39, 16, 729, 972, 567, 270, 117, 48, 19, 2187, 2916, 1701, 810, 351, 144, 57, 22, 6561, 8748, 5103, 2430, 1053, 432, 171, 66, 25, 19683, 26244, 15309, 7290, 3159
Offset: 1

Views

Author

Clark Kimberling, Dec 06 2010

Keywords

Examples

			Northwest corner:
1....3....9...27...
4...12...36..108...
7...21...63..189...
10..30...90..270...
		

Crossrefs

Cf. A000244 (row 1), A016777 (column 1).
Terms in ascending order: A026225.

Formula

T(i,j) = (3*i+1)*3^j, i>=0, j>=0.

A191362 Number of the diagonal of the dispersion of the even positive integers that contains n.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 31 2011

Keywords

Comments

Every integer occurs in A191362 (infinitely many times).
Represent the array as {f(i,j): i>=1, j>=1}. Then for m>=0, (diagonal #m) is the sequence (f(i,i+m)), i>=1;
for m<0, (diagonal #m) is the sequence (f(i+m,i)), i>=1.

Crossrefs

Programs

  • Mathematica
    f[i_, j_] := (2 j - 1)*2^(i - 1);
    t=TableForm[Table[f[i, j], {i, 1, 10}, {j, 1, 8}]]
    (* t=A054582, the dispersion of the even positive integers *)
    a = Flatten[Table[If[f[i, j] == n, j - i, {}], {n, 100}, {i, 10}, {j, 80}]]
    (* a=A191362 *)

A257797 Permutation of natural numbers: a(1) = 1, a(triangular(n)) = 1+(2*a(n-1)), a(nontriangular(n)) = 2*n, where triangular = A000217, nontriangular = A014132.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 8, 12, 10, 7, 16, 24, 20, 14, 9, 32, 48, 40, 28, 18, 13, 64, 96, 80, 56, 36, 26, 11, 128, 192, 160, 112, 72, 52, 22, 17, 256, 384, 320, 224, 144, 104, 44, 34, 25, 512, 768, 640, 448, 288, 208, 88, 68, 50, 21, 1024, 1536, 1280, 896, 576, 416, 176, 136, 100, 42, 15
Offset: 1

Views

Author

Antti Karttunen, May 18 2015

Keywords

Crossrefs

Inverse: A257798.
Cf. also a similar permutation A220347 from which this differs for the first time at n=15, where a(15) = 9, while A220347(15) = 11.
a(n) differs from A054582(n-1) for the first time at n=21, where a(21) = 13, while A054582(20) = 11.

Formula

a(1) = 1; for n > 1: if A010054(n) = 1 [when n is triangular], then a(n) = 1+(2*a(A002024(n)-1)), otherwise a(n) = 2*a(A083920(n)).

A257791 Rectangular array A read by upward antidiagonals in which the entry in row n and column k is defined by A(n,k) = 2^(n+1)*(2*k - 1), n,k >= 1.

Original entry on oeis.org

4, 8, 12, 16, 24, 20, 32, 48, 40, 28, 64, 96, 80, 56, 36, 128, 192, 160, 112, 72, 44, 256, 384, 320, 224, 144, 88, 52, 512, 768, 640, 448, 288, 176, 104, 60, 1024, 1536, 1280, 896, 576, 352, 208, 120, 68, 2048, 3072, 2560, 1792, 1152, 704, 416, 240, 136, 76
Offset: 1

Views

Author

L. Edson Jeffery, May 08 2015

Keywords

Comments

Lemma: The sequence is a permutation of A008586\{0} = {4*m : m = 1,2,...}.
Proof: Write A(n,k)/4 = A054582(n-1,k-1). The sequence A054582 is known to be a permutation of the natural numbers, and the result follows. QED

Examples

			Array A begins:
.       4    12     20     28     36     44     52     60     68     76
.       8    24     40     56     72     88    104    120    136    152
.      16    48     80    112    144    176    208    240    272    304
.      32    96    160    224    288    352    416    480    544    608
.      64   192    320    448    576    704    832    960   1088   1216
.     128   384    640    896   1152   1408   1664   1920   2176   2432
.     256   768   1280   1792   2304   2816   3328   3840   4352   4864
.     512  1536   2560   3584   4608   5632   6656   7680   8704   9728
.    1024  3072   5120   7168   9216  11264  13312  15360  17408  19456
.    2048  6144  10240  14336  18432  22528  26624  30720  34816  38912
		

Crossrefs

Cf. A000079 (powers of 2), A005408 (odd numbers), A008586 (multiples of 4), A014480, A054582.
Cf. A257499.

Programs

  • Mathematica
    (* Array: *)
    A257791[n_, k_] := 2^(n + 1)*(2*k - 1); Grid[Table[A257791[n, k], {n, 10}, {k, 10}]]
    (* Array antidiagonals flattened: *)
    Flatten[Table[2^(n - k + 2)*(2*k - 1), {n, 10}, {k, n}]]

Formula

A(n,n) = 4*A014480(n-1).

A345254 Dispersion of A004754, a rectangular array T(n,k) read by downward antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 7, 16, 17, 18, 11, 12, 32, 33, 34, 19, 20, 13, 64, 65, 66, 35, 36, 21, 14, 128, 129, 130, 67, 68, 37, 22, 15, 256, 257, 258, 131, 132, 69, 38, 23, 24, 512, 513, 514, 259, 260, 133, 70, 39, 40, 25, 1024, 1025, 1026, 515, 516, 261, 134
Offset: 1

Views

Author

J. Parker Shectman, Jun 12 2021

Keywords

Comments

As a sequence, {a(n)} permutes the positive integers. As an array, {T(n,k)} is an interspersion-dispersion or I-D array (refer to Kimberling, 1st linked reference).
The top row of {T(n,k)} is A000079 or powers of two = 1, 2, 4, 8, 16, ....
Except for the leftmost element "1" of the top row, rows of T(n,k) indexed n = 0, 1, 2, ..., consist entirely of even numbers (A005843) for n even and entirely of odd numbers (A005408) for n odd.
The left column (k = 1) of {T(n,k)} comprises a "1" for the top row (n = 0) and A004755(n) = n + 2^(floor(log_2(n)) + 1), for rows n = 1, 2, 3, ....
For rows indexed n = 0, 1, 2, ..., and columns indexed k = 1, 2, 3, ..., T(n,k) is given by T(0,k) = L^(k - 1)(1) and T(n,k) = L^(k - 1) R(n) for n = 1, 2, 3, ..., the image of n under a composition of branching functions L(n) = A004754(n) = n + 2^floor(log_2(n)) and R(n) = A004755(n) = n + 2^(floor(log_2(n)) + 1) (cf. generating tree A059893 and 2nd linked reference).
(Duality with array A054582): Consider A059893 and A000027 as labeled binary trees arranging the positive integers. In latter tree, node labels equal node positions, thus following their natural order. Rows of {T(n,k)} are the labels along maximal straight paths that always branch left in the former tree, while rows of (transposed) array A054582 are the labels along maximal straight paths that always branch left in the latter tree.
Column k of {T(n,k)} comprises the (sorted) labels in the k-th right clade of latter tree, while column k of (transposed) A054582 comprises the (sorted) labels in the k-th right clade of the former tree. This makes the arrays {T(n,k)} and (transposed) A054582 "blade-duals," blade being a contraction of branch-clade ('right clades' explained under tree A345253 and in 2nd link).
Write the positive integers in natural order as a (left-justified) "tetrangle" or "irregular triangle" tableau with 2^t entries on each row t, for t=1, 2, 3, .... Then, columns of the tableau equal rows of {T(n,k)} (2nd link):
1,
2, 3,
4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
...
Analogous to A345252, its right-justified tableau of the positive integers in cohorts with lengths the Fibonacci numbers replaced by the above left-justified tableau with powers of two as lengths of the cohorts.
(Mirror duality): A "mirror dual" I-D array or "inverse I-D array" (see Kimberling, 1st linked reference) is obtained by substituting the left-justified tableau by a right-justified tableau and following the identical procedure, or equivalently by mirroring the tree A059893 cited above, i.e., taking maximal straight paths that always branch right in the tree A059893. With two types of duality then, {T(n,k)} forms a quartet of I-D arrays together with its mirror dual, its blade dual (transposed) A054582 and mirror dual A191448 of the latter.
(Para-sequences): Sequences of row and column indices (see Conway-Sloane correspondence under A019586, citing Kimberling). For rows indexed n = 0, 1, 2, ..., and columns indexed k = 1, 2, 3, ..., the row index n of positive integer T(n,k) is A053645(T) and the column index k of positive integer T(n,k) is A065120(T).

Examples

			Northwest corner of {T(n,k)}:
       k=1   k=2    k=3     k=4      k=5       k=6
  n=0:   1,    2,     4,      8,      16,       32, ...
  n=1:   3,    5,     9,     17,      33,       65, ...
  n=2:   6,   10,    18,     34,      66,      130, ...
  n=3:   7,   11,    19,     35,      67,      131, ...
  n=4:  12,   20,    36,     68,     132,      260, ...
  ...
Northwest corner of {T(n,k)} in base-2:
        k=1  k=2    k=3     k=4      k=5       k=6
  n=0:  1,   10,    100,    1000,    10000,    100000, ...
  n=1:  11,  101,   1001,   10001,   100001,   1000001, ...
  n=2:  110, 1010,  10010,  100010,  1000010,  10000010, ...
  n=3:  111, 1011,  10011,  100010,  1000011,  10000011, ...
  n=4:  1100,10100, 100100, 1000100, 10000100, 100000100, ...
  ...
		

Crossrefs

Programs

  • Mathematica
    (*Simplified Formula*)
    MatrixForm[Prepend[Table[n + 2^(Floor[Log[2, n]] + k), {n, 1, 4}, {k, 1, 6}], Table[2^(k - 1), {k, 1, 6}]]]
    (*Branching Formula*)
    MatrixForm[Prepend[Table[NestList[Function[# + 2^(Floor[Log[2, #]])], n + 2^(Floor[Log[2, n]] + 1), 5], {n, 1, 4}], NestList[Function[# + 2^(Floor[Log[2, #]])], 1, 5]]]
  • PARI
    T(n, k) = if (n==0, 2^(k-1), n + 2^(log(n)\log(2) + k));
    matrix(7, 7, n, k, n--; T(n, k)) \\ Michel Marcus, Jul 30 2021

Formula

T(0,k) = 2^(k - 1) and T(n,k) = n + 2^(floor(log_2(n)) + k) for n >= 1.
T(0,k) = L^(k - 1)(1) and T(n,k) = L^(k - 1) R(n) for n = 1, 2, 3, ..., where L(n) = A004754(n) = n + 2^floor(log_2(n)) and R(n) = A004755(n) = n + 2^(floor(log_2(n)) + 1).
Let b(n) = A054582(n-1). Then for all n >= 1, a(n) = A139706(b(n)) and b(n) = A139708(a(n)).

A349102 Increase the odd part of n to the next greater odd number.

Original entry on oeis.org

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

Views

Author

Kevin Ryde, Mar 26 2022

Keywords

Comments

This is +2 at the bit position of the odd part of n, that being the least significant 1-bit.
The least significant run of 1-bits changes from 0111..111 in n to 1000..001 in a(n).
Arrays A054582 and A135764 arrange terms into rows having the same number of trailing 0 bits. a(n) is the term to the right of n, i.e., next in its row.

Examples

			n    = 3448 = binary 1101 0111 1 000
a(n) = 3464 = binary 1101 1000 1 000
		

Crossrefs

Cf. A000265 (odd part), A171977 (2 at odd part), A285326.
Arrays: A054582, A135764.

Programs

  • Mathematica
    Array[# + 2^(IntegerExponent[#, 2] + 1) &, 67] (* Michael De Vlieger, Mar 27 2022 *)
  • PARI
    a(n) = n + 2<
    				

Formula

a(n) = n + A171977(n).
a(2*n) = 2*a(n).
a(2*n+1) = 2*n + 3.

A356875 Square array, n >= 0, k >= 0, read by descending antidiagonals. A(n,k) = A022341(n)*2^k.

Original entry on oeis.org

1, 2, 5, 4, 10, 9, 8, 20, 18, 17, 16, 40, 36, 34, 21, 32, 80, 72, 68, 42, 33, 64, 160, 144, 136, 84, 66, 37, 128, 320, 288, 272, 168, 132, 74, 41, 256, 640, 576, 544, 336, 264, 148, 82, 65, 512, 1280, 1152, 1088, 672, 528, 296, 164, 130, 69, 1024, 2560, 2304, 2176, 1344, 1056, 592, 328, 260, 138, 73
Offset: 0

Views

Author

Peter Munn, Sep 02 2022

Keywords

Comments

The nonzero Fibbinary numbers (A003714) arranged in rows where each successive term is twice the preceding term; a (transposed) Fibbinary equivalent of A054582.
Write the first term in each row as Sum_{i in S} 2^i, where S is a set of nonnegative integers, then n = Sum_{i in S} F_i, where F_i is the i-th Fibonacci number, A000045(i).
More generally, if the terms are represented in binary, and the binary weighting of the digits (2^0, 2^1, 2^2, ...) is replaced with Fibonacci weighting (F_0, F_1, F_2, ...), we get the extended Wythoff array (A287870). If the weighting of the Zeckendorf representation is used (F_2, F_3, F_4, ...), we get the (unextended) Wythoff array (A035513).

Examples

			Square array A(n,k) begins:
   1    2    4    8    16    32    64   128 ...
   5   10   20   40    80   160   320   640 ...
   9   18   36   72   144   288   576  1152 ...
  17   34   68  136   272   544  1088  2176 ...
  21   42   84  168   336   672  1344  2688 ...
  33   66  132  264   528  1056  2112  4224 ...
  37   74  148  296   592  1184  2368  4736 ...
  41   82  164  328   656  1312  2624  5248 ...
  65  130  260  520  1040  2080  4160  8320 ...
  69  138  276  552  1104  2208  4416  8832 ...
  ...
The defining characteristic of a Fibbinary number is that its binary representation does not have a 1 followed by another 1. Shown in binary the array begins:
      1      10      100      1000 ...
    101    1010    10100    101000 ...
   1001   10010   100100   1001000 ...
  10001  100010  1000100  10001000 ...
  10101  101010  1010100  10101000 ...
  ...
		

Crossrefs

See the comments for the relationship to: A000045, A003714, A035513, A054582, A287870.
See the formula section for the relationship to: A022290, A022341, A356874.

Formula

A(n,0) = A022341(n), otherwise A(n,k) = 2*A(n,k-1).
A287870(n+1,k+1) = A356874(floor(A(n,k)/2)).
A035513(n+1,k+1) = A022290(A(n,k)).

A264731 Rectangular array A read by upward antidiagonals in which the entry in row n and column k is defined by A(n,k) = prime(2^(n-1)*(2*k-1)), n,k >= 1.

Original entry on oeis.org

2, 3, 5, 7, 13, 11, 19, 37, 29, 17, 53, 89, 71, 43, 23, 131, 223, 173, 107, 61, 31, 311, 503, 409, 263, 151, 79, 41, 719, 1163, 941, 613, 359, 193, 101, 47, 1619, 2657, 2129, 1423, 827, 457, 239, 113, 59, 3671, 5849, 4751, 3167, 1877, 1049, 569, 281, 139, 67
Offset: 1

Views

Author

L. Edson Jeffery, Nov 22 2015

Keywords

Comments

Every primes appears exactly once in the array.

Examples

			The array begins:
.     2      5     11     17     23     31     41     47     59      67
.     3     13     29     43     61     79    101    113    139     163
.     7     37     71    107    151    193    239    281    337     383
.    19     89    173    263    359    457    569    659    769     881
.    53    223    409    613    827   1049   1283   1511   1747    2003
.   131    503    941   1423   1877   2377   2861   3413   3923    4481
.   311   1163   2129   3167   4211   5309   6379   7561   8731    9857
.   719   2657   4751   6971   9311  11731  14143  16603  19183   21661
.  1619   5849  10459  15331  20393  25579  30859  36161  41611   47143
.  3671  12907  22943  33479  44269  55487  66791  78193  89899  101573
As a triangle:
.    2
.    3    5
.    7   13   11
.   19   37   29   17
.   53   89   71   43   23
.  131  223  173  107   61  31
.  311  503  409  263  151  79  41
...
		

Crossrefs

Cf. A031368, A031378, A031395 (rows 1--3).
Cf. A033844 (column 1).
Cf. A264735 (main diagonal).

Programs

  • Mathematica
    (* Array: *)
    Grid[Table[Prime[2^(n - 1)*(2*k - 1)], {n, 10}, {k, 10}]]
    (* Array antidiagonals flattened: *)
    Flatten[Table[Prime[2^(n - k)*(2*k - 1)], {n, 10}, {k, n}]]

Formula

A(n,k) = A000040(A054582(n-1,k-1)).
A(A001511(m),A003602(m)) = A000040(m), m >= 1.
Previous Showing 21-30 of 32 results. Next