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 37 results. Next

A196416 Table read by antidiagonals: V(n,m) = solution to postage stamp problem with n stamps in set, m stamps on letter.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 5, 4, 1, 1, 5, 8, 9, 5, 1, 1, 6, 11, 16, 13, 6, 1, 1, 7, 15, 27, 25, 17, 7, 1, 1, 8, 19, 36, 45, 37, 21, 8, 1, 1, 9, 24, 53, 72, 71, 53, 27, 9, 1, 1, 10, 29, 70, 115, 127, 109, 71, 33, 10, 1
Offset: 0

Views

Author

N. J. A. Sloane, Oct 01 2011

Keywords

Comments

Given n, m, the postage stamp problem is to choose a set of n nonnegative integers such that the sums of m or fewer of these integers can realize the numbers 1, 2, ..., N-1, where N is as large as possible. V(n,m) denotes the value of N.

Examples

			Array begins:
m\n 0 1 2 3 4 5 6 ...
---------------------
0...1 1 1 1 1 1 1 ...
1...1 2 3 4 5 6 7  ...
2...1 3 5 9 13 17 21  ...
3...1 4 8 16 25 37 53 ...
4...1 5 11 27 45 71 109  ...
5...1 6 15 36 72 127 212  ...
6...1 7 19 53 115 217 389  ...
...
		

Crossrefs

A163255 An interspersion: the order array of A163254.

Original entry on oeis.org

1, 3, 2, 7, 5, 4, 13, 10, 8, 6, 21, 17, 14, 11, 9, 31, 26, 22, 18, 15, 12, 43, 37, 32, 27, 23, 19, 16, 57, 50, 44, 38, 33, 28, 24, 20, 73, 65, 58, 51, 45, 39, 34, 29, 25, 91, 82, 74, 66, 59, 52, 46, 40, 35, 30, 111, 101, 92, 83, 75, 67, 60, 53, 47, 41, 36
Offset: 1

Views

Author

Clark Kimberling, Jul 24 2009

Keywords

Comments

A permutation of the natural numbers.
Except for initial terms, rows 1 to 4 are A002061, A002522, A014206, A059100 and columns 1 to 4 are A002620, A024206, A014616, A004116.
This is the interspersion of the fractal sequence A167430; i.e., row n of this array consists of the numbers k such that n=A167430(k). - Clark Kimberling, Nov 03 2009

Examples

			Corner:
1....3....7...13
2....5...10...17
4....8...14...22
To obtain A163255 from A163254, replace each term of A163254 by its rank when all the terms of A163254 are arranged in increasing order.
		

Crossrefs

A327117 Number T(n,k) of colored integer partitions of n using all colors of a k-set such that a color pattern for part i has i distinct colors in increasing order; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 4, 5, 0, 1, 7, 18, 15, 0, 1, 10, 45, 84, 52, 0, 1, 14, 94, 298, 415, 203, 0, 1, 18, 174, 844, 1995, 2178, 877, 0, 1, 23, 300, 2081, 7440, 13638, 12131, 4140, 0, 1, 28, 486, 4652, 23670, 64898, 95823, 71536, 21147, 0, 1, 34, 756, 9682, 67390, 259599, 566447, 694676, 445356, 115975
Offset: 0

Views

Author

Alois P. Heinz, Sep 13 2019

Keywords

Comments

The sequence of column k satisfies a linear recurrence with constant coefficients of order k*2^(k-1) = A001787(k).

Examples

			T(3,2) = 4: 2ab1a, 2ab1b, 1a1a1b, 1a1b1b.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,  2;
  0, 1,  4,   5;
  0, 1,  7,  18,   15;
  0, 1, 10,  45,   84,    52;
  0, 1, 14,  94,  298,   415,    203;
  0, 1, 18, 174,  844,  1995,   2178,    877;
  0, 1, 23, 300, 2081,  7440,  13638,  12131,   4140;
  0, 1, 28, 486, 4652, 23670,  64898,  95823,  71536,  21147;
  0, 1, 34, 756, 9682, 67390, 259599, 566447, 694676, 445356, 115975;
  ...
		

Crossrefs

Columns k=0-3 give: A000007, A057427, A014616(n-1) for n>1, A327842.
Main diagonal gives A000110.
Row sums give A116540.
T(2n,n) gives A327843.

