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-17 of 17 results.

A118416 Triangle read by rows: T(n,k) = (2*k-1)*2^(n-1), 0 < k <= n.

Original entry on oeis.org

1, 2, 6, 4, 12, 20, 8, 24, 40, 56, 16, 48, 80, 112, 144, 32, 96, 160, 224, 288, 352, 64, 192, 320, 448, 576, 704, 832, 128, 384, 640, 896, 1152, 1408, 1664, 1920, 256, 768, 1280, 1792, 2304, 2816, 3328, 3840, 4352, 512, 1536, 2560, 3584, 4608, 5632, 6656, 7680
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 27 2006

Keywords

Comments

Row sums give A014477: Sum_{k=1..n} T(n,k) = A014477(n-1);
central terms give A118415; T(2*k-1,k) = A058962(k-1);
T(n,1) = A000079(n-1);
T(n,2) = A007283(n-1) for n > 1;
T(n,3) = A020714(n-1) for n > 2;
T(n,4) = A005009(n-1) for n > 3;
T(n,5) = A005010(n-1) for n > 4;
T(n,n-1) = A118417(n-1) for n > 1;
T(n,n) = A014480(n-1) = A118413(n,n);
A001511(T(n,k)) = A002024(n,k);
A003602(T(n,k)) = A002260(n,k).
The alternating row sums, Sum_{k=1..n} (-1)^(k+1)*T(n,k), are: (a) in odd rows, the central term, T(n,(n+1)/2) = A058962((n-1)/2); (b) in even rows, the negation of the average of the two central terms, -(T(2n,n) + T(2n,+1))/2 = -A018215(m/2). The absolute values of the alternating row sums give the plain row means, Sum_{k=1..n} T(n,k)/n; the alternating sign row means are (-2)^(n-1). - Gregory Gerard Wojnar, Feb 10 2024

Examples

			Triangle begins:
   1;
   2,   6;
   4,  12,  20;
   8,  24,  40,  56;
  16,  48,  80, 112, 144;
  32,  96, 160, 224, 288, 352;
  64, 192, 320, 448, 576, 704, 832;
		

Crossrefs

Programs

  • Haskell
    a118416 n k = a118416_tabl !! (n-1) !! (k-1)
    a118416_row 1 = [1]
    a118416_row n = (map (* 2) $ a118416_row (n-1)) ++ [a014480 (n-1)]
    a118416_tabl = map a118416_row [1..]
    -- Reinhard Zumkeller, Jan 22 2012
    
  • Maple
    A118416 := proc(n,k) 2^(n-1)*(2*k-1) ; end proc: # R. J. Mathar, Sep 04 2011
  • Mathematica
    Flatten[Table[(2k-1)2^(n-1),{n,10},{k,n}]] (* Harvey P. Dale, Aug 26 2014 *)
  • Python
    from math import isqrt
    def A118416(n): return (a:=(m:=isqrt(k:=n<<1))+(k>m*(m+1)))*(1-a)+(n<<1)-1<Chai Wah Wu, Jun 20 2025

Formula

T(n,k) = 2*T(n-1,k), 1 <= k < n; T(n,n) = A014480(n-1).

A117303 Self-inverse permutation of the natural numbers based on the bijection (2*x-1)*2^(y-1) <--> (2*y-1)*2^(x-1).

Original entry on oeis.org

1, 3, 2, 5, 4, 6, 8, 7, 16, 12, 32, 10, 64, 24, 128, 9, 256, 48, 512, 20, 1024, 96, 2048, 14, 4096, 192, 8192, 40, 16384, 384, 32768, 11, 65536, 768, 131072, 80, 262144, 1536, 524288, 28, 1048576, 3072, 2097152, 160, 4194304, 6144, 8388608, 18, 16777216
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 24 2006

Keywords

Comments

a(a(n)) = n; fixed points A014480: a(A014480(n)) = A014480(n). - Reinhard Zumkeller, Apr 27 2006

Crossrefs

