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

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

A254051 Square array A by downward antidiagonals: A(n,k) = (3 + 3^n*(2*floor(3*k/2) - 1))/6, n,k >= 1; read as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This is transposed dispersion of (3n-1), starting from its complement A032766 as the first row of square array A(row,col). Please see the transposed array A191450 for references and background discussion about dispersions.
For any odd number x = A135765(row,col), the result after one combined Collatz step (3x+1)/2 -> x (A165355) is found in this array at A(row+1,col).

Examples

			The top left corner of the array:
   1,   3,   4,   6,   7,   9,  10,  12,   13,   15,   16,   18,   19,   21
   2,   8,  11,  17,  20,  26,  29,  35,   38,   44,   47,   53,   56,   62
   5,  23,  32,  50,  59,  77,  86, 104,  113,  131,  140,  158,  167,  185
  14,  68,  95, 149, 176, 230, 257, 311,  338,  392,  419,  473,  500,  554
  41, 203, 284, 446, 527, 689, 770, 932, 1013, 1175, 1256, 1418, 1499, 1661
...
		

Crossrefs

Inverse: A254052.
Transpose: A191450.
Row 1: A032766.
Cf. A007051, A057198, A199109, A199113 (columns 1-4).
Cf. A254046 (row index of n in this array, see also A253786), A253887 (column index).
Array A135765(n,k) = 2*A(n,k) - 1.
Other related arrays: A254055, A254101, A254102.
Related permutations: A048673, A254053, A183209, A249745, A254103, A254104.

Formula

In A(n,k)-formulas below, n is the row, and k the column index, both starting from 1:
A(n,k) = (3 + ( A000244(n) * (2*A032766(k) - 1) )) / 6. - Antti Karttunen after L. Edson Jeffery's direct formula for A191450, Jan 24 2015
A(n,k) = A048673(A254053(n,k)). [Alternative formula.]
A(n,k) = (1/2) * (1 + A003961((2^(n-1)) * A254050(k))). [The above expands to this.]
A(n,k) = (1/2) * (1 + (A000244(n-1) * A007310(k))). [Which further reduces to this, equivalent to L. Edson Jeffery's original formula above.]
A(1,k) = A032766(k) and for n > 1: A(n,k) = (3 * A254051(n-1,k)) - 1. [The definition of transposed dispersion of (3n-1).]
A(n,k) = (1+A135765(n,k))/2, or when expressed one-dimensionally, a(n) = (1+A135765(n))/2.
A(n+1,k) = A165355(A135765(n,k)).
As a composition of related permutations. All sequences interpreted as one-dimensional:
a(n) = A048673(A254053(n)). [Proved above.]
a(n) = A191450(A038722(n)). [Transpose of array A191450.]

A208637 T(n,k)=Number of nXk 0..1 arrays with new values 0..1 introduced in row major order and no element equal to more than one of its immediate leftward or upward or right-upward antidiagonal neighbors.

Original entry on oeis.org

1, 2, 2, 4, 5, 4, 8, 11, 13, 8, 16, 23, 32, 34, 16, 32, 47, 71, 95, 89, 32, 64, 95, 150, 225, 284, 233, 64, 128, 191, 309, 494, 722, 851, 610, 128, 256, 383, 628, 1042, 1652, 2331, 2552, 1597, 256, 512, 767, 1267, 2149, 3577, 5572, 7548, 7655, 4181, 512, 1024, 1535
Offset: 1

Views

Author

R. H. Hardin Feb 29 2012

Keywords

Comments

Table starts
...1....2....4.....8....16.....32.....64....128.....256.....512....1024
...2....5...11....23....47.....95....191....383.....767....1535....3071
...4...13...32....71...150....309....628...1267....2546....5105...10224
...8...34...95...225...494...1042...2149...4375....8840...17784...35687
..16...89..284...722..1652...3577...7504..15448...31440...63543..127884
..32..233..851..2331..5572..12404..26508..55260..113427..230559..465773
..64..610.2552..7548.18888..43284..94320.199299..412962..844943.1714680
.128.1597.7655.24476.64216.151656.337227.722733.1512764.3117620.6359210

Examples

			Some solutions for n=4 k=3
..0..0..0....0..0..1....0..1..1....0..0..1....0..0..1....0..1..0....0..1..0
..1..1..0....1..0..1....1..0..1....1..0..1....1..0..1....1..0..1....1..0..1
..0..1..1....0..1..0....0..1..0....0..1..0....1..0..0....0..1..0....1..0..1
..0..0..1....1..0..1....0..1..0....0..1..0....1..1..0....1..0..1....1..0..0
		

Crossrefs

Column 2 is A001519(n+1)
Column 3 is A199109(n-1)
Row 2 is A052940(n-1)

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1)
k=2: a(n) = 3*a(n-1) -a(n-2)
k=3: a(n) = 4*a(n-1) -3*a(n-2)
k=4: a(n) = 5*a(n-1) -6*a(n-2) +a(n-3)
k=5: a(n) = 6*a(n-1) -10*a(n-2) +4*a(n-3)
k=6: a(n) = 7*a(n-1) -15*a(n-2) +10*a(n-3) -a(n-4)
k=7: a(n) = 8*a(n-1) -21*a(n-2) +20*a(n-3) -5*a(n-4)
Empirical for row n:
n=1: a(k)=2*a(k-1)
n=2: a(k)=3*a(k-1)-2*a(k-2)
n=3: a(k)=4*a(k-1)-5*a(k-2)+2*a(k-3)
n=4: a(k)=5*a(k-1)-9*a(k-2)+7*a(k-3)-2*a(k-4) for k>5
n=5: a(k)=6*a(k-1)-14*a(k-2)+16*a(k-3)-9*a(k-4)+2*a(k-5) for k>7
n=6: a(k)=7*a(k-1)-20*a(k-2)+30*a(k-3)-25*a(k-4)+11*a(k-5)-2*a(k-6) for k>9
n=7: a(k)=8*a(k-1)-27*a(k-2)+50*a(k-3)-55*a(k-4)+36*a(k-5)-13*a(k-6)+2*a(k-7) for k>11