Programs

  • Maple
    C:= binomial:
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0, add(
          b(n-i*j, min(n-i*j, i-1), k)*C(C(k, i)+j-1, j), j=0..n/i)))
        end:
    T:= (n, k)-> add(b(n$2, i)*(-1)^(k-i)*C(k, i), i=0..k):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i<1, 0, Sum[b[n - i j, Min[n - i j, i - 1], k] Binomial[Binomial[k, i] + j - 1, j], {j, 0, n/i}]]];
    T[n_, k_] := Sum[b[n, n, i] (-1)^(k - i) Binomial[k, i], {i, 0, k}];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Oct 04 2019, after Alois P. Heinz *)

Formula

Sum_{k=1..n} k * T(n,k) = A327118(n).

A112970 A generalized Stern sequence.

Original entry on oeis.org

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

Views

Author

Paul Barry, Oct 07 2005

Keywords

Comments

Conjectures: a(2^n)=a(2^(n+1)+1)=A033638(n); a(2^n-1)=a(3*2^n-1)=1.
The Gi1 and Gi2 triangle sums, see A180662 for their definitions, of Sierpinski's triangle A047999 equal this sequence. The Gi1 and Gi2 sums can also be interpreted as (i + 4*j = n) and (4*i + j = n) sums, see the Northshield reference. Some A112970(2^n-p) sequences, 0<=p<=32, lead to known sequences, see the crossrefs. - Johannes W. Meijer, Jun 05 2011

Crossrefs

Cf. A120562 (Northshield).
Cf. A033638 (p=0), A000012 (p=1), A004526 (p=2, p=3, p=5, p=9, p=17), A002620 (p=4, p=7, p=13, p=25), A000027 (p=6, p=11, p=21), A004116 (p=8, p=15, p=29), A035106 (p=10, p=19), A024206 (p=14, p=27), A007494 (p=18), A014616 (p=22), A179207 (p=26). - Johannes W. Meijer, Jun 05 2011

Programs

  • Maple
    A112970:=proc(n) option remember; if n <0 then A112970(n):=0 fi: if (n=0 or n=1) then 1 elif n mod 2 = 0 then A112970(n/2) + A112970((n/2)-2) else A112970((n-1)/2); fi; end: seq(A112970(n),n=0..99); # Johannes W. Meijer, Jun 05 2011
  • Mathematica
    a[n_] := a[n] = Which[n<0, 0, n==0 || n==1, 1, Mod[n, 2]==0, a[n/2] + a[n/2-2], True, a[(n-1)/2]];
    Table[a[n], {n, 0, 99}] (* Jean-François Alcover, Aug 02 2022 *)

Formula

a(n) = Sum_{k=0..n} mod(sum{j=0..n, (-1)^(n-k)*C(j, n-j)*C(k, j-k)}, 2).
From Johannes W. Meijer, Jun 05 2011: (Start)
a(2*n+1) = a(n) and a(2*n) = a(n) + a(n-2) with a(0) = 1, a(1) = 1 and a(n)=0 for n<=-1.
G.f.: Product_{n>=0} (1 + x^(2^n) + x^(4*2^n)). (End)
G.f. A(x) satisfies: A(x) = (1 + x + x^4) * A(x^2). - Ilya Gutkovskiy, Jul 09 2019

A261242 Irregular triangle T(n, k) of number of connected bisymmetric n X n matrices B_n with 0 or 1 entries, B_n[1,1] = 1 = B_n[1,n], and k islands of 0's.

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 4, 12, 18, 12, 8, 6, 2, 44, 56, 120, 28, 88, 4, 36, 0, 8
Offset: 1

Views

Author

Keywords

Comments