Programs

  • Maple
    a:= n-> (j-> (2*j+1)*2^((n/2^j-1)/2))(padic[ordp](n, 2)):
    seq(a(n), n=1..50);  # Alois P. Heinz, Jan 23 2019
  • Mathematica
    a[n_] := (2 IntegerExponent[2 n, 2] - 1)*2^((n/2^IntegerExponent[n, 2] + 1)/2 - 1); Array[a, 50] (* Jean-François Alcover, Mar 12 2019 *)
  • Python
    def A117303(n): return (((m:=(n&-n).bit_length())<<1)-1)*(1<<(n>>m)) # Chai Wah Wu, Jul 14 2022

Formula

a(n) = (2*A001511(n) - 1) * 2^(A003602(n) - 1).

Extensions

Spelling corrected by Jason G. Wurtzel, Aug 23 2010

A052951 Expansion of (1 + x - 2*x^2)/(1 - 2*x)^2.

Original entry on oeis.org

1, 5, 14, 36, 88, 208, 480, 1088, 2432, 5376, 11776, 25600, 55296, 118784, 253952, 540672, 1146880, 2424832, 5111808, 10747904, 22544384, 47185920, 98566144, 205520896, 427819008, 889192448, 1845493760, 3825205248, 7918845952
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Equals binomial transform of A042948 starting with "1": (1, 4, 5, 8, 9, 12, 13, ...) = terms > 0, == 0 or 1 mod 4. - Gary W. Adamson, Feb 07 2009

Crossrefs

