Search: seq:1,1,1,1,2,1,1,3,2,1
|
|
A355737
|
|
Number of ways to choose a sequence of divisors, one of each prime index of n (with multiplicity), such that the result has no common divisor > 1.
|
|
+30
28
|
|
|
0, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 2, 1, 3, 4, 1, 1, 4, 1, 2, 4, 2, 1, 2, 3, 4, 7, 3, 1, 4, 1, 1, 4, 2, 6, 4, 1, 4, 6, 2, 1, 6, 1, 2, 8, 3, 1, 2, 5, 4, 4, 4, 1, 8, 4, 3, 5, 4, 1, 4, 1, 2, 10, 1, 6, 4, 1, 2, 6, 6, 1, 4, 1, 6, 8, 4, 6, 8, 1, 2, 15, 2, 1, 6, 4, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,6
|
|
COMMENTS
|
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
|
|
LINKS
|
|
|
EXAMPLE
|
The a(2) = 1 through a(18) = 4 choices:
1 1 11 1 11 1 111 11 11 1 111 1 11 11 1111 1 111
12 12 13 112 12 13 112
21 14 21 121
23 122
|
|
MATHEMATICA
|
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Length[Select[Tuples[Divisors/@primeMS[n]], GCD@@#==1&]], {n, 100}]
|
|
CROSSREFS
|
For weakly increasing instead of coprime we have A355735, primes A355745.
Positions of first appearances are A355738.
A001222 counts prime factors with multiplicity.
A003963 multiplies together the prime indices of n.
A120383 lists numbers divisible by all of their prime indices.
A289508 gives GCD of prime indices.
A324850 lists numbers divisible by the product of their prime indices.
Cf. A000720, A007359, A051424, A076610, A289507, A296150, A302696, A302698, A355733, A355744, A355748.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A052509
|
|
Knights-move Pascal triangle: T(n,k), n >= 0, 0 <= k <= n; T(n,0) = T(n,n) = 1, T(n,k) = T(n-1,k) + T(n-2,k-1) for k = 1,2,...,n-1, n >= 2.
|
|
+30
25
|
|
|
1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 4, 2, 1, 1, 5, 7, 4, 2, 1, 1, 6, 11, 8, 4, 2, 1, 1, 7, 16, 15, 8, 4, 2, 1, 1, 8, 22, 26, 16, 8, 4, 2, 1, 1, 9, 29, 42, 31, 16, 8, 4, 2, 1, 1, 10, 37, 64, 57, 32, 16, 8, 4, 2, 1, 1, 11, 46, 93, 99, 63, 32, 16, 8, 4, 2, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
Also square array T(n,k) (n >= 0, k >= 0) read by antidiagonals: T(n,k) = Sum_{i=0..k} binomial(n,i).
As a number triangle read by rows, this is T(n,k) = Sum_{i=n-2*k..n-k} binomial(n-k,i), with T(n,k) = T(n-1,k) + T(n-2,k-1). Row sums are A000071(n+2). Diagonal sums are A023435(n+1). It is the reverse of the Whitney triangle A004070. - Paul Barry, Sep 04 2005
Also, twice number of orthants intersected by a generic k-dimensional subspace of R^n [Naiman and Scheinerman, 2017]. - N. J. A. Sloane, Mar 03 2018
|
|
LINKS
|
Daniel Q. Naiman and Edward R. Scheinerman, Arbitrage and Geometry, arXiv:1709.07446 [q-fin.MF], 2017 [Contains the square array multiplied by 2].
|
|
FORMULA
|
Referring to the square array T(i,j):
G.f. of row n: Sum_{k>=0} T(n,k) * x^k = (1+x)^n / (1-x).
G.f. of T(i,j): Sum_{k>=0, n>=0} T(n,k) * x^k * y^n = 1 / ((1-x)*(1-y-x*y)).
Let a_i(n) be multiplicative with a_i(p^e) = T(i, e), p prime and e >= 0, then Sum_{n>0} a_i(n)/n^s = (zeta(s))^(i+1) / (zeta(2*s))^i for i >= 0.
(End)
T(n, k) = hypergeom([-k, -n + k], [-k], -1). - Peter Luschny, Nov 28 2021
Referring to the triangle, G.f.: Sum_{n>=0, 0<=k<=n} T(n,k) * x^n * y^k = 1 / ((1-x*y)*(1-x-x^2*y)).
T(n,k) = 2^(n-k) for ceiling(n/2) <= k <= n. (End)
|
|
EXAMPLE
|
Triangle begins:
[0] 1;
[1] 1, 1;
[2] 1, 2, 1;
[3] 1, 3, 2, 1;
[4] 1, 4, 4, 2, 1;
[5] 1, 5, 7, 4, 2, 1;
[6] 1, 6, 11, 8, 4, 2, 1;
[7] 1, 7, 16, 15, 8, 4, 2, 1;
[8] 1, 8, 22, 26, 16, 8, 4, 2, 1;
[9] 1, 9, 29, 42, 31, 16, 8, 4, 2, 1;
As a square array, this begins:
1 1 1 1 1 1 ...
1 2 2 2 2 2 ...
1 3 4 4 4 4 ...
1 4 7 8 8 8 ...
1 5 11 15 16 ...
1 6 16 26 31 32 ...
|
|
MAPLE
|
a := proc(n::nonnegint, k::nonnegint) option remember: if k=0 then RETURN(1) fi: if k=n then RETURN(1) fi: a(n-1, k)+a(n-2, k-1) end: for n from 0 to 11 do for k from 0 to n do printf(`%d, `, a(n, k)) od: od: # James A. Sellers, Mar 17 2000
with(combinat): for s from 0 to 11 do for n from s to 0 by -1 do if n=0 or s-n=0 then printf(`%d, `, 1) else printf(`%d, `, sum(binomial(n, i), i=0..s-n)) fi; od: od: # James A. Sellers, Mar 17 2000
|
|
MATHEMATICA
|
Table[Sum[Binomial[n-k, k-m], {m, 0, n}], {n, 0, 10}, {k, 0, n}]
T[n_, k_] := Hypergeometric2F1[-k, -n + k, -k, -1];
Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Peter Luschny, Nov 28 2021 *)
|
|
PROG
|
(PARI) T(n, k)=sum(m=0, n, binomial(n-k, k-m));
for(n=0, 10, for(k=0, n, print1(T(n, k), ", "); ); print(); ); /* show triangle */
(Haskell)
a052509 n k = a052509_tabl !! n !! k
a052509_row n = a052509_tabl !! n
a052509_tabl = [1] : [1, 1] : f [1] [1, 1] where
f row' row = rs : f row rs where
rs = zipWith (+) ([0] ++ row' ++ [1]) (row ++ [0])
(GAP) A052509:=Flat(List([0..100], n->List([0..n], k->Sum([0..n], m->Binomial(n-k, k-m))))); # Muniru A Asiru, Sat Feb 17 2018
(Magma) [[(&+[Binomial(n-k, k-j): j in [0..n]]): k in [0..n]]: n in [0..10]]; // G. C. Greubel, May 13 2019
(Sage) [[sum(binomial(n-k, k-j) for j in (0..n)) for k in (0..n)] for n in (0..10)] # G. C. Greubel, May 13 2019
|
|
CROSSREFS
|
Partial sums across rows of (extended) Pascal's triangle A052553.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Entry formed by merging two earlier entries. - N. J. A. Sloane, Jun 17 2007
|
|
STATUS
|
approved
|
|
|
|
|
A077592
|
|
Table by antidiagonals of tau_k(n), the k-th Piltz function (see A007425), or n-th term of the sequence resulting from applying the inverse Möbius transform (k-1) times to the all-ones sequence.
|
|
+30
23
|
|
|
1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 3, 3, 1, 1, 5, 4, 6, 2, 1, 1, 6, 5, 10, 3, 4, 1, 1, 7, 6, 15, 4, 9, 2, 1, 1, 8, 7, 21, 5, 16, 3, 4, 1, 1, 9, 8, 28, 6, 25, 4, 10, 3, 1, 1, 10, 9, 36, 7, 36, 5, 20, 6, 4, 1, 1, 11, 10, 45, 8, 49, 6, 35, 10, 9, 2, 1, 1, 12, 11, 55, 9, 64, 7, 56, 15, 16, 3, 6, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
As an array with offset n=0, k=1, also the number of length n chains of divisors of k. - Gus Wiseman, Aug 04 2022
|
|
LINKS
|
|
|
FORMULA
|
If n = Product_i p_i^e_i, then T(n,k) = Product_i C(k+e_i-1, e_i). T(n,k) = sum_d{d|n} T(n-1,d) = A077593(n,k) - A077593(n-1,k).
Columns are multiplicative.
|
|
EXAMPLE
|
T(6,3) = 9 because we have: 1*1*6, 1*2*3, 1*3*2, 1*6*1, 2*1*3, 2*3*1, 3*1*2, 3*2*1, 6*1*1. - Geoffrey Critzer, Feb 16 2015
Array begins:
k=1 k=2 k=3 k=4 k=5 k=6 k=7 k=8
n=0: 1 1 1 1 1 1 1 1
n=1: 1 2 2 3 2 4 2 4
n=2: 1 3 3 6 3 9 3 10
n=3: 1 4 4 10 4 16 4 20
n=4: 1 5 5 15 5 25 5 35
n=5: 1 6 6 21 6 36 6 56
n=6: 1 7 7 28 7 49 7 84
n=7: 1 8 8 36 8 64 8 120
n=8: 1 9 9 45 9 81 9 165
The triangular form T(n,k) = A(n-k,k) gives the number of length n - k chains of divisors of k. It begins:
1
1 1
1 2 1
1 3 2 1
1 4 3 3 1
1 5 4 6 2 1
1 6 5 10 3 4 1
1 7 6 15 4 9 2 1
1 8 7 21 5 16 3 4 1
1 9 8 28 6 25 4 10 3 1
1 10 9 36 7 36 5 20 6 4 1
1 11 10 45 8 49 6 35 10 9 2 1
(End)
|
|
MAPLE
|
with(numtheory):
A:= proc(n, k) option remember; `if`(k=1, 1,
add(A(d, k-1), d=divisors(n)))
end:
|
|
MATHEMATICA
|
tau[n_, 1] = 1; tau[n_, k_] := tau[n, k] = Plus @@ (tau[ #, k - 1] & /@ Divisors[n]); Table[tau[n - k + 1, k], {n, 14}, {k, n, 1, -1}] // Flatten (* Robert G. Wilson v *)
tau[1, k_] := 1; tau[n_, k_] := Times @@ (Binomial[Last[#] + k - 1, k - 1] & /@ FactorInteger[n]); Table[tau[k, n - k + 1], {n, 1, 13}, {k, 1, n}] // Flatten (* Amiram Eldar, Sep 13 2020 *)
Table[Length[Select[Tuples[Divisors[k], n-k], And@@Divisible@@@Partition[#, 2, 1]&]], {n, 12}, {k, 1, n}] (* TRIANGLE, Gus Wiseman, May 03 2021 *)
Table[Length[Select[Tuples[Divisors[k], n-1], And@@Divisible@@@Partition[#, 2, 1]&]], {n, 6}, {k, 6}] (* ARRAY, Gus Wiseman, May 03 2021 *)
|
|
CROSSREFS
|
Columns include (with multiplicity and some offsets) A000012, A000027, A000027, A000217, A000027, A000290, A000027, A000292, A000217, A000290, A000027, A002411, A000027, A000290, A000290, A000332 etc.
The diagonal n = k of the array (central column of the triangle) is A163767.
The transpose of the array is A334997.
Diagonal n = k of the array is A343939.
Antidiagonal sums of the array (or row sums of the triangle) are A343940.
A067824(n) counts strict chains of divisors starting with n.
A074206(n) counts strict chains of divisors from n to 1.
A146291(n,k) counts divisors of n with k prime factors (with multiplicity).
A251683(n,k) counts strict length k + 1 chains of divisors from n to 1.
A253249(n) counts nonempty chains of divisors of n.
A334996(n,k) counts strict length k chains of divisors from n to 1.
A337255(n,k) counts strict length k chains of divisors starting with n.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A343656
|
|
Array read by antidiagonals where A(n,k) is the number of divisors of n^k.
|
|
+30
19
|
|
|
1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 3, 3, 1, 1, 5, 4, 5, 2, 1, 1, 6, 5, 7, 3, 4, 1, 1, 7, 6, 9, 4, 9, 2, 1, 1, 8, 7, 11, 5, 16, 3, 4, 1, 1, 9, 8, 13, 6, 25, 4, 7, 3, 1, 1, 10, 9, 15, 7, 36, 5, 10, 5, 4, 1, 1, 11, 10, 17, 8, 49, 6, 13, 7, 9, 2, 1, 1, 12, 11, 19, 9, 64, 7, 16, 9, 16, 3, 6, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
As a triangle, T(n,k) = number of divisors of k^(n-k).
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
Array begins:
k=0 k=1 k=2 k=3 k=4 k=5 k=6 k=7
n=1: 1 1 1 1 1 1 1 1
n=2: 1 2 3 4 5 6 7 8
n=3: 1 2 3 4 5 6 7 8
n=4: 1 3 5 7 9 11 13 15
n=5: 1 2 3 4 5 6 7 8
n=6: 1 4 9 16 25 36 49 64
n=7: 1 2 3 4 5 6 7 8
n=8: 1 4 7 10 13 16 19 22
n=9: 1 3 5 7 9 11 13 15
Triangle begins:
1
1 1
1 2 1
1 3 2 1
1 4 3 3 1
1 5 4 5 2 1
1 6 5 7 3 4 1
1 7 6 9 4 9 2 1
1 8 7 11 5 16 3 4 1
1 9 8 13 6 25 4 7 3 1
1 10 9 15 7 36 5 10 5 4 1
1 11 10 17 8 49 6 13 7 9 2 1
1 12 11 19 9 64 7 16 9 16 3 6 1
1 13 12 21 10 81 8 19 11 25 4 15 2 1
For example, row n = 8 counts the following divisors:
1 64 243 256 125 36 7 1
32 81 128 25 18 1
16 27 64 5 12
8 9 32 1 9
4 3 16 6
2 1 8 4
1 4 3
2 2
1 1
|
|
MATHEMATICA
|
Table[DivisorSigma[0, k^(n-k)], {n, 10}, {k, n}]
|
|
PROG
|
|
|
CROSSREFS
|
Diagonal n = k of the array is A062319.
Array antidiagonal sums (row sums of the triangle) are A343657.
A007318 counts k-sets of elements of {1..n}.
A009998(n,k) = n^k (as an array, offset 1).
A059481 counts k-multisets of elements of {1..n}.
Cf. A000169, A000272, A002064, A002109, A066959, A143773, A146291, A176029, A251683, A282935, A326358, A327527, A334996, A343652.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A226130
|
|
Denominators of rational numbers as generated by the rules: 1 is in S, and if nonzero x is in S, then x+1 and -1/x are in S. (See Comments.)
|
|
+30
16
|
|
|
1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 4, 3, 2, 1, 1, 5, 4, 3, 2, 2, 3, 1, 6, 5, 4, 3, 3, 5, 2, 5, 3, 1, 7, 6, 5, 4, 4, 7, 3, 8, 5, 2, 7, 5, 3, 1, 1, 8, 7, 6, 5, 5, 9, 4, 11, 7, 3, 11, 8, 5, 2, 2, 9, 7, 5, 3, 3, 4, 1, 9, 8, 7, 6, 6, 11, 5, 14, 9, 4, 15, 11, 7, 3, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
Let S be the set of numbers defined by these rules: 1 is in S, and if nonzero x is in S, then x + 1 and -1/x are in S. Then S is the set of all rational numbers, produced in generations as follows: g(1) = (1), g(2) = (2, -1), g(3) = (3, -1/2, 0), g(4) = (4, -1/3, 1/2), ... For n > 4, once g(n-1) = (c(1), ..., c(z)) is defined, g(n) is formed from the vector (c(1)+1, -1/c(1), c(2)+1, -1/c(2), ..., c(z)+1, -1/c(z)) by deleting previously generated elements. Let S' denote the sequence formed by concatenating the generations.
A226130: Denominators of terms of S'
A226136: Positions of positive integers in S'
A226137: Positions of integers in S'
|
|
LINKS
|
|
|
EXAMPLE
|
The denominators and numerators are read from the rationals in S':
1/1, 2/1, -1/1, 3/1, -1/2, 0/1, 4/1, -1/3, 1/2, ...
Table begins:
n |
--+-----------------------------------------------
1 | 1;
2 | 1, 1;
3 | 1, 2, 1;
4 | 1, 3, 2;
5 | 1, 4, 3, 2, 1;
6 | 1, 5, 4, 3, 2, 2, 3;
7 | 1, 6, 5, 4, 3, 3, 5, 2, 5, 3;
8 | 1, 7, 6, 5, 4, 4, 7, 3, 8, 5, 2, 7, 5, 3, 1;
|
|
MATHEMATICA
|
g[1] := {1}; z = 20; g[n_] := g[n] = DeleteCases[Flatten[Transpose[{# + 1, -1/#}]]&[DeleteCases[g[n - 1], 0]], Apply[Alternatives, Flatten[Map[g, Range[n - 1]]]]]; Flatten[Map[g, Range[7]]] (* ordered rationals *)
Map[g, Range[z]]; Table[Length[g[i]], {i, 1, z}] (* cf. A003410 *)
f = Flatten[Map[g, Range[z]]];
Take[Denominator[f], 100] (* A226130 *)
Take[Numerator[f], 100] (* A226131 *)
p1 = Flatten[Table[Position[f, n], {n, 1, z}]] (* A226136 *)
p2 = Flatten[Table[Position[f, -n], {n, 0, z}]];
|
|
PROG
|
(Python)
from fractions import Fraction
from itertools import count, islice
def agen():
rats = [Fraction(1, 1)]
seen = {Fraction(1, 1)}
for n in count(1):
yield from [r.denominator for r in rats]
newrats = []
for r in rats:
f = 1+r
if f not in seen:
newrats.append(1+r)
seen.add(f)
if r != 0:
g = -1/r
if g not in seen:
newrats.append(-1/r)
seen.add(g)
rats = newrats
|
|
CROSSREFS
|
Cf. A226080 (rabbit ordering of positive rationals).
Cf. A226247 (analogous with "0 is in S").
|
|
KEYWORD
|
nonn,frac,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A172119
|
|
Sum the k preceding elements in the same column and add 1 every time.
|
|
+30
15
|
|
|
1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 4, 2, 1, 1, 5, 7, 4, 2, 1, 1, 6, 12, 8, 4, 2, 1, 1, 7, 20, 15, 8, 4, 2, 1, 1, 8, 33, 28, 16, 8, 4, 2, 1, 1, 9, 54, 52, 31, 16, 8, 4, 2, 1, 1, 10, 88, 96, 60, 32, 16, 8, 4, 2, 1, 1, 11, 143, 177, 116, 63, 32, 16, 8, 4, 2, 1, 1, 12, 232, 326, 224, 124, 64, 32, 16
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
Columns are related to Fibonacci n-step numbers. Are there closed forms for the sequences in the columns?
We denote by a(n,k) the number which is in the (n+1)-th row and (k+1)-th-column. With help of the definition, we also have the recurrence relation: a(n+k+1, k) = 2*a(n+k, k) - a(n, k). We see on the main diagonal the numbers 1,2,4, 8, ..., which is clear from the formula for the general term d(n)=2^n. - Richard Choulet, Jan 31 2010
Most of the paper by Dunkel (1925) is a study of the columns of this table. - Petros Hadjicostas, Jun 14 2019
|
|
LINKS
|
|
|
FORMULA
|
T(n,0) = 1.
T(n,1) = n.
The general term in the n-th row and k-th column is given by: a(n, k) = Sum_{j=0..floor(n/(k+1))} ((-1)^j binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j)). For example: a(5,3) = binomial(5,5)*2^5 - binomial(2,1)*2^1 = 28. The generating function of the (k+1)-th column satisfies: psi(k)(z)=1/(1-2*z+z^(k+1)) (for k=0 we have the known result psi(0)(z)=1/(1-z)). - Richard Choulet, Jan 31 2010 [By saying "(k+1)-th column" the author actually means "k-th column" for k = 0, 1, 2, ... - Petros Hadjicostas, Jul 26 2019]
|
|
EXAMPLE
|
Triangle begins:
n\k|....0....1....2....3....4....5....6....7....8....9...10
---|-------------------------------------------------------
0..|....1
1..|....1....1
2..|....1....2....1
3..|....1....3....2....1
4..|....1....4....4....2....1
5..|....1....5....7....4....2....1
6..|....1....6...12....8....4....2....1
7..|....1....7...20...15....8....4....2....1
8..|....1....8...33...28...16....8....4....2....1
9..|....1....9...54...52...31...16....8....4....2....1
10.|....1...10...88...96...60...32...16....8....4....2....1
|
|
MAPLE
|
for k from 0 to 20 do for n from 0 to 20 do b(n):=sum((-1)^j*binomial(n-k*j, n-(k+1)*j)*2^(n-(k+1)*j), j=0..floor(n/(k+1))):od: seq(b(n), n=0..20):od; # Richard Choulet, Jan 31 2010
option remember;
if k = 0 then
1;
elif k > n then
0;
else
1+add(procname(n-k+i, k), i=0..k-1) ;
end if;
end proc:
|
|
MATHEMATICA
|
T[_, 0] = 1; T[n_, n_] = 1; T[n_, k_] /; k>n = 0; T[n_, k_] := T[n, k] = Sum[T[n-k+i, k], {i, 0, k-1}] + 1;
Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten
Table[Sum[(-1)^j*2^(n-k-(k+1)*j)*Binomial[n-k-k*j, n-k-(k+1)*j], {j, 0, Floor[(n-k)/(k+1)]}], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Jul 27 2019 *)
|
|
PROG
|
(PARI) T(n, k) = if(k<0 || k>n, 0, k==1 && k==n, 1, 1 + sum(j=1, k, T(n-j, k)));
for(n=1, 12, for(k=0, n, print1(T(n, k), ", "))) \\ G. C. Greubel, Jul 27 2019
(Magma)
T:= func< n, k | (&+[(-1)^j*2^(n-k-(k+1)*j)*Binomial(n-k-k*j, n-k-(k+1)*j): j in [0..Floor((n-k)/(k+1))]]) >;
[[T(n, k): k in [0..n]]: n in [0..12]]; // G. C. Greubel, Jul 27 2019
(Sage)
@CachedFunction
def T(n, k):
if (k==0 and k==n): return 1
elif (k<0 or k>n): return 0
else: return 1 + sum(T(n-j, k) for j in (1..k))
[[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jul 27 2019
(GAP)
T:= function(n, k)
if k=0 and k=n then return 1;
elif k<0 or k>n then return 0;
else return 1 + Sum([1..k], j-> T(n-j, k));
fi;
end;
Flat(List([0..12], n-> List([0..n], k-> T(n, k) ))); # G. C. Greubel, Jul 27 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A184441
|
|
T(n,k)=Number of strings of numbers x(i=1..n) in 0..k with sum i*x(i)^2 equal to n*k^2
|
|
+30
15
|
|
|
1, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 2, 5, 3, 1, 1, 3, 5, 8, 4, 1, 1, 5, 10, 19, 17, 5, 1, 1, 5, 14, 32, 51, 31, 6, 1, 1, 5, 15, 39, 116, 130, 63, 8, 1, 2, 3, 14, 92, 238, 368, 359, 129, 10, 1, 1, 5, 28, 101, 436, 915, 1235, 946, 244, 12, 1, 1, 10, 23, 146, 715, 1993, 3532, 4321, 2333
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,6
|
|
COMMENTS
|
Table starts
..1...1....1.....1.....1......1......1.......1.......1.......1........1
..1...1....1.....1.....1......1......1.......1.......2.......1........1
..2...3....2.....3.....5......5......5.......3.......5......10........5
..2...5....5....10....14.....15.....14......28......23......46.......36
..3...8...19....32....39.....92....101.....146.....255.....255......315
..4..17...51...116...238....436....715....1160....1829....2466.....3591
..5..31..130...368...915...1993...3818....6805...11052...18352....28860
..6..63..359..1235..3532...9478..19257...38560...77476..126541...210018
..8.129..946..4321.15165..43638.109623..248861..513211..997735..1828762
.10.244.2333.13396.56094.187235.541179.1376999.3121413.6729888.13453502
|
|
LINKS
|
|
|
EXAMPLE
|
Some solutions for n=6 k=5
..4....5....3....5....1....5....4....2....2....1....1....3....3....5....5....4
..2....2....2....0....1....1....2....2....5....4....3....5....5....4....4....1
..5....2....3....0....2....5....1....4....2....3....0....3....5....1....2....2
..0....3....5....0....1....1....4....4....1....2....0....4....2....1....3....2
..3....3....0....5....5....2....1....2....4....2....5....0....0....4....3....4
..1....2....1....0....1....2....3....1....0....3....1....0....0....1....0....2
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A343658
|
|
Array read by antidiagonals where A(n,k) is the number of ways to choose a multiset of k divisors of n.
|
|
+30
14
|
|
|
1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 3, 3, 1, 1, 5, 4, 6, 2, 1, 1, 6, 5, 10, 3, 4, 1, 1, 7, 6, 15, 4, 10, 2, 1, 1, 8, 7, 21, 5, 20, 3, 4, 1, 1, 9, 8, 28, 6, 35, 4, 10, 3, 1, 1, 10, 9, 36, 7, 56, 5, 20, 6, 4, 1, 1, 11, 10, 45, 8, 84, 6, 35, 10, 10, 2, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
As a triangle, T(n,k) = number of ways to choose a multiset of n - k divisors of k.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
Array begins:
k=0 k=1 k=2 k=3 k=4 k=5 k=6 k=7 k=8
n=1: 1 1 1 1 1 1 1 1 1
n=2: 1 2 3 4 5 6 7 8 9
n=3: 1 2 3 4 5 6 7 8 9
n=4: 1 3 6 10 15 21 28 36 45
n=5: 1 2 3 4 5 6 7 8 9
n=6: 1 4 10 20 35 56 84 120 165
n=7: 1 2 3 4 5 6 7 8 9
n=8: 1 4 10 20 35 56 84 120 165
n=9: 1 3 6 10 15 21 28 36 45
Triangle begins:
1
1 1
1 2 1
1 3 2 1
1 4 3 3 1
1 5 4 6 2 1
1 6 5 10 3 4 1
1 7 6 15 4 10 2 1
1 8 7 21 5 20 3 4 1
1 9 8 28 6 35 4 10 3 1
1 10 9 36 7 56 5 20 6 4 1
1 11 10 45 8 84 6 35 10 10 2 1
For example, row n = 6 counts the following multisets:
{1,1,1,1,1} {1,1,1,1} {1,1,1} {1,1} {1} {}
{1,1,1,2} {1,1,3} {1,2} {5}
{1,1,2,2} {1,3,3} {1,4}
{1,2,2,2} {3,3,3} {2,2}
{2,2,2,2} {2,4}
{4,4}
Note that for n = 6, k = 4 in the triangle, the two multisets {1,4} and {2,2} represent the same divisor 4, so they are only counted once under A343656(4,2) = 5.
|
|
MATHEMATICA
|
multchoo[n_, k_]:=Binomial[n+k-1, k];
Table[multchoo[DivisorSigma[0, k], n-k], {n, 10}, {k, n}]
|
|
PROG
|
(PARI) A(n, k) = binomial(numdiv(n) + k - 1, k)
{ for(n=1, 9, for(k=0, 8, print1(A(n, k), ", ")); print ) } \\ Andrew Howroyd, Jan 11 2024
|
|
CROSSREFS
|
Column n = 4 of the array is A000217.
Column n = 6 of the array is A000292.
The distinct products of these multisets are counted by A343656.
Antidiagonal sums of the array (or row sums of the triangle) are A343661.
A009998(n,k) = n^k (as an array, offset 1).
A007318 counts k-sets of elements of {1..n}.
A059481 counts k-multisets of elements of {1..n}.
Cf. A000169, A062319, A067824, A143773, A146291, A176029, A285572, A326077, A327527, A334996, A343652, A343657.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A194005
|
|
Triangle of the coefficients of an (n+1)-th order differential equation associated with A103631.
|
|
+30
11
|
|
|
1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 3, 3, 1, 1, 5, 4, 6, 3, 1, 1, 6, 5, 10, 6, 4, 1, 1, 7, 6, 15, 10, 10, 4, 1, 1, 8, 7, 21, 15, 20, 10, 5, 1, 1, 9, 8, 28, 21, 35, 20, 15, 5, 1, 1, 10, 9, 36, 28, 56, 35, 35, 15, 6, 1, 1, 11, 10, 45, 36, 84, 56, 70, 35, 21, 6, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
This triangle is a companion to Parks' triangle A103631.
The coefficients of triangle A103631(n,k) appear in appendix 2 of Park’s remarkable article “A new proof of the Routh-Hurwitz stability criterion using the second method of Liapunov” if we assume that the b(n) coefficients are all equal to 1, see the second Maple program.
The a(n,k) coefficients of the triangle given above are related to the coefficients of a linear (n+1)-th order differential equation for the case b(n)=1, see the examples.
a(n,k) is also the number of symmetric binary strings of odd length n with Hamming weight k>0 and no consecutive 1's. - Christian Barrientos and Sarah Minion, Feb 27 2018
|
|
LINKS
|
|
|
FORMULA
|
a(n,k) = binomial(floor((2*n+1-k)/2), n-k).
a(n,k) = sum(A103631(n1,k), n1=k..n), 0<=k<=n and n>=0.
a(n,k) = sum(binomial(floor((2*n1-k-1)/2), n1-k), n1=k..n).
T(n,0) = T(n,n) = 1, T(n,k) = T(n-2,k-2) + T(n-1,k), 0 < k < n. - Reinhard Zumkeller, Nov 23 2012
|
|
EXAMPLE
|
For the 5th-order linear differential equation the coefficients a(k) are: a(0) = 1, a(1) = a(4,0) = 1, a(2) = a(4,1) = 4, a(3) = a(4,2) = 3, a(4) = a(4,3) = 3 and a(5) = a(4,4) = 1.
The corresponding Hurwitz matrices A(k) are, see Parks: A(5) = Matrix([[a(1),a(0),0,0,0], [a(3),a(2),a(1),a(0),0], [a(5),a(4),a(3),a(2),a(1)], [0,0,a(5),a(4),a(3)], [0,0,0,0,a(5)]]), A(4) = Matrix([[a(1),a(0),0,0], [a(3),a(2),a(1),a(0)], [a(5),a(4),a(3),a(2)], [0,0,a(5),a(4)]]), A(3) = Matrix([[a(1),a(0),0], [a(3),a(2),a(1)], [a(5),a(4),a(3)]]), A(2) = Matrix([[a(1),a(0)], [a(3),a(2)]]) and A(1) = Matrix([[a(1)]]).
The values of b(k) are, see Parks: b(1) = d(1), b(2) = d(2)/d(1), b(3) = d(3)/(d(1)*d(2)), b(4) = d(1)*d(4)/(d(2)*d(3)) and b(5) = d(2)*d(5)/(d(3)*d(4)).
These a(k) values lead to d(k) = 1 and subsequently to b(k) = 1 and this confirms our initial assumption, see the comments.
'
Triangle starts:
[0] 1;
[1] 1, 1;
[2] 1, 2, 1;
[3] 1, 3, 2, 1;
[4] 1, 4, 3, 3, 1;
[5] 1, 5, 4, 6, 3, 1;
[6] 1, 6, 5, 10, 6, 4, 1;
[7] 1, 7, 6, 15, 10, 10, 4, 1;
[8] 1, 8, 7, 21, 15, 20, 10, 5, 1;
[9] 1, 9, 8, 28, 21, 35, 20, 15, 5, 1;
|
|
MAPLE
|
A194005 := proc(n, k): binomial(floor((2*n+1-k)/2), n-k) end:
for n from 0 to 11 do seq(A194005(n, k), k=0..n) od;
seq(seq(A194005(n, k), k=0..n), n=0..11);
nmax:=11: for n from 0 to nmax+1 do b(n):=1 od:
A103631 := proc(n, k) option remember: local j: if k=0 and n=0 then b(1)
elif k=0 and n>=1 then 0 elif k=1 then b(n+1) elif k=2 then b(1)*b(n+1)
elif k>=3 then expand(b(n+1)*add(procname(j, k-2), j=k-2..n-2)) fi: end:
for n from 0 to nmax do for k from 0 to n do
seq(seq(A194005(n, k), k=0..n), n=0..nmax);
|
|
MATHEMATICA
|
Flatten[Table[Binomial[Floor[(2n+1-k)/2], n-k], {n, 0, 20}, {k, 0, n}]] (* Harvey P. Dale, Apr 15 2012 *)
|
|
PROG
|
(Haskell)
a194005 n k = a194005_tabl !! n !! k
a194005_row n = a194005_tabl !! n
a194005_tabl = [1] : [1, 1] : f [1] [1, 1] where
f row' row = rs : f row rs where
rs = zipWith (+) ([0, 1] ++ row') (row ++ [0])
|
|
CROSSREFS
|
Interesting diagonals: T(n,n-4) = A189976(n+5) and T(n,n-5) = A189980(n+6)
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A112739
|
|
Array counting nodes in rooted trees of height n in which the root and internal nodes have valency k (and the leaf nodes have valency one).
|
|
+30
10
|
|
|
1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 5, 2, 1, 1, 5, 10, 7, 2, 1, 1, 6, 17, 22, 9, 2, 1, 1, 7, 26, 53, 46, 11, 2, 1, 1, 8, 37, 106, 161, 94, 13, 2, 1, 1, 9, 50, 187, 426, 485, 190, 15, 2, 1, 1, 10, 65, 302, 937, 1706, 1457, 382, 17, 2, 1, 1, 11, 82, 457, 1814, 4687, 6826, 4373, 766, 19
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
Rows of the square array have g.f. (1+x)/((1-x)(1-kx)). They are the partial sums of the coordination sequences for the infinite tree of valency k. Row sums are A112740.
Rows of the square array are successively: A000012, A040000, A005408, A033484, A048473, A020989, A057651, A061801, A238275, A238276, A138894, A090843, A199023. - Philippe Deléham, Feb 22 2014
|
|
REFERENCES
|
L. He, X. Liu and G. Strang, (2003) Trees with Cantor Eigenvalue Distribution. Studies in Applied Mathematics 110 (2), 123-138.
L. He, X. Liu and G. Strang, Laplacian eigenvalues of growing trees, Proc. Conf. on Math. Theory of Networks and Systems, Perpignan (2000).
|
|
LINKS
|
|
|
FORMULA
|
As a square array read by antidiagonals, T(n, k)=sum{j=0..k, (2-0^j)*(n-1)^(k-j)}; T(n, k)=(n(n-1)^k-2)/(n-2), n<>2, T(2, n)=2n+1; T(n, k)=sum{j=0..k, (n(n-1)^j-0^j)/(n-1)}, j<>1. As a triangle read by rows, T(n, k)=if(k<=n, sum{j=0..k, (2-0^j)*(n-k-1)^(k-j)}, 0).
|
|
EXAMPLE
|
As a square array, rows begin
1,8,50,302,1814,10886,... (A061801)
As a number triangle, rows start
1;
1,1;
1,2,1;
1,3,2,1;
1,4,5,2,1;
1,5,10,7,2,1;
|
|
CROSSREFS
|
Cf. A112468, A000012, A040000, A005408, A033484, A048473, A020989, A057651, A061801, A238275, A238276, A138894, A090843, A199023.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.011 seconds
|