The row length sequence is 1 for n = 1 and A000982(n-2) + 1 for n >= 2, that is: 1, 1, 2, 3, 6, 9, 14, 19, 26, 33, 42, ... = A261243.
This entry is motivated by A258643.
For bisymmetric matrices see the Wikipedia link.
For the number of independent entries of an n X n bisymmetric matrix B_n see a Jul 07 2015 comment on A002620(n+1), n >= 1. For the binary case (only 0 and 1 entries) see A060656(n+1), and the Dennis P. Walsh comment and link. If B_n[1,1] and B_n[1,n] is given then the four corners are fixed, and, for n >= 3, there are A002620(n+1) - 2 = A014616(n-2) entries free.
If the n X n bisymmetric matrix B_n of 0's and 1's with B_n[1, 1] = 1 = B_n[1, n] is considered as a grid of n^2 squares of length 1 (in some length unit) with the four corners filled with 1's and the other squares with 0 or 1 then a path between the centers of squares with step length 1 can be defined. No diagonal steps (length sqrt(2)) are allowed. B_n is called connected if there exists no path of 0's which dissects the grid into two parts.
An island of 0's (a 0-island) in B_n is defined as a set of 0's for which each pair is connected by a path of 0's, and a 0 entry at the coast of a 0-island has at least one entry 1 one step away. A single square filled with a 0 is a 0-island if all four neighbors 1 step (of length 1) apart are filled with 1's. If k=0 there exists no such 0-island. See the n=4 examples with k >=1 below. The k = 1 matrix has one simply connected 0-island of four squares. The four k = 2 matrices have two 0-islands consisting of one square each.
See the link with the figures by K. N. where red squares stand for 1 and empty squares for 0. Each matrix appears there rotated by 45 degrees in the counterclockwise direction. The mirror operation means row reversion in the matrix B_n. In the figures this is a mirror operation w.r.t. the middle NW-SE diagonal. 0-islands appear in the figures as holes.
For the row sums see A261244.

Examples

			The irregular triangle T(n, k) begins:
n\k   0   1    2   3   4  5   6   7   8  ...
1:    1
2:    1
3:    2   1
4:    4   1    4
5:   12  18   12   8   6  2
6:   44  56  120  28  88  4  36   0   8
...
n=4: k=0:
[[1,1,1,1], [1,1,1,1], [1,1,1,1], [1,1,1,1]],
[[1,0,0,1], [0,1,1,0], [0,1,1,0], [1,0,0,1]],
[[1,1,0,1], [1,1,1,0], [0,1,1,1], [1,0,1,1]],
[[1,0,1,1], [0,1,1,1], [1,1,1,0], [1,1,0,1]];
     k=1:
[[1,1,1,1], [1,0,0,1], [1,0,0,1], [1,1,1,1]];
     k=2:
[[1,1,1,1], [1,0,1,1], [1,1,0,1], [1,1,1,1]],
[[1,1,1,1], [1,1,0,1], [1,0,1,1], [1,1,1,1]],
[[1,1,0,1], [1,0,1,0], [0,1,0,1], [1,0,1,1]],
[[1,0,1,1], [0,1,0,1], [1,0,1,0], [1,1,0,1]].
		

Crossrefs

A360862 Triangle read by rows: T(n,k) is the number of unlabeled connected multigraphs with n edges on k nodes and degree >= 3 at each node, loops allowed, n >= 2, 1 <= k <= floor(2*n/3).

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 7, 5, 1, 10, 20, 5, 1, 14, 48, 36, 1, 18, 99, 153, 30, 1, 23, 181, 481, 277, 17, 1, 28, 303, 1239, 1451, 323, 1, 34, 479, 2811, 5572, 2946, 193, 1, 40, 726, 5805, 17607, 17343, 3806, 71, 1, 47, 1055, 11148, 48401, 77708, 36872, 3188, 1, 54, 1492, 20219, 120018, 288476, 243007, 54386, 1496
Offset: 2

Views

Author

Andrew Howroyd, Feb 24 2023

Keywords

Comments

Terms may be computed using the tools geng, vcolg and multig in nauty with some additional processing to check the degrees of nodes.

Examples

			Triangle begins:
  1;
  1,  2;
  1,  4;
  1,  7,    5;
  1, 10,   20,     5;
  1, 14,   48,    36;
  1, 18,   99,   153,     30;
  1, 23,  181,   481,    277,     17;
  1, 28,  303,  1239,   1451,    323;
  1, 34,  479,  2811,   5572,   2946,    193;
  1, 40,  726,  5805,  17607,  17343,   3806,    71;
  1, 47, 1055, 11148,  48401,  77708,  36872,  3188;
  1, 54, 1492, 20219, 120018, 288476, 243007, 54386, 1496;
  ...
		