Programs

  • GAP
    Concatenation([1], List([1..40], n-> 2^(n-1)*(2*n+3) )); # G. C. Greubel, Oct 21 2019
  • Magma
    I:=[1, 5, 14]; [n le 3 select I[n] else 4*Self(n-1)-4*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Jun 22 2012
    
  • Maple
    spec:= [S,{S=Prod(Union(Sequence(Union(Z,Z)),Z),Sequence(Union(Z,Z)))}, unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
    seq(`if`(n=0, 1, 2^(n-1)*(2*n+3)), n=0..40); # G. C. Greubel, Oct 21 2019
  • Mathematica
    CoefficientList[Series[(1+x-2*x^2)/(1-2*x)^2,{x,0,40}],x] (* Vincenzo Librandi, Jun 22 2012 *)
    LinearRecurrence[{4,-4}, {1,5,14}, 40] (* G. C. Greubel, Oct 21 2019 *)
  • PARI
    x='x+O('x^40); Vec((1+x-2*x^2)/(1-2*x)^2) \\ Altug Alkan, Mar 03 2018
    
  • Sage
    [1]+[2^(n-1)*(2*n+3) for n in (1..40)] # G. C. Greubel, Oct 21 2019
    

Formula

G.f.: (1+x-2*x^2)/(1-2*x)^2.
a(n) = 4*(a(n-1) - a(n-2)).
a(n) = (n+1)*2^n + 2^(n-1), n > 0.
a(n) = A118413(n+1,n-1) for n > 2. - Reinhard Zumkeller, Apr 27 2006
E.g.f.: (1/2)*(-1 + exp(2*x)*(3 + 4*x)). - Stefano Spezia, Oct 22 2019
From Amiram Eldar, Oct 01 2022: (Start)
Sum_{n>=0} 1/a(n) = 4*sqrt(2)*arcsinh(1) - 11/3.
Sum_{n>=0} (-1)^n/a(n) = 13/3 - 4*sqrt(2)*arccot(sqrt(2)). (End)

A118414 a(n) = (2*n - 1) * (2^n - 1).

Original entry on oeis.org

1, 9, 35, 105, 279, 693, 1651, 3825, 8687, 19437, 42987, 94185, 204775, 442341, 950243, 2031585, 4325343, 9175005, 19398619, 40894425, 85983191, 180355029, 377487315, 788529105, 1644167119, 3422552013, 7113539531, 14763950025, 30601641927, 63350767557, 130996502467, 270582939585
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 27 2006

Keywords

Comments

Row sums of triangle A118413.
For fixed n, define a triangle T(r,c) counting down the first n odd numbers on the left side, T(r,1) = 2*(n-r)+1, and counting up odd numbers on the right side, T(r,r) = 2*(n+r)-3, r>1. The interior elements are set by T(r,c)=T(r-1,c-1) + T(r-1,c). The sum of all members in this triangle is a(n). - J. M. Bergot, Oct 12 2012
Row sums of triangle A277046. - Miquel Cerda, Sep 28 2016

Examples

			The triangle T(r,c) for n=4 has row(1)=7; row(2) = 5, 9; row(3) = 3, 14, 11; row(4) = 1, 17, 25, 13, and a sum of 7+5+9+...+13 = 105 = a(4). - _J. M. Bergot_, Oct 12 2012
		

Crossrefs

Programs

  • Magma
    [(2*n-1)*(2^n-1): n in [1..40]]; // Vincenzo Librandi, Dec 26 2010
    
  • Mathematica
    Table[(2 n - 1) (2^n - 1), {n, 32}] (* or *)
    Rest@ CoefficientList[Series[-x (-1 - 3 x + 6 x^2)/((2 x - 1)^2*(x - 1)^2), {x, 0, 32}], x] (* Michael De Vlieger, Sep 26 2016 *)
    LinearRecurrence[{6,-13,12,-4},{1,9,35,105},40] (* Harvey P. Dale, Sep 12 2023 *)
  • PARI
    a(n)=(2*n-1)*(2^n-1) \\ Charles R Greathouse IV, Oct 12 2012

Formula

a(n) = A005408(n-1)*(A000079(n) - 1). Corrected by Omar E. Pol, Sep 26 2016
G.f. -x*(-1-3*x+6*x^2) / ( (2*x-1)^2*(x-1)^2 ). - R. J. Mathar, Oct 15 2012
a(n) = A005408(n-1)*A000225(n). - Miquel Cerda, Sep 26 2016

A118415 a(n) = (4*n - 3) * 2^(n - 1).

Original entry on oeis.org

1, 10, 36, 104, 272, 672, 1600, 3712, 8448, 18944, 41984, 92160, 200704, 434176, 933888, 1998848, 4259840, 9043968, 19136512, 40370176, 84934656, 178257920, 373293056, 780140544, 1627389952, 3388997632, 7046430720, 14629732352, 30333206528, 62813896704
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 27 2006

Keywords

Comments

Central terms of the triangle in A118413.

Crossrefs

Cf. A058962.

Programs

  • Magma
    [(4*n-3)*2^(n-1): n in [1..40]]; // Vincenzo Librandi, Dec 26 2010
  • Mathematica
    CoefficientList[Series[(1 + 6 x)/(-1 + 2 x)^2, {x, 0, 40}], x] (* Vincenzo Librandi, May 21 2014 *)
    LinearRecurrence[{4,-4},{1,10},30] (* Harvey P. Dale, Sep 16 2022 *)

Formula

a(n) = A016813(n-1)*A000079(n-1).
O.g.f.: x*(1+6*x)/(-1+2*x)^2 . - R. J. Mathar, Feb 26 2008

Extensions

More terms from R. J. Mathar, Feb 26 2008

A219931 Coefficients related to an asymptotic expansion of the logarithm of the central binomial.

Original entry on oeis.org

1, 6, 5, 28, 9, 22, 13, 120, 17, 38, 21, 92, 25, 54, 29, 496, 33, 70, 37, 156, 41, 86, 45, 376, 49, 102, 53, 220, 57, 118, 61, 2016, 65, 134, 69, 284, 73, 150, 77, 632, 81, 166, 85, 348, 89, 182, 93, 1520, 97, 198, 101, 412, 105, 214, 109, 888, 113, 230, 117
Offset: 1

Views

Author

Peter Luschny, Dec 01 2012

Keywords

Comments

An asymptotic expansion of the logarithm of the central binomial (A000984) for n>0 is given by log(binomial(2*n,n)) ~ (n*log(16)-log(Pi)-log(n) + sum_{k>=1}((-4)^(-k)*A002425(k)/a(k)*n^(1-2*k)))/2.
An asymptotic expansion of the logarithm of the swinging factorial (A056040) for n>1 is given by log(swing(n)) ~ (n*log(4)-log(Pi)-(-1)^n*(log(n/2) - (1/2)*sum_{k>=1}((-1)^k*A002425(k)/a(k)*n^(1-2*k))))/2.

Examples

			log(binomial(2*n,n)) = n*log(4) - (log(n)+log(Pi))/2 - 1/(8*a(1)*n) + 1/(32*a(2)*n^3) - 1/(128*a(3)*n^5) + 17/(512*a(4)*n^7) - 31/(2048*a(5)*n^9) + 691/(8192*a(6)*n^11) + O(1/n^13).
log(swing(n)) = n*log(2) - (1/2)*log(Pi) - (1/4)*(-1)^n*(2*log(n/2) + 1/(a(1)*n) - 1/(a(2)*n^3) + 1/(a(3)*n^5) - 17/(a(4)*n^7) + 31/(a(5)*n^9) - 691/(a(6)*n^11)) + O(1/n^13).
		

Crossrefs

Programs

  • Maple
    Coeff_list := proc(len) local n;
    asympt(ln(n/2)/2+lnGAMMA(n/2+1/2)-lnGAMMA(n/2+1),n,2*len+3);
    subs(n=1/n,simplify(convert(%,polynom)));
    [seq(4*coeff(unapply(%,n)(n),n,2*k+1),k=0..len-1)] end:
    A219931_list := n -> denom(Coeff_list(n)); A219931_list(59);
  • Mathematica
    max = 60; s = Normal[Series[Log[x/2]/2+LogGamma[x/2+1/2]-LogGamma[x/2+1], {x, Infinity, 2*max}]] /. x -> 1/x; a[n_] := Denominator[4*Coefficient[s, x^(2*n-1), 1]]; Table[a[n], {n, 1, max}] (* Jean-François Alcover, Feb 17 2014 *)
    a[n_] := Denominator[2*EulerE[2*n-1, 1]/(2*n-1)]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Apr 04 2014, after Peter Luschny *)

