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 11-20 of 27 results. Next

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.

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Dec 10 2011

Keywords

Comments

Riordan array (1/(1-x), x^2/(1-x)^2).
A skewed version of triangular array A085478.
Mirror image of triangle in A098158.
Sum_{k, 0<=k<=n} T(n,k)*x^k = A138229(n), A006495(n), A138230(n),A087455(n), A146559(n), A000012(n), A011782(n), A001333(n),A026150(n), A046717(n), A084057(n), A002533(n), A083098(n),A084058(n), A003665(n), A002535(n), A133294(n), A090042(n),A125816(n), A133343(n), A133345(n), A120612(n), A133356(n), A125818(n) for x = -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 respectively.
Sum_{k, 0<=k<=n} T(n,k)*x^(n-k) = A009116(n), A000007(n), A011782(n), A006012(n), A083881(n), A081335(n), A090139(n), A145301(n), A145302(n), A145303(n), A143079(n) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 respectively.
From Gus Wiseman, Jul 08 2025: (Start)
After the first row this is also the number of subsets of {1..n-1} with k maximal runs (sequences of consecutive elements increasing by 1) for k = 0..n. For example, row n = 5 counts the following subsets:
{} {1} {1,3} . . .
{2} {1,4}
{3} {2,4}
{4} {1,2,4}
{1,2} {1,3,4}
{2,3}
{3,4}
{1,2,3}
{2,3,4}
{1,2,3,4}
Requiring n-1 gives A202064.
For anti-runs instead of runs we have A384893.
(End)

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

Column k = 1 is A000217.
Column k = 2 is A000332.
Row sums are A011782 (or A000079 shifted right).
Removing all zeros gives A034839 (requiring n-1 A034867).
Last nonzero term in each row appears to be A093178, requiring n-1 A124625.
Reversing rows gives A098158, without zeros A109446.
Without the k = 0 column we get A210039.
Row maxima appear to be A214282.
A116674 counts strict partitions by number of maximal runs, for anti-runs A384905.
A268193 counts integer partitions by number of maximal runs, for anti-runs A384881.

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.

Original entry on oeis.org

1, 1, 3, 15, 35, 315, 693, 9009, 19305, 328185, 692835, 14549535, 30421755, 760543875, 1579591125, 45808142625, 94670161425, 3124115327025, 6432002143875, 237984079323375, 488493636505875, 20028239096740875
Offset: 1

Author

Johannes W. Meijer, Jun 18 2009

Keywords

Crossrefs

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
    

Formula

a(n) = product((2*n-3-2*k), k=0..floor(n/2-1)).
numer(a(n+2)/a(n+1)) = A005408(n) for n=>0.
denom(a(n+2)/a(n+1)) = A093178(n) for n=>0.

A289296 a(n) = (n - 1)*(2*floor(n/2) + 1).

Original entry on oeis.org

-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

Author

Keywords

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

Crossrefs

Subsequence of A214297.

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) = A023443(n) * A109613(n).
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).

Original entry on oeis.org

1, -1, 2, -6, 30, -210, 1890, -20790, 270270, -4054050, 68918850, -1309458150, 27498621150, -632468286450, 15811707161250, -426916093353750, 12380566707258750, -383797567925021250, 12665319741525701250
Offset: 1

Author

Paul Curtz, May 17 2007

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 ].
Row sums of M are 1, 2, 5, 12, 25, 46, ... (see A116731); diagonal sums of M are 1, 1, 2, 4, 7, 13, 20, 32, 45, 65, 86, 116, 147, 189, ... with first differences 0, 1, 2, 3, 6, 7, 12, 13, 20, 21, 30, 31, 42, ... and second differences 1, 1, 1, 3, 1, 5, 1, 7, 1, 9, 1, 11, ... (see A093178).

Crossrefs

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.

Original entry on oeis.org

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

Author

Boris Putievskiy, Aug 29 2024

Keywords

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;
		

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.
T(n,1) = A188568(n). T(1,k) = A093178(k). T(n,n) = A124625(n). L(n,1) = A002024(n). L(n,2) = A000194(n). L(n,3) = A111651(n). L(n,4) = A371355(n). R(n,1) = A002260(n). R(n,2) = A074294(n).

A062557 2n-1 1's followed by a 2.

Original entry on oeis.org

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

Author

Jason Earls, Jul 02 2001

Keywords

Comments

Is the number .12111211111211111112... irrational?

Crossrefs

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}.

Original entry on oeis.org

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

Author

Clark Kimberling, Jun 19 2013

Keywords

Examples

			median{1, 1/2, 1/3, 1/4} = (1/2 + 1/3)/2 = 7/12, so that a(4) = 12.
		

Crossrefs

Cf. A093178 (numerators), A061579.

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).

Original entry on oeis.org

1, 2, 4, 24, 144, 1440, 14400, 201600, 2822400, 50803200, 914457600, 20118067200, 442597478400, 11507534438400, 299195895398400, 8975876861952000, 269276305858560000, 9155394399191040000, 311283409572495360000
Offset: 0

Author

Paul Barry, Jul 22 2005

Keywords

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

Crossrefs

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.

Original entry on oeis.org

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

Author

Gary W. Adamson, Sep 29 2007

Keywords

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).
		

Crossrefs

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.

Original entry on oeis.org

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

Author

Ross La Haye, Dec 05 2009

Keywords

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 ...
.............
		

Crossrefs

Cf. T(n, 1) = A005408(n-1), T(n, 2) = A093178(n-1), A171233, A077049.

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 *)

Formula

T(n,k) = A171233(n,k) - A077049(n,k).

Extensions

More terms from Amiram Eldar, Jun 29 2020
Previous Showing 11-20 of 27 results. Next