Search: 1 1 seq:-1 1 seq:-2,1,1 seq:-3 3 seq:-2
(Hint: to search for an exact subsequence, use commas to separate the numbers.)
|
|
A108299
|
|
Triangle read by rows, 0 <= k <= n: T(n,k) = binomial(n-[(k+1)/2],[k/2])*(-1)^[(k+1)/2].
|
|
+120
57
|
|
|
1, 1, -1, 1, -1, -1, 1, -1, -2, 1, 1, -1, -3, 2, 1, 1, -1, -4, 3, 3, -1, 1, -1, -5, 4, 6, -3, -1, 1, -1, -6, 5, 10, -6, -4, 1, 1, -1, -7, 6, 15, -10, -10, 4, 1, 1, -1, -8, 7, 21, -15, -20, 10, 5, -1, 1, -1, -9, 8, 28, -21, -35, 20, 15, -5, -1, 1, -1, -10, 9, 36, -28, -56, 35, 35, -15, -6, 1, 1, -1, -11, 10, 45, -36, -84, 56, 70
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,9
|
|
COMMENTS
|
Let L(n,x) = Sum_{k=0..n} T(n,k)*x^(n-k) and Pi=3.14...:
L(n,x) = Product_{k=1..n} (x - 2*cos((2*k-1)*Pi/(2*n+1)));
Sum_{k=0..n} T(n,k) = L(n,1) = A010892(n+1);
Sum_{k=0..n} abs(T(n,k)) = A000045(n+2);
T(2*n,k) + T(2*n+1,k+1) = 0 for 0 <= k <= 2*n;
T(n,0) = A000012(n) = 1; T(n,1) = -1 for n > 0;
T(n,2) = -(n-1) for n > 1; T(n,3) = A000027(n)=n for n > 2;
T(n,n-3) = A058187(n-3)*(-1)^floor(n/2) for n > 2;
T(n,n-2) = A008805(n-2)*(-1)^floor((n+1)/2) for n > 1;
T(n,n-1) = A008619(n-1)*(-1)^floor(n/2) for n > 0;
T(n,n) = L(n,0) = (-1)^floor((n+1)/2);
L(n,2) = 1; L(n,-2) = A005408(n)*(-1)^n;
Row n of the matrix inverse (A124645) has g.f.: x^floor(n/2)*(1-x)^(n-floor(n/2)). - Paul D. Hanna, Jun 12 2005
Conjecture: Let N=2*n+1, with n > 2. Then T(n,k) (0 <= k <= n) gives the k-th coefficient in the characteristic function p_N(x)=0, of degree n in x, for the n X n tridiagonal unit-primitive matrix G_N (see [Jeffery]) of the form
G_N=A_{N,1}=
(0 1 0 ... 0)
(1 0 1 0 ... 0)
(0 1 0 1 0 ... 0)
...
(0 ... 0 1 0 1)
(0 ... 0 1 1),
with solutions phi_j = 2*cos((2*j-1)*Pi/N), j=1,2,...,n. For example, for n=3,
G_7=A_{7,1}=
(0 1 0)
(1 0 1)
(0 1 1).
We have {T(3,k)}=(1,-1,-2,1), while the characteristic function of G_7 is p(x) = x^3-x^2-2*x+1 = 0, with solutions phi_j = 2*cos((2*j-1)*Pi/7), j=1,2,3. (End)
The roots to the polynomials are chaotic using iterates of the operation (x^2 - 2), with cycle lengths L and initial seeds returning to the same term or (-1)* the seed. Periodic cycle lengths L are shown in A003558 such that for the polynomial represented by row r, the cycle length L is A003558(r-1). The matrices corresponding to the rows as characteristic polynomials are likewise chaotic [cf. Kappraff et al., 2005] with the same cycle lengths but substituting 2*I for the "2" in (x^2 - 2), where I = the Identity matrix. For example, the roots to x^3 - x^2 - 2x + 1 = 0 are 1.801937..., -1.246979..., and 0.445041... With 1.801937... as the initial seed and using (x^2 - 2), we obtain the 3-period trajectory of 8.801937... -> 1.246979... -> -0.445041... (returning to -1.801937...). We note that A003558(2) = 3. The corresponding matrix M is: [0,1,0; 1,0,1; 0,1,1,]. Using seed M with (x^2 - 2*I), we obtain the 3-period with the cycle completed at (-1)*M. - Gary W. Adamson, Feb 07 2012
|
|
REFERENCES
|
Friedrich L. Bauer, 'De Moivre und Lagrange: Cosinus eines rationalen Vielfachen von Pi', Informatik Spektrum 28 (Springer, 2005).
Jay Kappraff, S. Jablan, G. Adamson, & R. Sazdonovich: "Golden Fields, Generalized Fibonacci Sequences, & Chaotic Matrices"; FORMA, Vol 19, No 4, (2005).
|
|
LINKS
|
|
|
FORMULA
|
T(n,k) = binomial(n-floor((k+1)/2),floor(k/2))*(-1)^floor((k+1)/2).
T(n+1, k) = if sign(T(n, k-1))=sign(T(n, k)) then T(n, k-1)+T(n, k) else -T(n, k-1) for 0 < k < n, T(n, 0) = 1, T(n, n) = (-1)^floor((n+1)/2).
G.f.: A(x, y) = (1 - x*y)/(1 - x + x^2*y^2). - Paul D. Hanna, Jun 12 2005
The generating polynomial (in z) of row n >= 0 is (u^(2*n+1) + v^(2*n+1))/(u + v), where u and v are defined by u^2 + v^2 = 1 and u*v = z. - Emeric Deutsch, Jun 16 2011
|
|
EXAMPLE
|
Triangle begins:
1;
1, -1;
1, -1, -1;
1, -1, -2, 1;
1, -1, -3, 2, 1;
1, -1, -4, 3, 3, -1;
1, -1, -5, 4, 6, -3, -1;
1, -1, -6, 5, 10, -6, -4, 1;
1, -1, -7, 6, 15, -10, -10, 4, 1;
1, -1, -8, 7, 21, -15, -20, 10, 5, -1;
1, -1, -9, 8, 28, -21, -35, 20, 15, -5, -1;
1, -1, -10, 9, 36, -28, -56, 35, 35, -15, -6, 1;
...
|
|
MAPLE
|
A108299 := proc(n, k): binomial(n-floor((k+1)/2), floor(k/2))*(-1)^floor((k+1)/2) end: seq(seq(A108299 (n, k), k=0..n), n=0..11); # Johannes W. Meijer, Aug 08 2011
|
|
MATHEMATICA
|
t[n_, k_?EvenQ] := I^k*Binomial[n-k/2, k/2]; t[n_, k_?OddQ] := -I^(k-1)*Binomial[n+(1-k)/2-1, (k-1)/2]; Table[t[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 16 2013 *)
|
|
PROG
|
(PARI) {T(n, k)=polcoeff(polcoeff((1-x*y)/(1-x+x^2*y^2+x^2*O(x^n)), n, x)+y*O(y^k), k, y)} (Hanna)
(Haskell)
a108299 n k = a108299_tabl !! n !! k
a108299_row n = a108299_tabl !! n
a108299_tabl = [1] : iterate (\row ->
zipWith (+) (zipWith (*) ([0] ++ row) a033999_list)
(zipWith (*) (row ++ [0]) a059841_list)) [1, -1]
|
|
CROSSREFS
|
Triangle sums (see the comments): A193884 (Kn11), A154955 (Kn21), A087960 (Kn22), A000007 (Kn3), A010892 (Fi1), A134668 (Fi2), A078031 (Ca2), A193669 (Gi1), A001519 (Gi3), A193885 (Ze1), A050935 (Ze3). - Johannes W. Meijer, Aug 08 2011
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A112468
|
|
Riordan array (1/(1-x), x/(1+x)).
|
|
+120
31
|
|
|
1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 0, 2, -2, 1, 1, 1, -2, 4, -3, 1, 1, 0, 3, -6, 7, -4, 1, 1, 1, -3, 9, -13, 11, -5, 1, 1, 0, 4, -12, 22, -24, 16, -6, 1, 1, 1, -4, 16, -34, 46, -40, 22, -7, 1, 1, 0, 5, -20, 50, -80, 86, -62, 29, -8, 1, 1, 1, -5, 25, -70, 130, -166, 148, -91, 37, -9, 1, 1, 0, 6, -30, 95, -200, 296, -314, 239, -128, 46, -10, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,13
|
|
COMMENTS
|
Row sums are A040000. Diagonal sums are A112469. Inverse is A112467. Row sums of k-th power are 1, k+1, k+1, k+1, .... Note that C(n,k) = Sum_{j=0..n-k} C(n-j-1, n-k-j).
Equals row reversal of triangle A112555 up to sign, where log(A112555) = A112555 - I. Unsigned row sums equals A052953 (Jacobsthal numbers + 1). Central terms of even-indexed rows are a signed version of A072547. Sums of squared terms in rows yields A112556, which equals the first differences of the unsigned central terms. - Paul D. Hanna, Jan 20 2006
Sum_{k=0..n} T(n,k)*x^k = A000012(n), A040000(n), A005408(n), A033484(n), A048473(n), A020989(n), A057651(n), A061801(n), A238275(n), A238276(n), A138894(n), A090843(n), A199023(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 respectively (see the square array in A112739). - Philippe Deléham, Feb 22 2014
|
|
LINKS
|
Emeric Deutsch, L. Ferrari and S. Rinaldi, Production Matrices, Advances in Applied Mathematics, 34 (2005) pp. 101-122.
|
|
FORMULA
|
Triangle T(n,k) read by rows: T(n,0)=1, T(n,k) = T(n-1,k-1) - T(n-1,k). - Mats Granvik, Mar 15 2010
Number triangle T(n, k)= Sum_{j=0..n-k} C(n-j-1, n-k-j)*(-1)^(n-k-j).
G.f. of matrix power T^m: (1+(m-1)*x)*(1+m*x)/(1+m*x-x*y)/(1-x). G.f. of matrix log: x*(1-2*x*y+x^2*y)/(1-x*y)^2/(1-x). - Paul D. Hanna, Jan 20 2006
T(n, k) = R(n,n-k,-1) where R(n,k,m) = (1-m)^(-n+k)-m^(k+1)*Pochhammer(n-k,k+1)*hyper2F1([1,n+1],[k+2],m)/(k+1)!. - Peter Luschny, Jul 25 2014
|
|
EXAMPLE
|
Triangle starts
1;
1, 1;
1, 0, 1;
1, 1, -1, 1;
1, 0, 2, -2, 1;
1, 1, -2, 4, -3, 1;
1, 0, 3, -6, 7, -4, 1;
Matrix log begins:
0;
1, 0;
1, 0, 0;
1, 1, -1, 0;
1, 1, 1, -2, 0;
1, 1, 1, 1, -3, 0; ...
Production matrix begins
1, 1,
0, -1, 1,
0, 0, -1, 1,
0, 0, 0, -1, 1,
0, 0, 0, 0, -1, 1,
0, 0, 0, 0, 0, -1, 1,
0, 0, 0, 0, 0, 0, -1, 1.
|
|
MAPLE
|
T := (n, k, m) -> (1-m)^(-n+k)-m^(k+1)*pochhammer(n-k, k+1)*hypergeom( [1, n+1], [k+2], m)/(k+1)!; A112468 := (n, k) -> T(n, n-k, -1);
|
|
MATHEMATICA
|
T[n_, 0] = 1; T[n_, n_] = 1; T[n_, k_ ]:= T[n, k] = T[n-1, k-1] - T[n-1, k]; Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* Jean-François Alcover, Mar 06 2013 *)
|
|
PROG
|
(PARI) {T(n, k)=local(m=1, x=X+X*O(X^n), y=Y+Y*O(Y^k)); polcoeff(polcoeff((1+(m-1)*x)*(1+m*x)/(1+m*x-x*y)/(1-x), n, X), k, Y)} \\ Paul D. Hanna, Jan 20 2006
(Haskell)
a112468 n k = a112468_tabl !! n !! k
a112468_row n = a112468_tabl !! n
a112468_tabl = iterate (\xs -> zipWith (-) ([2] ++ xs) (xs ++ [0])) [1]
(PARI) T(n, k) = if(k==0 || k==n, 1, T(n-1, k-1) - T(n-1, k)); \\ G. C. Greubel, Nov 13 2019
(Magma)
function T(n, k)
if k eq 0 or k eq n then return 1;
else return T(n-1, k-1) - T(n-1, k);
end if;
return T;
end function;
[T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 13 2019
(Sage)@CachedFunction
def T(n, k):
if (k<0 or n<0): return 0
elif (k==0 or k==n): return 1
else: return T(n-1, k-1) - T(n-1, k)
[[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 13 2019
(GAP)
T:= function(n, k)
if k=0 or k=n then return 1;
else return T(n-1, k-1) - T(n-1, k);
fi;
end;
Flat(List([0..12], n-> List([0..n], k-> T(n, k) ))); # G. C. Greubel, Nov 13 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A055870
|
|
Signed Fibonomial triangle.
|
|
+120
27
|
|
|
1, 1, -1, 1, -1, -1, 1, -2, -2, 1, 1, -3, -6, 3, 1, 1, -5, -15, 15, 5, -1, 1, -8, -40, 60, 40, -8, -1, 1, -13, -104, 260, 260, -104, -13, 1, 1, -21, -273, 1092, 1820, -1092, -273, 21, 1, 1, -34, -714, 4641, 12376, -12376, -4641, 714, 34, -1, 1, -55, -1870, 19635, 85085, -136136, -85085, 19635, 1870, -55, -1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,8
|
|
COMMENTS
|
Row n+1 (n >= 1) of the signed triangle lists the coefficients of the recursion relation for the n-th power of Fibonacci numbers A000045: sum(a(n+1,m)*(F(k-m))^n,m=0..n+1) = 0, k >= n+1; inputs: (F(k))^n, k=0..n.
The inverse of the row polynomial p(n,x) := sum(a(n,m)*x^m,m=0..n) is the g.f. for the column m=n-1 of the Fibonomial triangle A010048.
The row polynomials p(n,x) factorize according to p(n,x)=G(n-1)*p(n-2,-x), with inputs p(0,x)= 1, p(1,x)= 1-x and G(n) := 1-L(n)*x+(-1)^n*x^2, with L(n)=A000032(n) (Lucas). (Derived from Riordan's result and Knuth's exercise).
The row polynomials are the characteristic polynomials of product of the binomial matrix binomial(i,j) and the exchange matrix J_n (matrix with 1's on the antidiagonal, 0 elsewhere). - Paul Barry, Oct 05 2004
|
|
REFERENCES
|
D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, 1969, Vol. 1, pp. 84-5 and 492.
|
|
LINKS
|
|
|
FORMULA
|
a(n, m)=(-1)^floor((m+1)/2)*A010048(n, m). A010048(n, m)=: fibonomial(n, m).
G.f. for column m: (-1)^floor((m+1)/2)*x^m/p(m+1, x) with the row polynomial of the (signed) triangle: p(n, x) := sum(a(n, m)*x^m, m=0..n).
|
|
EXAMPLE
|
Row polynomial for n=4: p(4,x)=1-3*x-6*x^2+3*x^3+x^4= (1+x-x^2)*(1-4*x-x^2). 1/p(4,x) is G.f. for A010048(n+3,3), n >= 0: {1,3,15,60,...}= A001655(n).
n=3: 1*(F(k))^3 - 3*(F(k-1))^3 - 6*(F(k-2))^3 + 3*(F(k-3))^3 + 1*(F(k-4))^3 = 0, k >= 4; inputs: (F(k))^3, k=0..3.
The triangle begins:
n\m 0 1 2 3 4 5 6 7 8 9
0 1
1 1 -1
2 1 -1 -1
3 1 -2 -2 1
4 1 -3 -6 3 1
5 1 -5 -15 15 5 -1
6 1 -8 -40 60 40 -8 -1
7 1 -13 -104 260 260 -104 -13 1
8 1 -21 -273 1092 1820 -1092 -273 21 1
9 1 -34 -714 4641 12376 -12376 -4641 714 34 -1
|
|
MAPLE
|
(-1)^floor((k+1)/2)*A010048(n, k) ;
|
|
MATHEMATICA
|
a[n_, m_] := {1, -1, -1, 1}[[Mod[m, 4] + 1]] * Product[ Fibonacci[n - j + 1] / Fibonacci[j], {j, 1, m}]; Table[a[n, m], {n, 0, 10}, {m, 0, n}] // Flatten (* Jean-François Alcover, Jul 05 2013 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A372441
|
|
Number of binary indices (binary weight) of n minus number of prime indices (bigomega) of n.
|
|
+120
23
|
|
|
1, 0, 1, -1, 1, 0, 2, -2, 0, 0, 2, -1, 2, 1, 2, -3, 1, -1, 2, -1, 1, 1, 3, -2, 1, 1, 1, 0, 3, 1, 4, -4, 0, 0, 1, -2, 2, 1, 2, -2, 2, 0, 3, 0, 1, 2, 4, -3, 1, 0, 2, 0, 3, 0, 3, -1, 2, 2, 4, 0, 4, 3, 3, -5, 0, -1, 2, -1, 1, 0, 3, -3, 2, 1, 1, 0, 2, 1, 4, -3, -1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,7
|
|
COMMENTS
|
A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
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
|
|
|
FORMULA
|
|
|
MAPLE
|
f:= proc(n) convert(convert(n, base, 2), `+`)-numtheory:-bigomega(n) end proc:
|
|
MATHEMATICA
|
bix[n_]:=Join@@Position[Reverse[IntegerDigits[n, 2]], 1];
prix[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Length[bix[n]]-Length[prix[n]], {n, 100}]
|
|
CROSSREFS
|
For minimum instead of length we have A372437, zeros {}.
A003963 gives product of prime indices.
A070939 gives length of binary expansion.
|
|
KEYWORD
|
sign,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A144431
|
|
Triangle read by rows: T(n,k) (1 <= k <= n) given by T(n,1) = T(n,n) = 1, otherwise T(n, k) = (m*n-m*k+1)*T(n-1,k-1) + (m*k-m+1)*T(n-1,k), where m = -1.
|
|
+120
21
|
|
|
1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -2, 2, -2, 1, 1, -3, 2, 2, -3, 1, 1, -4, 7, -8, 7, -4, 1, 1, -5, 9, -5, -5, 9, -5, 1, 1, -6, 16, -26, 30, -26, 16, -6, 1, 1, -7, 20, -28, 14, 14, -28, 20, -7, 1, 1, -8, 29, -64, 98, -112, 98, -64, 29, -8, 1, 1, -9, 35, -75, 90, -42, -42, 90, -75, 35, -9, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,12
|
|
COMMENTS
|
Row sums are: {1, 2, 2, 0, 0, 0, 0, 0, 0, 0, ...}.
For m = ...,-1,0,1,2 we get ..., A144431, A007318 (Pascal), A008292, A060187, ..., so this might be called a sub-Pascal triangle.
The triangle starts off like A098593, but is different further on.
|
|
LINKS
|
|
|
FORMULA
|
T(n,k) = (m*n - m*k + 1)*T(n-1, k-1) + (m*k - (m-1))*T(n-1, k) with T(n, 1) = T(n, n) = 1 and m = -1.
T(n, n-k) = T(n, k).
T(n, k) = (-1)^(k-1)*binomial(n-3, k-1) + (-1)^(n+k)*binomial(n-3, k-3) with T(1, k) = T(2, k) = 1.
Sum_{k=1..n} T(n, k) = [n==1] + 2*[n==2] + 2*[n==3] + (1-(-1)^n)*0^(n-3)*[n>3]. (End)
|
|
EXAMPLE
|
Triangle begins:
1;
1, 1;
1, 0, 1;
1, -1, -1, 1;
1, -2, 2, -2, 1;
1, -3, 2, 2, -3, 1;
1, -4, 7, -8, 7, -4, 1;
1, -5, 9, -5, -5, 9, -5, 1;
1, -6, 16, -26, 30, -26, 16, -6, 1;
1, -7, 20, -28, 14, 14, -28, 20, -7, 1;
...
|
|
MAPLE
|
T:=proc(n, k, l) option remember;
if (n=1 or k=1 or k=n) then 1 else
(l*n-l*k+1)*T(n-1, k-1, l)+(l*k-l+1)*T(n-1, k, l); fi; end;
for n from 1 to 15 do lprint([seq(T(n, k, -1), k=1..n)]); od; # N. J. A. Sloane, May 08 2013
|
|
MATHEMATICA
|
m=-1;
T[n_, 1]:= 1; T[n_, n_]:= 1;
T[n_, k_]:= (m*n-m*k+1)*T[n-1, k-1] + (m*k - (m - 1))*T[n-1, k];
Table[T[n, k], {n, 15}, {k, n}]//Flatten
|
|
PROG
|
(Sage)
if (n<3): return 1
else: return (-1)^(k-1)*binomial(n-3, k-1) + (-1)^(n+k)*binomial(n-3, k-3)
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A350942
|
|
Number of odd parts minus number of even conjugate parts of the integer partition with Heinz number n.
|
|
+120
20
|
|
|
0, 1, 0, 1, 1, 0, 0, 3, -2, 1, 1, 2, 0, 0, -1, 3, 1, 0, 0, 3, -2, 1, 1, 2, -1, 0, 0, 2, 0, 1, 1, 5, -1, 1, -2, 0, 0, 0, -2, 3, 1, 0, 0, 3, 1, 1, 1, 4, -4, 1, -1, 2, 0, 0, -1, 2, -2, 0, 1, 1, 0, 1, 0, 5, -2, 1, 1, 3, -1, 0, 0, 2, 1, 0, 1, 2, -3, 0, 0, 5, -2, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,8
|
|
COMMENTS
|
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
|
|
LINKS
|
|
|
EXAMPLE
|
First positions n such that a(n) = 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, together with their prime indices, are:
192: (2,1,1,1,1,1,1)
32: (1,1,1,1,1)
48: (2,1,1,1,1)
8: (1,1,1)
12: (2,1,1)
2: (1)
1: ()
15: (3,2)
9: (2,2)
77: (5,4)
49: (4,4)
221: (7,6)
169: (6,6)
|
|
MATHEMATICA
|
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
conj[y_]:=If[Length[y]==0, y, Table[Length[Select[y, #>=k&]], {k, 1, Max[y]}]];
Table[Count[primeMS[n], _?OddQ]-Count[conj[primeMS[n]], _?EvenQ], {n, 100}]
|
|
CROSSREFS
|
A122111 represents conjugation using Heinz numbers.
A316524 = alternating sum of prime indices.
The following rank partitions:
A325698: # of even parts = # of odd parts.
A349157: # of even parts = # of odd conjugate parts, counted by A277579.
A350943: # of even conjugate parts = # of odd parts, counted by A277579.
A350944: # of odd parts = # of odd conjugate parts, counted by A277103.
A350945: # of even parts = # of even conjugate parts, counted by A350948.
Cf. A026424, A028260, A130780, A171966, A239241, A241638, A325700, A350947, A350949, A350950, A350951.
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A053250
|
|
Coefficients of the '3rd-order' mock theta function phi(q).
|
|
+120
19
|
|
|
1, 1, 0, -1, 1, 1, -1, -1, 0, 2, 0, -2, 1, 1, -1, -2, 1, 3, -1, -2, 1, 2, -2, -3, 1, 4, 0, -4, 2, 3, -2, -4, 1, 5, -2, -5, 3, 5, -3, -5, 2, 7, -2, -7, 3, 6, -4, -8, 3, 9, -2, -9, 5, 9, -5, -10, 3, 12, -4, -12, 5, 11, -6, -13, 6, 16, -6, -15, 7, 15, -8, -17, 7, 19, -6, -20, 9, 19, -10, -22, 8, 25, -9, -25, 12, 25, -12, -27, 11, 31
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,10
|
|
REFERENCES
|
N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 55, Eq. (26.12), p. 58, Eq. (26.56).
Srinivasa Ramanujan, Collected Papers, Chelsea, New York, 1962, pp. 354-355
Srinivasa Ramanujan, The Lost Notebook and Other Unpublished Papers, Narosa Publishing House, New Delhi, 1988, pp. 17, 31.
|
|
LINKS
|
|
|
FORMULA
|
Consider partitions of n into distinct odd parts. a(n) = number of them for which the largest part minus twice the number of parts is == 3 (mod 4) minus the number for which it is == 1 (mod 4).
G.f.: 1 + Sum_{k>0} x^k^2 / ((1 + x^2) (1 + x^4) ... (1 + x^(2*k))).
G.f. 1 + Sum_{n >= 0} x^(2*n+1)*Product_{k = 1..n} (x^(2*k-1) - 1) (Folsom et al.). Cf. A207569 and A215066. - Peter Bala, May 16 2017
|
|
EXAMPLE
|
G.f. = 1 + x - x^3 + x^4 + x^5 - x^6 - x^7 + 2*x^9 - 2*x^11 + x^12 + x^13 - x^14 + ...
|
|
MAPLE
|
f:=n->q^(n^2)/mul((1+q^(2*i)), i=1..n); add(f(n), n=0..10);
|
|
MATHEMATICA
|
Series[Sum[q^n^2/Product[1+q^(2k), {k, 1, n}], {n, 0, 10}], {q, 0, 100}]
a[ n_] := SeriesCoefficient[ Sum[ x^k^2 / QPochhammer[ -x^2, x^2, k], {k, 0, Sqrt@ n}], {x, 0, n}]; (* Michael Somos, Jul 09 2015 *)
|
|
PROG
|
(PARI) {a(n) = my(t); if(n<0, 0, t = 1 + O(x^n); polcoeff( sum(k=1, sqrtint(n), t *= x^(2*k - 1) / (1 + x^(2*k)) + O(x^(n - (k-1)^2 + 1)), 1), n))}; /* Michael Somos, Jul 16 2007 */
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A345415
|
|
Table read by upward antidiagonals: Given m, n >= 1, write gcd(m,n) as d = u*m+v*n where u, v are minimal; T(m,n) = u.
|
|
+120
18
|
|
|
0, 0, 1, 0, 0, 1, 0, 1, -1, 1, 0, 0, 0, 1, 1, 0, 1, 1, -1, -2, 1, 0, 0, -1, 0, 2, 1, 1, 0, 1, 0, 1, -1, 1, -3, 1, 0, 0, 1, 1, 0, -1, -2, 1, 1, 0, 1, -1, -1, 1, -1, 2, 3, -4, 1, 0, 0, 0, 0, -2, 0, 3, 1, 1, 1, 1, 0, 1, 1, 1, 2, 1, -1, -3, -2, -3, -5, 1, 0, 0, -1, 1, -1, 1, 0, -1, 2, -2, 4, 1, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,20
|
|
COMMENTS
|
The gcd is given in A003989, and v is given in A345416. Minimal means minimize u^2+v^2. We follow Maple, PARI, etc., in setting u=0 and v=1 when m=n. If we ignore the diagonal, the v table is the transpose of the u table.
|
|
LINKS
|
|
|
EXAMPLE
|
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
[1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]
[1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1]
[1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4]
[1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1]
[1, 2, 3, 2, 1, 6, 1, 2, 3, 2, 1, 6, 1, 2, 3, 2]
[1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1]
[1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8]
[1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1]
[1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2]
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1]
[1, 2, 3, 4, 1, 6, 1, 4, 3, 2, 1, 12, 1, 2, 3, 4]
...
The u table (this entry) begins:
[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
[0, 0, -1, 1, -2, 1, -3, 1, -4, 1, -5, 1, -6, 1, -7, 1]
[0, 1, 0, -1, 2, 1, -2, 3, 1, -3, 4, 1, -4, 5, 1, -5]
[0, 0, 1, 0, -1, -1, 2, 1, -2, -2, 3, 1, -3, -3, 4, 1]
[0, 1, -1, 1, 0, -1, 3, -3, 2, 1, -2, 5, -5, 3, 1, -3]
[0, 0, 0, 1, 1, 0, -1, -1, -1, 2, 2, 1, -2, -2, -2, 3]
[0, 1, 1, -1, -2, 1, 0, -1, 4, 3, -3, -5, 2, 1, -2, 7]
[0, 0, -1, 0, 2, 1, 1, 0, -1, -1, -4, -1, 5, 2, 2, 1]
[0, 1, 0, 1, -1, 1, -3, 1, 0, -1, 5, -1, 3, -3, 2, -7]
[0, 0, 1, 1, 0, -1, -2, 1, 1, 0, -1, -1, 4, 3, -1, -3]
[0, 1, -1, -1, 1, -1, 2, 3, -4, 1, 0, -1, 6, -5, -4, 3]
[0, 0, 0, 0, -2, 0, 3, 1, 1, 1, 1, 0, -1, -1, -1, -1]
...
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]
[1, -1, 1, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1]
[1, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 0, 1, 1, -1, 0]
[1, -2, 2, -1, 1, 1, -2, 2, -1, 0, 1, -2, 2, -1, 0, 1]
[1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 0, 1, 1, 1, -1]
[1, -3, -2, 2, 3, -1, 1, 1, -3, -2, 2, 3, -1, 0, 1, -3]
[1, 1, 3, 1, -3, -1, -1, 1, 1, 1, 3, 1, -3, -1, -1, 0]
[1, -4, 1, -2, 2, -1, 4, -1, 1, 1, -4, 1, -2, 2, -1, 4]
[1, 1, -3, -2, 1, 2, 3, -1, -1, 1, 1, 1, -3, -2, 1, 2]
[1, -5, 4, 3, -2, 2, -3, -4, 5, -1, 1, 1, -5, 4, 3, -2]
[1, 1, 1, 1, 5, 1, -5, -1, -1, -1, -1, 1, 1, 1, 1, 1]
...
|
|
MAPLE
|
mygcd:=proc(a, b) local d, s, t; d := igcdex(a, b, `s`, `t`); [a, b, d, s, t]; end;
gcd_rowu:=(m, M)->[seq(mygcd(m, n)[4], n=1..M)];
for m from 1 to 12 do lprint(gcd_rowu(m, 16)); od;
|
|
MATHEMATICA
|
T[m_, n_] := Module[{u, v}, MinimalBy[{u, v} /. Solve[u^2 + v^2 <= 26 && u*m + v*n == GCD[m, n], {u, v}, Integers], #.#&][[1, 1]]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A064334
|
|
Triangle composed of generalized Catalan numbers.
|
|
+120
15
|
|
|
1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, -2, 5, -2, 1, 1, 1, 6, -25, 13, -3, 1, 1, 1, -18, 141, -98, 25, -4, 1, 1, 1, 57, -849, 826, -251, 41, -5, 1, 1, 1, -186, 5349, -7448, 2817, -514, 61, -6, 1, 1, 1, 622, -34825, 70309, -33843, 7206, -917, 85, -7, 1, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,17
|
|
COMMENTS
|
The sequence for column m (m >= 1) (without leading zeros and the first 1) appears in the Derrida et al. 1992 reference as Z_{N}=:Y_{N}(N+1), N >=0, for (unphysical) alpha = -m, beta = 1 (or alpha = 1, beta = -m). In the Derrida et al. 1993 reference the formula in eq. (39) gives Z_{N}(alpha,beta)/(alpha*beta)^N for N>=1. See also Liggett reference, proposition 3.19, p. 269, with lambda for alpha and rho for 1-beta.
|
|
REFERENCES
|
T. M. Liggett, Stochastic Interacting Systems: Contact, Voter and Exclusion Processes, Springer, 1999, p. 269.
|
|
LINKS
|
|
|
FORMULA
|
G.f. for column m: (x^m)/(1-x*c(-m*x))= (x^m)*((m+1)+m*x*c(-m*x))/((m+1)-x), m>0, with the g.f. c(x) of Catalan numbers A000108.
T(n, m) = Sum_{k=0..n-m-1} (n-m-k)*binomial(n-m-1+k, k)*(-m)^k/(n-m), with T(n,0) = T(n,n)=1.
T(n,m) = (1/(1+m))^(n-m)*(1 + m*Sum_{k=0..n-m-1} C(k)*(-m*(m+1))^k ), n-m >= 1, T(n, n) = T(n,0) =1, T(n, m)=0 if n<m, with C(k)=A000108(k) (Catalan).
T(n, k) = hypergeometric([1-n+k, n-k], [-n+k], -k) if k<n else 1. - Peter Luschny, Nov 30 2014
|
|
EXAMPLE
|
Triangle starts:
1;
1, 1;
1, 1, 1;
1, 0, 1, 1;
1, 1, -1, 1, 1;
1, -2, 5, -2, 1, 1; ...
|
|
MATHEMATICA
|
Table[If[k==0, 1, If[k==n, 1, Sum[(n-k-j)*Binomial[n-k-1+j, j]*(-k)^j/(n -k), {j, 0, n-k-1}]]], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, May 04 2019 *)
|
|
PROG
|
(Sage)
def T(n, k):
return hypergeometric([1-n, n], [-n], -k) if n>0 else 1
for n in (0..10):
print([simplify(T(n-k, k)) for k in (0..n)]) # Peter Luschny, Nov 30 2014
(PARI) {T(n, k) = if(k==0, 1, if(k==n, 1, sum(j=0, n-k-1, (n-k-j)* binomial(n-k-1+j, j)*(-k)^j/(n-k))))}; \\ G. C. Greubel, May 04 2019
(Magma) [[k eq 0 select 1 else k eq n select 1 else (&+[(n-k-j)* Binomial(n-k-1+j, j)*(-k)^j/(n-k): j in [0..n-k-1]]): k in [0..n]]: n in [0..12]]; // G. C. Greubel, May 04 2019
|
|
CROSSREFS
|
The unsigned column sequences (without leading zeros) are A000012, A064310-11, A064325-33 for m=0..11, respectively. Row sums (signed) give A064338. Row sums (unsigned) give A064339.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A098593
|
|
A triangle of Krawtchouk coefficients.
|
|
+120
15
|
|
|
1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -2, -2, -2, 1, 1, -3, -2, -2, -3, 1, 1, -4, -1, 0, -1, -4, 1, 1, -5, 1, 3, 3, 1, -5, 1, 1, -6, 4, 6, 6, 6, 4, -6, 1, 1, -7, 8, 8, 6, 6, 8, 8, -7, 1, 1, -8, 13, 8, 2, 0, 2, 8, 13, -8, 1, 1, -9, 19, 5, -6, -10, -10, -6, 5, 19, -9, 1, 1, -10, 26, -2, -17, -20, -20, -20, -17, -2, 26, -10, 1, 1, -11, 34, -14, -29, -25
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,12
|
|
COMMENTS
|
Row sums are A009545(n+1), with e.g.f. exp(x)(cos(x)+sin(x)). Diagonal sums are A077948.
The rows are the diagonals of the Krawtchouk matrices. Coincides with the Riordan array (1/(1-x),(1-2x)/(1-x)). - Paul Barry, Sep 24 2004
Corresponds to Pascal-(1,-2,1) array, read by antidiagonals. The Pascal-(1,-2,1) array has n-th row generated by (1-2x)^n/(1-x)^(n+1). - Paul Barry, Sep 24 2004
A modified version (different signs) of this triangle is given by T(n,k) = Sum_{j=0..n} C(n-k,j)*C(k,j)*cos(Pi*(k-j)). - Paul Barry, Jun 14 2007
|
|
REFERENCES
|
P. Feinsilver and J. Kocik, Krawtchouk matrices from classical and quantum walks, Contemporary Mathematics, 287 2001, pp. 83-96.
|
|
LINKS
|
|
|
FORMULA
|
T(n, k) = Sum_{i=0..k} binomial(n-k, k-i)*binomial(k, i)*(-1)^(k-i), k<=n.
T(n, k) = T(n-1, k) + T(n-1, k-1) - 2*T(n-2, k-1) (n>0). - Paul Barry, Sep 24 2004
T(n, k) = [k<=n]*Hypergeometric2F1(-k,k-n;1;-1). - Paul Barry, Jan 24 2011
E.g.f. for the n-th subdiagonal: exp(x)*P(n,x), where P(n,x) is the polynomial Sum_{k = 0..n} (-1)^k*binomial(n,k)* x^k/k!. For example, the e.g.f. for the second subdiagonal is exp(x)*(1 - 2*x + x^2/2) = 1 - x - 2*x^2/2! - 2*x^3/3! - x^4/4! + x^5/5! + .... - Peter Bala, Mar 05 2017
|
|
EXAMPLE
|
Rows begin {1}, {1,1}, {1,0,1}, {1,-1,-1,1}, {1,-2,-2,-2,1}, ...
Triangle begins
1,
1, 1,
1, 0, 1,
1, -1, -1, 1,
1, -2, -2, -2, 1,
1, -3, -2, -2, -3, 1,
1, -4, -1, 0, -1, -4, 1,
1, -5, 1, 3, 3, 1, -5, 1,
1, -6, 4, 6, 6, 6, 4, -6, 1,
1, -7, 8, 8, 6, 6, 8, 8, -7, 1,
1, -8, 13, 8, 2, 0, 2, 8, 13, -8, 1
Production matrix (related to large Schroeder numbers A006318) begins
1, 1,
0, -1, 1,
0, -2, -1, 1,
0, -6, -2, -1, 1,
0, -22, -6, -2, -1, 1,
0, -90, -22, -6, -2, -1, 1,
0, -394, -90, -22, -6, -2, -1, 1,
0, -1806, -394, -90, -22, -6, -2, -1, 1,
0, -8558, -1806, -394, -90, -22, -6, -2, -1, 1
Production matrix of inverse is
-1, 1,
-2, 1, 1,
-4, 2, 1, 1,
-8, 4, 2, 1, 1,
-16, 8, 4, 2, 1, 1,
-32, 16, 8, 4, 2, 1, 1,
-64, 32, 16, 8, 4, 2, 1, 1,
-128, 64, 32, 16, 8, 4, 2, 1, 1,
-256, 128, 64, 32, 16, 8, 4, 2, 1, 1 (End)
|
|
MATHEMATICA
|
T[n_, k_] := Sum[Binomial[n - k, k - j]*Binomial[k, j]*(-1)^(k - j), {j, 0, n}]; Table[T[n, k], {n, 0, 49}, {k, 0, n}] // Flatten (* G. C. Greubel, Oct 15 2017 *)
|
|
PROG
|
(PARI) for(n=0, 10, for(k=0, n, print1(sum(i=0, k, binomial(n-k, k-i) *binomial(k, i)*(-1)^(k-i)), ", "))) \\ G. C. Greubel, Oct 15 2017
|
|
CROSSREFS
|
Cf. Pascal (1,m,1) array: A123562 (m = -3), A000012 (m = -1), A007318 (m = 0), A008288 (m = 1), A081577 (m = 2), A081578 (m = 3), A081579 (m = 4), A081580 (m = 5), A081581 (m = 6), A081582 (m = 7), A143683 (m = 8).
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
Search completed in 6.970 seconds
|