login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
Search: seq:1,1,0,1 seq:-2,0,1 seq:-6,6,0
(Hint: to search for an exact subsequence, use commas to separate the numbers.)
Displaying 1-10 of 21 results found. page 1 2 3
     Sort: relevance | references | number | modified | created      Format: long | short | data
A174294 Triangle T(n,k), read by rows, T(n,k) = (T(n-1,k-1) + T(n-2,k-1)) - (T(n-1,k) + T(n-2,k)), with T(n, 0) = T(n, k) = 1 and T(n, 1) = (n mod 2). +50
6
1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, -1, 0, 1, 1, 0, 0, 2, -2, 0, 1, 1, 1, 0, 0, 3, -3, 0, 1, 1, 0, 1, -2, 1, 4, -4, 0, 1, 1, 1, 0, 3, -6, 3, 5, -5, 0, 1, 1, 0, 0, 0, 6, -12, 6, 6, -6, 0, 1, 1, 1, 1, -3, 3, 9, -20, 10, 7, -7, 0, 1, 1, 0, 0, 4, -12, 12, 11, -30, 15, 8, -8, 0, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,25
LINKS
FORMULA
T(n,k) = (T(n-1,k-1) + T(n-2,k-1)) - (T(n-1,k) + T(n-2,k)), with T(n, 0) = T(n, k) = 1 and T(n, 1) = (n mod 2).
EXAMPLE
Table begins:
n\k|...0...1...2...3...4...5...6...7...8...9..10
---|--------------------------------------------
0..|...1
1..|...1...1
2..|...1...0...1
3..|...1...1...0...1
4..|...1...0...0...0...1
5..|...1...1...1..-1...0...1
6..|...1...0...0...2..-2...0...1
7..|...1...1...0...0...3..-3...0...1
8..|...1...0...1..-2...1...4..-4...0...1
9..|...1...1...0...3..-6...3...5..-5...0...1
10.|...1...0...0...0...6.-12...6...6..-6...0...1
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[k==0 || k==n, 1, If[k==1, Mod[n, 2], T[n-1, k-1] +T[n-2, k-1] -T[n-1, k] -T[n-2, k] ]]];
Table[T[n, k], {n, 0, 15}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 25 2021 *)
PROG
(Sage)
@CachedFunction
def T(n, k): # A174294
if (k<0 or k>n): return 0
elif (k==0 or k==n): return 1
elif (k==1): return n%2
else: return T(n-1, k-1) + T(n-2, k-1) - T(n-1, k) - T(n-2, k)
flatten([[T(n, k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Nov 25 2021
CROSSREFS
KEYWORD
sign,tabl
AUTHOR
Mats Granvik, Mar 15 2010
STATUS
approved
A114700 Triangle T, read by rows, such that the m-th matrix power satisfies T^m = I + m*(T - I), where T(n,k) = [T^-1](n-1,k) + [T^-1](n-1,k-1) for n>k>0, with T(n,0)=T(n,n)=1 for n>=0 and I is the identity matrix. +50
2
1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 0, 0, 0, 1, 1, -1, 0, 0, 1, 1, 1, 0, 1, 0, -1, 0, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 0, 2, 2, 0, -2, -2, 0, 1, 1, -1, -2, -4, -2, 2, 4, 2, 1, 1, 1, 0, 3, 6, 6, 0, -6, -6, -3, 0, 1, 1, -1, -3, -9, -12, -6, 6, 12, 9, 3, 1, 1, 1, 0, 4, 12, 21, 18, 0, -18, -21, -12, -4, 0, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,39
COMMENTS
The rows of this triangle are symmetric up to sign. Row sums = 2 after row 0. Unsigned row sums = A116466. Row squared sums = A116467. Central terms of odd rows: T(2*n+1,n+1) = |A064310(n)|.
LINKS
FORMULA
G.f.: A(x,y) = 1/(1-x*y)+ x*(1+x-2*x^2*y)/(1-x)/(1+x+x*y)/(1-x*y). G.f. of matrix power T^m: 1/(1-x*y)+ m*x*(1+x-2*x^2*y)/(1-x)/(1+x+x*y)/(1-x*y).
EXAMPLE
Matrix inverse is: T^-1 = 2*I - T.
Matrix log is: log(T) = T - I.
Triangle T begins:
1;
1, 1;
1, 0, 1;
1,-1, 1, 1;
1, 0, 0, 0, 1;
1,-1, 0, 0, 1, 1;
1, 0, 1, 0,-1, 0, 1;
1,-1,-1,-1, 1, 1, 1, 1;
1, 0, 2, 2, 0,-2,-2, 0, 1;
1,-1,-2,-4,-2, 2, 4, 2, 1, 1;
1, 0, 3, 6, 6, 0,-6,-6,-3, 0, 1;
1,-1,-3,-9,-12,-6, 6, 12, 9, 3, 1, 1;
1, 0, 4, 12, 21, 18, 0,-18,-21,-12,-4, 0, 1; ...
The g.f. of column k, C_k(x), obeys the recurrence:
C_k = C_{k-1} + (-1)^k*x*(1+2*x)/(1-x)/(1+x)^k with C_0 = 1/(1-x);
so that column g.f.s continue as:
C_1 = C_0 - x*(1+2*x)/(1-x)/(1+x),
C_2 = C_1 + x*(1+2*x)/(1-x)/(1+x)^2,
C_3 = C_2 - x*(1+2*x)/(1-x)/(1+x)^3, ...
PROG
(PARI) T(n, k)=local(x=X+X*O(X^n), y=Y+Y*O(Y^k)); polcoeff(polcoeff( 1/(1-x*y)+ x*(1+x-2*x^2*y)/(1-x)/(1+x+x*y)/(1-x*y), n, X), k, Y)
(PARI) T(n, k)=local(M=matrix(n+1, n+1)); for(r=1, n+1, for(c=1, r, M[r, c]=if(r==c, 1, if(c==1, 1, if(c>1, (2*M^0-M)[r-1, c-1])+(2*M^0-M)[r-1, c])))); return(M[n+1, k+1])
CROSSREFS
Cf. A116466 (unsigned row sums), A116467 (row squared sums), A064310 (central terms); A112555 (variant).
KEYWORD
sign,tabl
AUTHOR
Paul D. Hanna, Feb 19 2006
STATUS
approved
A276321 List of B-spline interpolation matrices M(n,i,j) of orders n >= 1 read by rows (0 <= i < n, 0 <= j < n). +50
2
1, -1, 1, 1, 0, 1, -2, 1, -2, 2, 0, 1, 1, 0, -1, 3, -3, 1, 3, -6, 3, 0, -3, 0, 3, 0, 1, 4, 1, 0, 1, -4, 6, -4, 1, -4, 12, -12, 4, 0, 6, -6, -6, 6, 0, -4, -12, 12, 4, 0, 1, 11, 11, 1, 0, -1, 5, -10, 10, -5, 1, 5, -20, 30, -20, 5, 0, -10, 20, 0, -20, 10, 0, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,7
COMMENTS
B-spline interpolation matrices of orders n >= 1. Each matrix M(i, j) is of dimensions n X n.
LINKS
T .C. I. Niessink, Matrices for n = 1..31
J. I. Craig, Notes on B-spline development, (spring 2004), 7.
T. C. I. Niessink, C source code, bigint (n >= 1).
Wikipedia, B-spline.
FORMULA
M(n, i, j) = C(n-1, i) * Sum_{m=j..n-1} (n-(m+1))^i * (-1)^(m-j) * C(n, m-j), where binomial coefficient C(n, k) = n! / (k!*(n-k)!).
EXAMPLE
The B-spline interpolation matrices for orders n = 1..4 are:
--
1
--
-1 1
1 0
--
1 -2 1
-2 2 0
1 1 0
--
-1 3 -3 1
3 -6 3 0
-3 0 3 0
1 4 1 0
--
These values can be used when implementing interpolation using b-splines. This is what the algorithm for order n = 2 (linear interpolation) looks like in pseudocode:
--
a0 = -1 * p[i] + 1 * p[i+1]
a1 = 1 * p[i] + 0 * p[i+1]
y = (u*a0 + a1) / (n-1)!
--
where u is in the [0, 1) range. And here is another example for order n = 4 (cubic interpolation):
--
a0 = -1 * p[i] + 3 * p[i+1] + -3 * p[i+2] + 1 * p[i+3]
a1 = 3 * p[i] + -6 * p[i+1] + 3 * p[i+2] + 0 * p[i+3]
a2 = -3 * p[i] + 0 * p[i+1] + 3 * p[i+2] + 0 * p[i+3]
a3 = 1 * p[i] + 4 * p[i+1] + 1 * p[i+2] + 0 * p[i+3]
y = (u^3*a0 + u^2*a1 + u*a2 + a3) / (n-1)!
--
You can optimize the algorithm by dividing all numbers in the matrix by (n-1)!, and then rewriting y as:
--
y = u*(u*(u*a0 + a1) + a2) + a3
PROG
(C)
int fact(int n)
{
int y = 1;
int i;
for (i = 1; i <= n; ++i) y *= i;
return y;
}
int ipow(int n, int p)
{
int y = 1;
int i;
for (i = 0; i < p; ++i) y *= n;
return y;
}
int C(int n, int k)
{
return fact(n) / (fact(k) * fact(n - k));
}
int M(int n, int i, int j)
{
int y = 0;
int m;
for (m = j; m < n; ++m)
{
y += ipow(n - (m + 1), i) * ipow(-1, m - j) * C(n, m - j);
}
return C(n - 1, i) * y;
}
(PARI) M(n, i, j) = binomial(n-1, i) * sum(m=j, n-1, (n-(m+1))^i * (-1)^(m-j) * binomial(n, m-j));
doM(n) = for (i=0, n-1, for (j=0, n-1, print1(M(n, i, j), ", ")); print());
tabf(nn) = for (n=1, nn, doM(n)); \\ Michel Marcus, Sep 06 2016
CROSSREFS
Cf. A007318.
KEYWORD
sign,tabf
AUTHOR
Theo Niessink, Aug 30 2016
STATUS
approved
A293386 Square array A(n,k), n >= 0, k >= 0, read by antidiagonals, where column k is the expansion of g.f. Product_{i>0} 1/(1 + Sum_{j=1..k} j*x^(j*i))^2. +50
1
1, 1, 0, 1, -2, 0, 1, -2, 1, 0, 1, -2, -3, -2, 0, 1, -2, -3, 10, 4, 0, 1, -2, -3, 4, -4, -4, 0, 1, -2, -3, 4, 14, -20, 5, 0, 1, -2, -3, 4, 6, -8, 41, -6, 0, 1, -2, -3, 4, 6, 16, -46, 2, 9, 0, 1, -2, -3, 4, 6, 6, -30, 14, -111, -12, 0, 1, -2, -3, 4, 6, 6, 0, -58 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
EXAMPLE
Square array begins:
1, 1, 1, 1, 1, ...
0, -2, -2, -2, -2, ...
0, 1, -3, -3, -3, ...
0, -2, 10, 4, 4, ...
0, 4, -4, 14, 6, ...
0, -4, -20, -8, 16, ...
CROSSREFS
Columns k=0..1 give A000007, A022597.
Rows n=0 gives A000012.
Main diagonal gives A252650.
Product_{i>0} (1 + Sum_{j=1..k} j*x^(j*i))^m: this sequence (m=-2), A290217 (m=-1), A290216 (m=1), A293377 (m=2).
KEYWORD
sign,tabl
AUTHOR
Seiichi Manyama, Oct 07 2017
STATUS
approved
A054054 Smallest digit of n. +40
49
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
a(n) = 0 for almost all n. - Charles R Greathouse IV, Oct 02 2013
More precisely, a(n) = 0 asymptotically almost surely, i.e., except for a set of density 0: As the number of digits of n grows, the probability of having no zero digit goes to zero as 0.9^(length of n), although there are infinitely many counterexamples. - M. F. Hasler, Oct 11 2015
LINKS
FORMULA
a(A011540(n)) = 0; a(A052382(n)) > 0. - Reinhard Zumkeller, Apr 25 2012
a(n) = A262188(n,0). - Reinhard Zumkeller, Sep 14 2015
a(n) = 0 iff A007954(n) = 0. - M. F. Hasler, Oct 11 2015
a(n) = 9 - A054055(A061601(n)). - Robert Israel, Jul 07 2016
EXAMPLE
a(12) = 1 because 1 < 2.
MAPLE
seq(min(convert(n, base, 10)), n=0..100); # Robert Israel, Jul 07 2016
MATHEMATICA
A054054[n_]:=Min[IntegerDigits[n]]
PROG
(Haskell)
a054054 = f 9 where
f m x | x <= 9 = min m x
| otherwise = f (min m d) x' where (x', d) = divMod x 10
-- Reinhard Zumkeller, Jun 20 2012, Apr 25 2012
(PARI) A054054(n)=if(n, vecmin(digits(n))) \\ or: Set(digits(n))[1]. - M. F. Hasler, Jan 23 2013
CROSSREFS
Cf. A054055.
KEYWORD
base,easy,nonn
AUTHOR
Henry Bottomley, Apr 29 2000
EXTENSIONS
Edited by M. F. Hasler, Oct 11 2015
STATUS
approved
A072574 Triangle T(n,k) of number of compositions (ordered partitions) of n into exactly k distinct parts, 1<=k<=n. +40
19
1, 1, 0, 1, 2, 0, 1, 2, 0, 0, 1, 4, 0, 0, 0, 1, 4, 6, 0, 0, 0, 1, 6, 6, 0, 0, 0, 0, 1, 6, 12, 0, 0, 0, 0, 0, 1, 8, 18, 0, 0, 0, 0, 0, 0, 1, 8, 24, 24, 0, 0, 0, 0, 0, 0, 1, 10, 30, 24, 0, 0, 0, 0, 0, 0, 0, 1, 10, 42, 48, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 48, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 60, 120, 0 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
If terms in the compositions did not need to be distinct then the triangle would have values C(n-1,k-1), essentially A007318 offset.
LINKS
Joerg Arndt, Table of n, a(n) for n = 1..5050 (rows 1..100, flattened).
B. Richmond and A. Knopfmacher, Compositions with distinct parts, Aequationes Mathematicae 49 (1995), pp. 86-97.
FORMULA
T(n, k) = T(n-k, k)+k*T(n-k, k-1) [with T(n, 0)=1 if n=0 and 0 otherwise] = A000142(k)*A060016(n, k).
G.f.: sum(n>=0, n! * z^n * q^((n^2+n)/2) / prod(k=1..n, 1-q^k ) ), rows by powers of q, columns by powers of z; includes row 0 (drop term for n=0 for this triangle, see PARI code); setting z=1 gives g.f. for A032020. [Joerg Arndt, Oct 20 2012]
EXAMPLE
T(6,2)=4 since 6 can be written as 1+5=2+4=4+2=5+1.
Triangle starts (trailing zeros omitted for n>=10):
[ 1] 1;
[ 2] 1, 0;
[ 3] 1, 2, 0;
[ 4] 1, 2, 0, 0;
[ 5] 1, 4, 0, 0, 0;
[ 6] 1, 4, 6, 0, 0, 0;
[ 7] 1, 6, 6, 0, 0, 0, 0;
[ 8] 1, 6, 12, 0, 0, 0, 0, 0;
[ 9] 1, 8, 18, 0, 0, 0, 0, 0, 0;
[10] 1, 8, 24, 24, 0, 0, ...;
[11] 1, 10, 30, 24, 0, 0, ...;
[12] 1, 10, 42, 48, 0, 0, ...;
[13] 1, 12, 48, 72, 0, 0, ...;
[14] 1, 12, 60, 120, 0, 0, ...;
[15] 1, 14, 72, 144, 120, 0, 0, ...;
[16] 1, 14, 84, 216, 120, 0, 0, ...;
[17] 1, 16, 96, 264, 240, 0, 0, ...;
[18] 1, 16, 114, 360, 360, 0, 0, ...;
[19] 1, 18, 126, 432, 600, 0, 0, ...;
[20] 1, 18, 144, 552, 840, 0, 0, ...;
These rows (without the zeros) are shown in the Richmond/Knopfmacher reference.
From Gus Wiseman, Oct 17 2022: (Start)
Column n = 8 counts the following compositions.
(8) (1,7) (1,2,5)
(2,6) (1,3,4)
(3,5) (1,4,3)
(5,3) (1,5,2)
(6,2) (2,1,5)
(7,1) (2,5,1)
(3,1,4)
(3,4,1)
(4,1,3)
(4,3,1)
(5,1,2)
(5,2,1)
(End)
MATHEMATICA
Table[Length[Select[Join@@Permutations/@Select[IntegerPartitions[n], UnsameQ@@#&], Length[#]==k&]], {n, 0, 15}, {k, 1, n}] (* Gus Wiseman, Oct 17 2022 *)
PROG
(PARI)
N=21; q='q+O('q^N);
gf=sum(n=0, N, n! * z^n * q^((n^2+n)/2) / prod(k=1, n, 1-q^k ) );
/* print triangle: */
gf -= 1; /* remove row zero */
P=Pol(gf, 'q);
{ for (n=1, N-1,
p = Pol(polcoeff(P, n), 'z);
p += 'z^(n+1); /* preserve trailing zeros */
v = Vec(polrecip(p));
v = vector(n, k, v[k]); /* trim to size n */
print(v);
); }
/* Joerg Arndt, Oct 20 2012 */
CROSSREFS
Columns (offset) include A057427 and A052928.
Row sums are A032020.
A008289 is the version for partitions (zeros removed).
A072575 counts strict compositions by maximum.
A097805 is the non-strict version, or A007318 (zeros removed).
A113704 is the constant instead of strict version.
A216652 is a condensed version (zeros removed).
A336131 counts splittings of partitions with distinct sums.
A336139 counts strict compositions of each part of a strict composition.
KEYWORD
nonn,tabl
AUTHOR
Henry Bottomley, Jun 21 2002
STATUS
approved
A056557 Second tetrahedral coordinate. +40
18
0, 0, 1, 1, 0, 1, 1, 2, 2, 2, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,8
COMMENTS
If {(X,Y,Z)} are triples of nonnegative integers with X >= Y >= Z ordered by X, Y and Z, then X=A056556(n), Y=A056557(n) and Z=A056558(n)
LINKS
FORMULA
a(n) = floor((sqrt(8*(n-A056556(n)*(A056556(n)+1)*(A056556(n)+2)/6)+1)-1)/2) = A003056(n-A000292(A056556(n)-1)).
a(n+1) = 0 if A056556(n) = A056558(n); a(n+1) = a(n)+1 if a(n) = A056558(n); otherwise a(n+1) = a(n). - Graeme McRae, Jan 09 2007
CROSSREFS
See also A194847, A194848.
KEYWORD
nonn
AUTHOR
Henry Bottomley, Jun 26 2000
STATUS
approved
A265609 Array read by ascending antidiagonals: A(n,k) the rising factorial, also known as Pochhammer symbol, for n >= 0 and k >= 0. +40
16
1, 1, 0, 1, 1, 0, 1, 2, 2, 0, 1, 3, 6, 6, 0, 1, 4, 12, 24, 24, 0, 1, 5, 20, 60, 120, 120, 0, 1, 6, 30, 120, 360, 720, 720, 0, 1, 7, 42, 210, 840, 2520, 5040, 5040, 0, 1, 8, 56, 336, 1680, 6720, 20160, 40320, 40320, 0 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,8
COMMENTS
The Pochhammer function is defined P(x,n) = x*(x+1)*...*(x+n-1). By convention P(0,0) = 1.
From Antti Karttunen, Dec 19 2015: (Start)
Apart from the initial row of zeros, if we discard the leftmost column and divide the rest of terms A(n,k) with (n+k) [where k is now the once-decremented column index of the new, shifted position] we get the same array back. See the given recursive formula.
When the numbers in array are viewed in factorial base (A007623), certain repeating patterns can be discerned, at least in a few of the topmost rows. See comment in A001710 and arrays A265890, A265892. (End)
A(n,k) is the k-th moment (about 0) of a gamma (Erlang) distribution with shape parameter n and rate parameter 1. - Geoffrey Critzer, Dec 24 2018
REFERENCES
Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Mathematics, Addison-Wesley, 1994.
H. S. Wall, Analytic Theory of Continued Fractions, Chelsea 1973, p. 355.
LINKS
NIST Digital Library of Mathematical Functions, Pochhammer's Symbol
FORMULA
A(n,k) = Gamma(n+k)/Gamma(n) for n > 0 and n^k for n=0.
A(n,k) = Sum_{j=0..k} n^j*S1(k,j), S1(n,k) the Stirling cycle numbers A132393(n,k).
A(n,k) = (k-1)!/(Sum_{j=0..k-1} (-1)^j*binomial(k-1, j)/(j+n)) for n >= 1, k >= 1.
A(n,k) = (n+k-1)*A(n,k-1) for k >= 1, A(n,0) = 1. - Antti Karttunen, Dec 19 2015
E.g.f. for row k: 1/(1-x)^k. - Geoffrey Critzer, Dec 24 2018
A(n, k) = FallingFactorial(n + k - 1, k). - Peter Luschny, Mar 22 2022
G.f. for row n as a continued fraction of Stieltjes type: 1/(1 - n*x/(1 - x/(1 - (n+1)*x/(1 - 2*x/(1 - (n+2)*x/(1 - 3*x/(1 - ... ))))))). See Wall, Chapter XVIII, equation 92.5. Cf. A226513. - Peter Bala, Aug 27 2023
EXAMPLE
Square array A(n,k) [where n=row, k=column] is read by ascending antidiagonals as:
A(0,0), A(1,0), A(0,1), A(2,0), A(1,1), A(0,2), A(3,0), A(2,1), A(1,2), A(0,3), ...
Array starts:
n\k [0 1 2 3 4 5 6 7 8]
--------------------------------------------------------------
[0] [1, 0, 0, 0, 0, 0, 0, 0, 0]
[1] [1, 1, 2, 6, 24, 120, 720, 5040, 40320]
[2] [1, 2, 6, 24, 120, 720, 5040, 40320, 362880]
[3] [1, 3, 12, 60, 360, 2520, 20160, 181440, 1814400]
[4] [1, 4, 20, 120, 840, 6720, 60480, 604800, 6652800]
[5] [1, 5, 30, 210, 1680, 15120, 151200, 1663200, 19958400]
[6] [1, 6, 42, 336, 3024, 30240, 332640, 3991680, 51891840]
[7] [1, 7, 56, 504, 5040, 55440, 665280, 8648640, 121080960]
[8] [1, 8, 72, 720, 7920, 95040, 1235520, 17297280, 259459200]
.
Seen as a triangle, T(n, k) = Pochhammer(n - k, k), the first few rows are:
[0] 1;
[1] 1, 0;
[2] 1, 1, 0;
[3] 1, 2, 2, 0;
[4] 1, 3, 6, 6, 0;
[5] 1, 4, 12, 24, 24, 0;
[6] 1, 5, 20, 60, 120, 120, 0;
[7] 1, 6, 30, 120, 360, 720, 720, 0;
[8] 1, 7, 42, 210, 840, 2520, 5040, 5040, 0;
[9] 1, 8, 56, 336, 1680, 6720, 20160, 40320, 40320, 0.
MAPLE
for n from 0 to 8 do seq(pochhammer(n, k), k=0..8) od;
MATHEMATICA
Table[Pochhammer[n, k], {n, 0, 8}, {k, 0, 8}]
PROG
(Sage)
for n in (0..8): print([rising_factorial(n, k) for k in (0..8)])
(Scheme)
(define (A265609 n) (A265609bi (A025581 n) (A002262 n)))
(define (A265609bi row col) (if (zero? col) 1 (* (+ row col -1) (A265609bi row (- col 1)))))
;; Antti Karttunen, Dec 19 2015
CROSSREFS
Triangle giving terms only up to column k=n: A124320.
Row 0: A000007, row 1: A000142, row 3: A001710 (from k=1 onward, shifted two terms left).
Column 0: A000012, column 1: A001477, column 2: A002378, columns 3-7: A007531, A052762, A052787, A053625, A159083 (shifted 2 .. 6 terms left respectively, i.e. without the extra initial zeros), column 8: A239035.
Row sums of the triangle: A000522.
A(n, n) = A000407(n-1) for n>0.
2^n*A(1/2,n) = A001147(n).
Cf. also A007623, A008279 (falling factorial), A173333, A257505, A265890, A265892.
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Dec 19 2015
STATUS
approved
A174295 Matrix inverse of A174294. +40
6
1, -1, 1, -1, 0, 1, 0, -1, 0, 1, -1, 0, 0, 0, 1, 1, -2, -1, 1, 0, 1, -3, 2, 0, -2, 2, 0, 1, 6, -7, -3, 3, -3, 3, 0, 1, -15, 14, 3, -10, 7, -4, 4, 0, 1, 36, -37, -12, 19, -19, 12, -5, 5, 0, 1, -91, 90, 24, -54, 42, -30, 18, -6, 6, 0, 1, 232, -233, -67, 127, -115, 73, -43, 25, -7, 7 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,17
COMMENTS
First column is a signed version of A099323 with an additional leading 1.
First 5 rows as in A054525.
LINKS
FORMULA
Sum_{k=0..n} T(n, k) = A000007(n).
T(n, 0) = A174297(n).
EXAMPLE
Table begins:
n\k|...0...1...2...3...4...5...6...7...8...9..10
---|--------------------------------------------
0..|...1
1..|..-1...1
2..|..-1...0...1
3..|...0..-1...0...1
4..|..-1...0...0...0...1
5..|...1..-2..-1...1...0...1
6..|..-3...2...0..-2...2...0...1
7..|...6..-7..-3...3..-3...3...0...1
8..|.-15..14...3.-10...7..-4...4...0...1
9..|..36.-37.-12..19.-19..12..-5...5...0...1
10.|.-91..90..24.-54..42.-30..18..-6...6...0...1
MATHEMATICA
t[n_, k_]:= t[n, k]= If[k<0 || k>n, 0, If[k==0 || k==n, 1, If[k==1, Mod[n, 2], t[n-1, k-1] +t[n-2, k-1] -t[n-1, k] -t[n-2, k] ]]]; (* t = A174294 *)
M:= With[{m=30}, Table[t[n, k], {n, 0, m}, {k, 0, m}]];
T:= Inverse[M];
Table[T[[n+1, k+1]], {n, 0, 15}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 25 2021 *)
CROSSREFS
KEYWORD
sign,tabl
AUTHOR
Mats Granvik, Mar 15 2010
STATUS
approved
A115353 The mode of the digits of n (using smallest mode if multimodal). +40
4
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
a(101)=1 and A054054(101)=0, but all previous terms are equivalent.
LINKS
EXAMPLE
a(12)=1 because 1, 2, the digits of 12, each occur the same number of times and 1 is the smaller of the two modes.
a(101)=1 because 1 is the unique mode of 1, 0, 1 (occurring twice while 0 appears only once).
MATHEMATICA
a[n_] := Min[Commonest[IntegerDigits[n]]]; Array[a, 105, 0] (* Stefano Spezia, Jan 08 2023 *)
PROG
(MATLAB)
function nth_term=A115353(n)
nth_term=mode((num2str(n)-'0'));
end
sequence = arrayfun(@A115353, linspace(0, 105, 106))
% Bence Bernáth, Jan 06 2023
(Python)
from statistics import mode
def a(n): return int(mode(sorted(str(n))))
print([a(n) for n in range(105)]) # Michael S. Branicky, Jan 08 2023
CROSSREFS
Cf. A054054 (Smallest digit of n).
KEYWORD
base,nonn
AUTHOR
Rick L. Shepherd, Jan 21 2006
STATUS
approved
page 1 2 3

Search completed in 2.801 seconds

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 29 15:42 EDT 2024. Contains 373851 sequences. (Running on oeis4.)