A202023 Triangle T(n,k), read by rows, given by (1, 0, 1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1, -1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
1, 1, 0, 1, 1, 0, 1, 3, 0, 0, 1, 6, 1, 0, 0, 1, 10, 5, 0, 0, 0, 1, 15, 15, 1, 0, 0, 0, 1, 21, 35, 7, 0, 0, 0, 0, 1, 28, 70, 28, 1, 0, 0, 0, 0, 1, 36, 126, 84, 9, 0, 0, 0, 0, 0, 1, 45, 210, 210, 45, 1, 0, 0, 0, 0, 0
Offset: 0
Examples
Triangle begins : 1 1, 0 1, 1, 0 1, 3, 0, 0 1, 6, 1, 0, 0 1, 10, 5, 0, 0, 0 1, 15, 15, 1, 0, 0, 0 1, 21, 35, 7, 0, 0, 0, 0 1, 28, 70, 28, 1, 0, 0, 0, 0
Crossrefs
Programs
-
Mathematica
Table[Length[Select[Subsets[Range[n-1]],Length[Split[#,#2==#1+1&]]==k&]],{n,0,10},{k,0,n}] (* Gus Wiseman, Jul 08 2025 *)
Formula
T(n,k) = binomial(n,2k).
G.f.: (1-x)/((1-x)^2-y*x^2).
T(n,k)= Sum_{j, j>=0} T(n-1-j,k-1)*j with T(n,0)=1 and T(n,k)= 0 if k<0 or if n
T(n,k) = 2*T(n-1,k) + T(n-2,k-1) - T(n-2,k) for n>1, T(0,0) = T(1,0) = 1, T(1,1) = 0, T(n,k) = 0 if k>n or if k<0. - Philippe Deléham, Nov 10 2013
A161738 Sequence related to the column sums of the BG2 matrix.
1, 1, 3, 15, 35, 315, 693, 9009, 19305, 328185, 692835, 14549535, 30421755, 760543875, 1579591125, 45808142625, 94670161425, 3124115327025, 6432002143875, 237984079323375, 488493636505875, 20028239096740875
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..667
Programs
-
Magma
[1] cat [(&*[2*n-2*k-3:k in [0..Floor(n/2 -1)]]): n in [2..50]]; // G. C. Greubel, Sep 26 2018
-
Mathematica
Table[Product[(2*n - 3 - 2*k), {k, 0, Floor[n/2 - 1]}], {n, 1, 50}] (* G. C. Greubel, Sep 26 2018 *)
-
PARI
for(n=1,50, print1(prod(k=0,floor(n/2 -1), 2*n-2*k-3), ", ")) \\ G. C. Greubel, Sep 26 2018
A289296 a(n) = (n - 1)*(2*floor(n/2) + 1).
-1, 0, 3, 6, 15, 20, 35, 42, 63, 72, 99, 110, 143, 156, 195, 210, 255, 272, 323, 342, 399, 420, 483, 506, 575, 600, 675, 702, 783, 812, 899, 930, 1023, 1056, 1155, 1190, 1295, 1332, 1443, 1482, 1599, 1640, 1763, 1806, 1935, 1980, 2115, 2162, 2303, 2352, 2499, 2550, 2703, 2756, 2915
Offset: 0
Comments
Summing a(n) by pairs, one gets -1, 9, 35, 77, 135, ... = A033566.
A198442(k) is a member of this sequence if k == 0 or 1 (mod 4). - Bruno Berselli, Jul 04 2017
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Programs
-
Mathematica
Table[(n - 1) (2 Floor[n/2] + 1), {n, 0, 60}] (* or *) LinearRecurrence[{1, 2, -2, -1, 1}, {-1, 0, 3, 6, 15}, 61]
-
PARI
a(n)=(n\2*2+1)*(n-1) \\ Charles R Greathouse IV, Jul 02 2017
-
PARI
Vec(-(1 - x - 5*x^2 - x^3 - 2*x^4) / ((1 - x)^3*(1 + x)^2) + O(x^60)) \\ Colin Barker, Jul 02 2017
-
Python
def A289296(n): return (n-1)*(n|1) # Chai Wah Wu, Jan 18 2023
Formula
a(n) = n^2-1 if n is even and n^2-n if n is odd.
n^2 - a(n) = A093178(n).
From Colin Barker, Jul 02 2017: (Start)
G.f.: -(1 - x - 5*x^2 - x^3 - 2*x^4) / ((1 - x)^3*(1 + x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>4. (End)
A129779 a(1) = 1, a(2) = -1, a(3) = 2; for n > 3, a(n) = -(2*n-5)*a(n-1).
1, -1, 2, -6, 30, -210, 1890, -20790, 270270, -4054050, 68918850, -1309458150, 27498621150, -632468286450, 15811707161250, -426916093353750, 12380566707258750, -383797567925021250, 12665319741525701250
Offset: 1
Keywords
Comments
Sequence is also the first column of the inverse of the infinite lower triangular matrix M, where M(j,k) = 1+2*(k-1)*(j-k) for k < j, M(j,k) = 1 for k = j, M(j,k) = 0 for k > j.
Upper left 6 X 6 submatrix of M is
[ 1 0 0 0 0 0 ]
[ 1 1 0 0 0 0 ]
[ 1 3 1 0 0 0 ]
[ 1 5 5 1 0 0 ]
[ 1 7 9 7 1 0 ]
[ 1 9 13 13 9 1 ],
and upper left 6 X 6 submatrix of M^-1 is
[ 1 0 0 0 0 0 ]
[ -1 1 0 0 0 0 ]
[ 2 -3 1 0 0 0 ]
[ -6 10 -5 1 0 0 ]
[ 30 -50 26 -7 1 0 ]
[ -210 350 -182 50 -9 1 ].
Links
- G. C. Greubel, Table of n, a(n) for n = 1..400
Programs
-
GAP
F:=Factorial;; Concatenation([1,-1], List([3..25], n-> (-1)^(n+1)*F(2*n-5)/(2^(n-4)*F(n-3)) )); # G. C. Greubel, Nov 25 2019
-
Magma
m:=19; M:=Matrix(IntegerRing(), m, m, [< j, k, Maximum(0, 1+2*(k-1)*(j-k)) > : j, k in [1..m] ] ); Transpose(ColumnSubmatrix(M^-1, 1, 1)); // Klaus Brockhaus, May 21 2007
-
Magma
F:=Factorial; [1,-1] cat [(-1)^(n+1)*F(2*n-5)/(2^(n-4)*F(n-3)): n in [3..25]]; // G. C. Greubel, Nov 25 2019
-
Maple
seq(`if`(n<3, (-1)^(n-1), (-1)^(n-1)*(2*n-5)!/(2^(n-4)*(n-3)!)), n=1..25); # G. C. Greubel, Nov 25 2019
-
Mathematica
a[n_]:= -(2*n-5)*a[n-1]; a[1]=1; a[2]=-1; a[3]=2; Array[a, 20] (* Robert G. Wilson v *) Table[If[n<3, (-1)^(n-1), (-1)^(n+1)*(2*n-5)!/(2^(n-4)*(n-3)!)], {n,25}] (* G. C. Greubel, Nov 25 2019 *)
-
PARI
{m=19; print1(1, ",", -1, ","); print1(a=2, ","); for(n=4, m, k=-(2*n-5)*a; print1(k, ","); a=k)} \\ Klaus Brockhaus, May 21 2007
-
PARI
{print1(1, ",", -1, ","); for(n=3, 19, print1((-1)^(n-1)*(2*(n-2))!/((n-2)!*2^(n-3)), ","))} \\ Klaus Brockhaus, May 21 2007
-
PARI
{m=19; M=matrix(m, m, j, k, if(k>j, 0, if(k==j, 1, 1+2*(k-1)*(j-k)))); print((M^-1)[, 1]~)} \\ Klaus Brockhaus, May 21 2007
-
Sage
f=factorial; [1,-1]+[(-1)^(n+1)*f(2*n-5)/(2^(n-4)*f(n-3)) for n in (3..25)] # G. C. Greubel, Nov 25 2019
Formula
a(n) = (-1)^(n-1)*A097801(n-2) = (-1)^(n-1)*(2*(n-2))!/((n-2)!*2^(n-3)) for n > 2, with a(1)=1, a(2)=-1.
G.f.: 1 + x - x*W(0) , where W(k) = 1 + 1/( 1 - x*(2*k+1)/( x*(2*k+1) - 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 22 2013
Extensions
Edited and extended by Klaus Brockhaus and Robert G. Wilson v, May 21 2007
A375797 Table T(n, k) read by upward antidiagonals. The sequences in each column k is a triangle read by rows (blocks), where each row is a permutation of the numbers of its constituents. Row number n in column k has length n*k = A003991(n,k); see Comments.
1, 2, 1, 3, 2, 3, 6, 3, 2, 1, 5, 5, 1, 3, 5, 4, 4, 4, 2, 2, 1, 7, 6, 8, 4, 3, 5, 7, 9, 7, 6, 5, 4, 3, 2, 1, 8, 11, 7, 11, 1, 4, 5, 7, 9, 10, 9, 5, 7, 6, 2, 4, 3, 2, 1, 15, 10, 9, 9, 14, 6, 3, 5, 7, 9, 11, 12, 8, 18, 8, 8, 7, 6, 4, 4, 3, 2, 1, 13, 12, 11, 10, 12, 17, 1, 6, 5, 7, 9, 11, 13, 14, 13, 16, 6, 10, 9, 8, 2, 6, 5, 4, 3, 2, 1
Offset: 1
Comments
A208233 presents an algorithm for generating permutations, where each generated permutation is self-inverse.
The sequence in each column k possesses two properties: it is both a self-inverse permutation and an intra-block permutation of natural numbers.
Examples
Table begins: k= 1 2 3 4 5 6 ----------------------------------- n= 1: 1, 1, 3, 1, 5, 1, ... n= 2: 2, 2, 2, 3, 2, 5, ... n= 3: 3, 3, 1, 2, 3, 3, ... n= 4: 6, 5, 4, 4, 4, 4, ... n= 5: 5, 4, 8, 5, 1, 2, ... n= 6: 4, 6, 6, 11, 6, 6, ... n= 7: 7, 7, 7, 7, 14, 7, ... n= 8: 9, 11, 5, 9, 8, 17, ... n= 9: 8, 9, 9, 8, 12, 9, ... n= 10: 10, 10, 18, 10, 10, 15, ... n= 11: 15, 8, 11, 6, 11, 11, ... n= 12: 12, 12, 16, 12, 9, 13, ... n= 13: 13, 13, 13, 13, 13, 12, ... n= 14: 14, 19, 14, 23, 7, 14, ... n= 15: 11, 15, 15, 15, 15, 10, ... n= 16: 16, 17, 12, 21, 30, 16, ... n= 17: 20, 16, 17, 17, 17, 8, ... n= 18: 18, 18, 10, 19, 28, 18, ... ... . In column 3, the first 3 blocks have lengths 3,6 and 9. In column 6, the first 2 blocks have lengths 6 and 12. Each block is a permutation of the numbers of its constituents. The first 6 antidiagonals are: 1; 2,1; 3,2,3; 6,3,2,1; 5,5,1,3,5; 4,4,4,2,2,1;
Links
- Boris Putievskiy, Table of n, a(n) for n = 1..9870
- Boris Putievskiy, Integer Sequences: Irregular Arrays and Intra-Block Permutations, arXiv:2310.18466 [math.CO], 2023.
- Index entries for sequences that are permutations of the natural numbers.
Crossrefs
Programs
-
Mathematica
T[n_,k_]:=Module[{L,R,P,result},L=Ceiling[(Sqrt[8*n*k+k^2]-k)/(2*k)]; R=n-k*(L-1)*L/2; P=(((-1)^Max[R,k*L+1-R]+1)*R-((-1)^Max[R,k*L+1-R]-1)*(k*L+1-R))/2; result=P+k*(L-1)*L/2] Nmax=18; Table[T[n,k],{n,1,Nmax},{k,1,Nmax}]
Formula
T(n,k) = P(n,k) + k*(L(n,k)-1)*L(n,k)/2 = P(n,k) + A062707(L(n-1),k), where L(n,k) = ceiling((sqrt(8*n*k+k^2)-k)/(2*k)), R(n,k) = n-k*(L(n,k)-1)*L(n,k)/2, P(n,k) = (((-1)^max(R(n,k),k*L(n,k)+1-R(n,k))+1)*R(n,k)-((-1)^max(R(n,k),k*L(n,k)+1-R(n,k))-1)*(k*L(n,k)+1-R(n,k)))/2.
A062557 2n-1 1's followed by a 2.
1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0
Comments
Is the number .12111211111211111112... irrational?
Programs
-
Magma
[1+Floor(Sqrt(n+2)+1/2)-Floor(Sqrt(n+1)+1/2) : n in [0..100]]; // Wesley Ivan Hurt, May 26 2015
-
Maple
A062557:=n->1+floor(sqrt(n+2)+1/2)-floor(sqrt(n+1)+1/2): seq(A062557(n), n=0..100); # Wesley Ivan Hurt, May 26 2015
-
Mathematica
Table[1 + Floor[Sqrt[n + 2] + 1/2] - Floor[Sqrt[n + 1] + 1/2], {n, 0, 100}] (* Wesley Ivan Hurt, May 26 2015 *)
-
PARI
v=[]; for(n=0,200,v=concat(v,1+issquare(5+4*n))); v
Formula
a(n) = 1 + A005369(n+1). - Wesley Ivan Hurt, May 26 2015
A226725 Denominator of the median of {1, 1/2, 1/3, ..., 1/n}.
1, 4, 2, 12, 3, 24, 4, 40, 5, 60, 6, 84, 7, 112, 8, 144, 9, 180, 10, 220, 11, 264, 12, 312, 13, 364, 14, 420, 15, 480, 16, 544, 17, 612, 18, 684, 19, 760, 20, 840, 21, 924, 22, 1012, 23, 1104, 24, 1200, 25, 1300, 26, 1404, 27, 1512, 28, 1624, 29, 1740, 30
Offset: 1
Examples
median{1, 1/2, 1/3, 1/4} = (1/2 + 1/3)/2 = 7/12, so that a(4) = 12.
Links
- Clark Kimberling, Table of n, a(n) for n = 1..2000
- Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
Programs
-
Maple
A226725:=n->n^(1/2 + (-1)^n/2)*(n + 2^(1/2 + (-1)^n/2))/2: seq(A226725(n), n=1..100); # Wesley Ivan Hurt, Feb 27 2015
-
Mathematica
Denominator[Table[Median[Table[1/k, {k, n}]], {n, 120}]] f[n_] := If[ OddQ@ n, Floor[(n + 1)/2], n(n/2 + 1)]; Array[f, 59] (* Robert G. Wilson v, Feb 27 2015 *) With[{nn=30},Riffle[Range[nn],Table[2n+2n^2,{n,nn}]]] (* Harvey P. Dale, May 26 2019 *) Riffle[Range[60],LinearRecurrence[{3,-3,1},{4,12,24},60]] (* Harvey P. Dale, Oct 03 2023 *)
-
PARI
Vec(x*(x^2-4*x-1)/((x-1)^3*(x+1)^3) + O(x^100)) \\ Colin Barker, Feb 27 2015
Formula
a(n) = (n+1)/2 if n is odd, a(n) = n*(n/2+1) if n is even.
G.f.: W(0), where W(k)= 1 + 2*x*(k+2)/( 1 - x/(x + 2*(k+1)/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 16 2013
a(n) = 3*a(n-2)-3*a(n-4)+a(n-6). - Colin Barker, Feb 27 2015
G.f.: x*(x^2-4*x-1) / ((x-1)^3*(x+1)^3). - Colin Barker, Feb 27 2015
a(n) = n^(1/2 + (-1)^n/2)*(n + 2^(1/2 + (-1)^n/2))/2. - Wesley Ivan Hurt, Feb 27 2015
a(n) = Sum_{k=0..n} (-1)^k * A061579(n,k). - Alois P. Heinz, Feb 10 2023
Extensions
Formula changed for even terms by Luca Brigada Villa, Jun 20 2013
A110491 Expansion of e.g.f.: sqrt(1+2x)/sqrt(1-2x).
1, 2, 4, 24, 144, 1440, 14400, 201600, 2822400, 50803200, 914457600, 20118067200, 442597478400, 11507534438400, 299195895398400, 8975876861952000, 269276305858560000, 9155394399191040000, 311283409572495360000
Offset: 0
Comments
Row sums of exponential Riordan array [1, arctanh(2x)]. - Paul Barry, Apr 17 2008
Conjecture: {a(n-1), n>=1} is the T-transform of A093178, where T maps a sequence {b(n), n>=1} to the sequence {c(n)} defined by c(n) = det(M_n), where M_n is the n X n matrix with elements M_n(i,j) = b(2*j) for i>j and M_n(i,j) = b(i+j-1) for i<=j. - Lechoslaw Ratajczak, Aug 04 2021
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
Programs
-
Maple
S:= series(sqrt(1+2*x)/sqrt(1-2*x),x,31): seq(coeff(S,x,j)*j!,j=0..30); # Robert Israel, Jun 08 2016
-
Mathematica
With[{nn=20},CoefficientList[Series[Sqrt[1+2x]/Sqrt[1-2x],{x,0,nn}],x] Range[0,nn]!] (* or *) Join[{1},Table[2n!Binomial[n-1,Floor[(n-1)/2]], {n,20}]] (* Harvey P. Dale, Nov 11 2011 *) Table[2^n Binomial[1/2,n] n! Hypergeometric2F1[1/2, -n, 3/2 - n, -1], {n, 0, 20}] (* Benedict W. J. Irwin, Jun 06 2016 *)
-
PARI
my(x='x+O('x^25)); Vec(serlaplace(sqrt(1+2*x)/sqrt(1-2*x))) \\ Michel Marcus, Aug 05 2021
Formula
E.g.f.: sqrt((1+2x)/(1-2x)); a(n)=2*n!*binomial(n-1, floor((n-1)/2))+0^n.
The sequence 0,1,0,2,0,4,... has e.g.f. arctanh(x). - Paul Barry, Apr 17 2008
D-finite with recurrence a(n) -2*a(n-1) -4*(n-1)*(n-2)*a(n-2)=0. - R. J. Mathar, Sep 20 2012
a(n) ~ 2^(n+1)*n^n/exp(n). - Vaclav Kotesovec, Sep 25 2013
a(n) = 2^n*binomial(1/2,n)*n!*2F1(1/2,-n;3/2-n;-1). - Benedict W. J. Irwin, Jun 06 2016
From Robert Israel, Jun 08 2016: (Start)
a(n) = n! * A063886(n).
E.g.f. satisfies 2*g(x)+(4*x^2-1)*g'(x) = 0, from which Mathar's recurrence follows. (End)
Sum_{n>=0} 1/a(n) = 1 + (StruveL(-1,1/2) + StruveL(0,1/2))*Pi/4, where StruveL is the modified Struve function. - Amiram Eldar, Aug 15 2025
A131352 Row sums of triangle A133935.
1, 2, 6, 14, 32, 72, 160, 352, 768, 1664, 3584, 7680, 16384, 34816, 73728, 155648, 327680, 688128, 1441792, 3014656, 6291456, 13107200, 27262976, 56623104, 117440512, 243269632, 503316480, 1040187392, 2147483648, 4429185024
Offset: 0
Examples
a(3) = 14 = sum of row 3 terms of triangle A133935: (1 + 3 + 9 + 1); = (1, 3, 3, 1) dot (1, 1, 3, 1).
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (4,-4).
Programs
-
Mathematica
CoefficientList[Series[(1-2x+2x^2-2x^3)/(1-2x)^2,{x,0,40}],x] (* or *) LinearRecurrence[{4,-4},{1,2,6,14},40] (* Harvey P. Dale, Dec 04 2021 *)
Formula
Binomial transform of A093178: (1, 1, 3, 1, 5, 1, 7, 1...)
a(n) = A129954(n), n>1. G.f.: (1-2x+2x^2-2x^3)/(1-2x)^2. [R. J. Mathar, Dec 13 2008]
a(n) = 2^(n-2)*(n+4) for n>1. - _Colin Barker, Jun 05 2012
Extensions
Extended by R. J. Mathar, Dec 13 2008
A171232 Array read by antidiagonals, T(n,k) = 2*(n/k) - 1, if n mod k = 0; otherwise, T(n,k) = 1.
1, 3, 1, 5, 1, 1, 7, 1, 1, 1, 9, 3, 1, 1, 1, 11, 1, 1, 1, 1, 1, 13, 5, 1, 1, 1, 1, 1, 15, 1, 3, 1, 1, 1, 1, 1, 17, 7, 1, 1, 1, 1, 1, 1, 1, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 21, 9, 5, 3, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 25, 11, 1, 1, 1, 1
Offset: 1
Comments
T(n,1): continued fraction expansion of coth(1).
T(n,2): continued fraction expansion of tan(1) = cot(pi/2 - 1).
Examples
Array begins 1 1 1 1 1 ... 3 1 1 1 1 ... 5 1 1 1 1 ... 7 3 1 1 1 ... 9 1 1 1 1 ... .............
Programs
-
Mathematica
T[n_,k_] := If[Divisible[n, k], 2*(n/k) - 1, 1]; Table[T[n-k+1, k], {n, 1, 10}, {k,1, n}] //Flatten (* Amiram Eldar, Jun 29 2020 *)
Extensions
More terms from Amiram Eldar, Jun 29 2020
Comments