Crossrefs

Column 2 is A014616.
Row sums are A360863.
Diagonal sums are A360864.
Cf. A322115, A327615, A360866 (loopless).

A360870 Triangle read by rows: T(n,k) is the number of unlabeled connected multigraphs with n edges on k nodes, no cut-points and degree >= 3 at each node, loops allowed, n >= 2, 1 <= k <= floor(2*n/3).

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 7, 2, 1, 10, 8, 2, 1, 14, 19, 11, 1, 18, 40, 48, 7, 1, 23, 77, 154, 70, 5, 1, 28, 132, 421, 392, 71, 1, 34, 217, 1008, 1638, 690, 35, 1, 40, 340, 2210, 5623, 4548, 767, 16, 1, 47, 510, 4477, 16745, 22657, 8594, 566, 1, 54, 742, 8557, 44698, 92844, 64716, 11247, 226
Offset: 2

Views

Author

Andrew Howroyd, Feb 25 2023

Keywords

Comments

Columns k >= 3 correspond to the 2-connected graphs.
Terms may be computed using the tools geng, vcolg and multig in nauty with some additional processing to check the degrees of nodes.

Examples

			Triangle begins:
  1;
  1,  2;
  1,  4;
  1,  7,   2;
  1, 10,   8,    2;
  1, 14,  19,   11;
  1, 18,  40,   48,     7;
  1, 23,  77,  154,    70,     5;
  1, 28, 132,  421,   392,    71;
  1, 34, 217, 1008,  1638,   690,    35;
  1, 40, 340, 2210,  5623,  4548,   767,    16;
  1, 47, 510, 4477, 16745, 22657,  8594,   566;
  1, 54, 742, 8557, 44698, 92844, 64716, 11247, 226;
  ...
		

Crossrefs

Column 2 is A014616.
Row sums are A360882.
Row sums except first column are A360871.

A055130 Triangle T(n,k) of numbers of k-covers of an unlabeled n-set, k=1..2^n-1.

Original entry on oeis.org

1, 1, 2, 1, 1, 4, 9, 10, 6, 3, 1, 1, 7, 29, 87, 181, 287, 364, 365, 290, 187, 97, 39, 13, 4, 1, 1, 10, 72, 417, 1973, 7745, 25830, 74017, 183420, 395311, 744495, 1229807, 1787135, 2289925, 2591162, 2591163, 2289929, 1787148, 1229846, 744592, 395498
Offset: 1

Views

Author

Vladeta Jovovic, Jun 14 2000

Keywords

Examples

			Triangle begins:
[1] 1;
[2] 1, 2,  1;
[3] 1, 4,  9, 10,   6,   3,   1;
[4] 1, 7, 29, 87, 181, 287, 364, 365, 290, 187, 97, 39, 13, 4, 1;
  ...
There are 9 3-covers of an unlabeled 3-set: {{1,2},{2,3},{1,2,3}}, {{1,2},{2,3},{1,3}}, {{1,2},{3},{1,2,3}}, {{1},{1,2},{1,2,3}}, {{1,2},{2,3},{3}}, {{1,2},{2},{2,3}}, {{1},{2},{1,2,3}}, {{1},{2},{1,3}} and {{1},{2},{3}}.
		

Crossrefs

Row sums give A055621.
Columns k=1..3 are A000012, A014616(n-1), A055195.

Programs

  • PARI
    \\ G(n,m) defined in A368186.
    row(n)={my(m=2^n-1); Vec(G(n,m) - G(n-1,m))} \\ Andrew Howroyd, Jan 03 2024

Formula

T(n,n) = A368186(n). - Andrew Howroyd, Jan 03 2024

A339334 Triangle read by rows, 1 <= k <= n: T(n,k) is the sum of the minimal number of coins needed for amounts 1..n with an optimal greedy k-coin system of denominations.

Original entry on oeis.org

1, 3, 2, 6, 4, 3, 10, 6, 5, 4, 15, 9, 7, 6, 5, 21, 11, 9, 8, 7, 6, 28, 14, 11, 10, 9, 8, 7, 36, 18, 14, 12, 11, 10, 9, 8, 45, 21, 17, 14, 13, 12, 11, 10, 9, 55, 25, 19, 16, 15, 14, 13, 12, 11, 10, 66, 30, 22, 19, 17, 16, 15, 14, 13, 12, 11
Offset: 1