A237930 a(n) = 3^(n+1) + (3^n-1)/2.

Original entry on oeis.org

3, 10, 31, 94, 283, 850, 2551, 7654, 22963, 68890, 206671, 620014, 1860043, 5580130, 16740391, 50221174, 150663523, 451990570, 1355971711, 4067915134, 12203745403, 36611236210, 109833708631, 329501125894, 988503377683, 2965510133050, 8896530399151
Offset: 0

Views

Author

Philippe Deléham, Feb 16 2014

Keywords

Comments

a(n-1) agrees with the graph radius of the n-Sierpinski carpet graph for n = 2 to at least n = 5. See A100774 for the graph diameter of the n-Sierpinski carpet graph.
The inverse binomial transform gives 3, 7, 14, 28, 56, ... i.e., A005009 with a leading 3. - R. J. Mathar, Jan 08 2020
First differences of A108765. The digital root of a(n) for n > 1 is always 4. a(n) is never divisible by 7 or by 12. a(n) == 10 (mod 84) for odd n. a(n) == 31 (mod 84) for even n > 0. Conjecture: This sequence contains no prime factors p == {11, 13, 23, 61 71, 73} (mod 84). - Klaus Purath, Apr 13 2020
This is a subsequence of A017209 for n > 1. See formula. - Klaus Purath, Jul 03 2020

Examples

			Ternary....................Decimal
10...............................3
101.............................10
1011............................31
10111...........................94
101111.........................283
1011111........................850
10111111......................2551
101111111.....................7654, etc.
		

Crossrefs

Cf. A000244, A003462, A005009, A005032 (first differences), A017209, A060816, A100774, A108765 (partial sums), A199109, A329774.

Programs

  • Magma
    [3^(n+1) + (3^n-1)/2: n in [0..40]]; // Vincenzo Librandi, Jan 09 2020
  • Mathematica
    (* Start from Eric W. Weisstein, Mar 13 2018 *)
    Table[(7 3^n - 1)/2, {n, 0, 20}]
    (7 3^Range[0, 20] - 1)/2
    LinearRecurrence[{4, -3}, {10, 31}, {0, 20}]
    CoefficientList[Series[(3 - 2 x)/((x - 1) (3 x - 1)), {x, 0, 20}], x]
    (* End *)
  • PARI
    Vec((3 - 2*x) / ((1 - x)*(1 - 3*x)) + O(x^30)) \\ Colin Barker, Nov 27 2019
    

Formula

G.f.: (3-2*x)/((1-x)*(1-3*x)).
a(n) = A000244(n+1) + A003462(n).
a(n) = 3*a(n-1) + 1 for n > 0, a(0)=3. (Note that if a(0) were 1 in this recurrence we would get A003462, if it were 2 we would get A060816. - N. J. A. Sloane, Dec 06 2019)
a(n) = 4*a(n-1) - 3*a(n-2) for n > 1, a(0)=3, a(1)=10.
a(n) = 2*a(n-1) + 3*a(n-2) + 2 for n > 1.
a(n) = A199109(n) - 1.
a(n) = (7*3^n - 1)/2. - Eric W. Weisstein, Mar 13 2018
From Klaus Purath, Apr 13 2020: (Start)
a(n) = A057198(n+1) + A024023(n).
a(n) = A029858(n+2) - A024023(n).
a(n) = A052919(n+1) + A029858(n+1).
a(n) = (A000244(n+1) + A171498(n))/2.
a(n) = 7*A003462(n) + 3.
a(n) = A116952(n) + 2. (End)
a(n) = A017209(7*(3^(n-2)-1)/2 + 3), n > 1. - Klaus Purath, Jul 03 2020
E.g.f.: exp(x)*(7*exp(2*x) - 1)/2. - Stefano Spezia, Aug 28 2023

A199110 a(n) = 7*3^n + 1.

Original entry on oeis.org

8, 22, 64, 190, 568, 1702, 5104, 15310, 45928, 137782, 413344, 1240030, 3720088, 11160262, 33480784, 100442350, 301327048, 903981142, 2711943424, 8135830270, 24407490808, 73222472422, 219667417264, 659002251790, 1977006755368, 5931020266102, 17793060798304, 53379182394910
Offset: 0

Views

Author

Vincenzo Librandi, Nov 03 2011

Keywords

Crossrefs

Programs

  • Magma
    [7*3^n+1: n in [0..30]];
    
  • Mathematica
    7*3^Range[0, 30] + 1 (* Paolo Xausa, Jan 28 2025 *)
  • Python
    def a(n): return 7*3**n + 1
    print([a(n) for n in range(26)]) # Michael S. Branicky, Aug 22 2021

Formula

a(n) = 3*a(n-1) - 2 = A005032(n) + 1.
a(n) = 4*a(n-1) - 3*a(n-2).
From Bruno Berselli, Nov 03 2011: (Start)
G.f.: 2*(4-5*x)/((1-x)*(1-3*x)).
a(n) = 2*A199109(n). (End)
E.g.f.: exp(x)*(1 + 7*exp(2*x)). - Elmo R. Oliveira, Apr 02 2025
Showing 1-5 of 5 results.