Formula

a(n) = denominator(2*E(2*n-1, 1)/(2*n-1)) where E(n, x) is the Euler polynomial. - Peter Luschny, Apr 03 2014
Warning: a(n) != (2*n-1)*2^valuation(n, 2). This was mistakenly assumed several times in the past, see A385054. - Peter Luschny, Jun 17 2025

Extensions

Edited and incorrect entries removed by Georg Fischer and Peter Luschny, Jun 16 2025

A277046 Triangle read by rows: T(n,k) = 2^n - n + k - 1 for n >= 1, with 1 <= k <= 2n-1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 27, 28, 29, 30, 31, 32, 33, 34, 35, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519
Offset: 1

Views

Author

Miquel Cerda, Sep 27 2016

Keywords

Examples

			Triangle begins:
1;
2,   3,  4;
5,   6,  7,  8,  9;
12, 13, 14, 15, 16, 17, 18;
27, 28, 29, 30, 31, 32, 33, 34, 35;
58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68;
...
Written as an isosceles triangle the sequence begins:
.                      1;
.                  2,  3,  4;
.              5,  6,  7,  8,  9;
.         12, 13, 14, 15, 16, 17, 18;
.     27, 28, 29, 30, 31, 32, 33, 34, 35;
. 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68;
..
		

Crossrefs

Row lengths are A005408.
Row sums give A118414.
Column 1 gives A000325, n>=1.
Middle diagonal gives A000225.
Right border gives A083706.
Cf. A118413.

Programs

  • Mathematica
    Table[2^n-n+k-1,{n,10},{k,2n-1}]//Flatten (* Harvey P. Dale, Nov 27 2021 *)

Extensions

Definition from Omar E. Pol, Sep 28 2016
Previous Showing 11-17 of 17 results.