Views

Author

Pontus von Brömssen, Nov 30 2020

Keywords

Comments

An optimal greedy k-coin system of denominations for amounts 1..n is a set of k coin denominations such that the sum of the number of coins needed for each of the amounts 1, ..., n is as small as possible when the coins are chosen greedily, i.e., the largest coin value less than or equal to the remaining amount is always chosen.

Examples

			Triangle begins:
  n\k|  1  2  3  4  5  6  7  8  9 10 11 12
  ---|-------------------------------------
   1 |  1
   2 |  3  2
   3 |  6  4  3
   4 | 10  6  5  4
   5 | 15  9  7  6  5
   6 | 21 11  9  8  7  6
   7 | 28 14 11 10  9  8  7
   8 | 36 18 14 12 11 10  9  8
   9 | 45 21 17 14 13 12 11 10  9
  10 | 55 25 19 16 15 14 13 12 11 10
  11 | 66 30 22 19 17 16 15 14 13 12 11
  12 | 78 33 25 22 19 18 17 16 15 14 13 12
For n = 8, one of the optimal greedy 3-coin systems is (1,2,4), with the representations
  1 = 1
  2 = 2
  3 = 2 + 1
  4 = 4
  5 = 4 + 1
  6 = 4 + 2
  7 = 4 + 2 + 1
  8 = 4 + 4
with a total of 14 = T(8,3) terms.
Shallit (2003) shows that T(99,k) is 4950, 900, 526, 410, 346, 313, 286 for k = 1..7.
		

Crossrefs

Formula

T(n,k) = A339333(n,k) for all k when 1 <= n <= 7 or n = 10.
T(n,k) = A339333(n,k) for all n when k = 1 or k = 2.
T(n,k) >= A339333(n,k).
T(n,k) >= 2n - k, with equality if and only if n <= A014616(k).

A184674 a(n) = n+floor((n/2-1/(2*n))^2); complement of A184675.

Original entry on oeis.org

1, 2, 4, 7, 10, 14, 18, 23, 28, 34, 40, 47, 54, 62, 70, 79, 88, 98, 108, 119, 130, 142, 154, 167, 180, 194, 208, 223, 238, 254, 270, 287, 304, 322, 340, 359, 378, 398, 418, 439, 460, 482, 504, 527, 550, 574, 598, 623, 648, 674, 700, 727, 754, 782, 810, 839, 868, 898, 928, 959, 990, 1022, 1054, 1087, 1120, 1154, 1188, 1223, 1258, 1294, 1330, 1367, 1404
Offset: 1

Views

Author

Clark Kimberling, Jan 19 2011

Keywords

Comments

Conjecture: a(n) = A014616(n-1). - R. J. Mathar, Jan 29 2011
The above conjecture is true. - Stefano Spezia, Apr 04 2023

Crossrefs

Programs

  • Magma
    [n+Floor((n/2-1/(2*n))^2): n in [1..80]]; // Vincenzo Librandi, Jul 10 2011
  • Maple
    A184674:=n->n+floor((n/2-1/(2*n))^2): seq(A184674(n), n=1..100); # Wesley Ivan Hurt, Feb 22 2017
  • Mathematica
    a[n_]:=n+Floor[(n/2-1/(2n))^2];
    b[n_]:=n+Floor[n^(1/2)+(n+1)^(1/2)];
    Table[a[n],{n,1,120}]   (* A184674 *)
    Table[b[n],{n,1,120}]   (* A184675 *)
    FindLinearRecurrence[Table[a[n],{n,1,120}]]
    Join[{1},LinearRecurrence[{2,0,-2,1},{2,4,7,10},72]] (* Ray Chandler, Aug 02 2015 *)

Formula

a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n>=6.
G.f.: x*(x^4 - x^3 - 1)/((x + 1)*(x - 1)^3). - Álvar Ibeas, Jul 20 2021
a(n) = (2*n^2 + 8*n - 9 + (-1)^n)/8 for n > 1. - Stefano Spezia, Apr 04 2023
Previous Showing 21-30 of 37 results. Next