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.

Showing 1-7 of 7 results.

A036289 a(n) = n*2^n.

Original entry on oeis.org

0, 2, 8, 24, 64, 160, 384, 896, 2048, 4608, 10240, 22528, 49152, 106496, 229376, 491520, 1048576, 2228224, 4718592, 9961472, 20971520, 44040192, 92274688, 192937984, 402653184, 838860800, 1744830464, 3623878656, 7516192768, 15569256448, 32212254720
Offset: 0

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Right side of the binomial sum Sum_{i = 0..n} (n-2*i)^2 * binomial(n, i) = n*2^n. - Yong Kong (ykong(AT)curagen.com), Dec 28 2000
Let W be a binary relation on the power set P(A) of a set A having n = |A| elements such that for all elements x, y of P(A), xRy if x is a proper subset of y and there are no z in P(A) such that x is a proper subset of z and z is a proper subset of y, or y is a proper subset of x and there are no z in P(A) such that y is a proper subset of z and z is a proper subset of x. Then a(n) = |W|. - Ross La Haye, Sep 26 2007
Partial sums give A036799. - Vladimir Joseph Stephan Orlovsky, Jul 09 2011
a(n) = n with the bits shifted to the left by n places (new bits on the right hand side are zeros). - Indranil Ghosh, Jan 05 2017
Satisfies Benford's law [Theodore P. Hill, Personal communication, Feb 06, 2017]. - N. J. A. Sloane, Feb 08 2017
Also the circumference of the n-cube connected cycle graph. - Eric W. Weisstein, Sep 03 2017
a(n) is also the number of derangements in S_{n+3} with a descent set of {i, i+1} such that i ranges from 1 to n-2. - Isabella Huang, Mar 17 2018
a(n-1) is also the number of multiplications required to compute the permanent of general n X n matrices using Glynn's formula (see Theorem 2.1 in Glynn). - Stefano Spezia, Oct 27 2021

References

  • Arno Berger and Theodore P. Hill. An Introduction to Benford's Law. Princeton University Press, 2015.
  • A. P. Prudnikov, Yu. A. Brychkov and O.I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992, Eq. (4.2.2.29)

Crossrefs

Equals 2*A001787. Equals A003261(n) + 1.

Programs

  • Haskell
    a036289 n = n * 2 ^ n
    a036289_list = zipWith (*) [0..] a000079_list
    -- Reinhard Zumkeller, Mar 05 2012
    
  • Maple
    g:=1/(1-2*z): gser:=series(g, z=0, 43): seq(coeff(gser, z, n)*n, n=0..34); # Zerinvary Lajos, Jan 11 2009
  • Mathematica
    Table[n*2^n, {n, 0, 50}] (* Vladimir Joseph Stephan Orlovsky, Mar 18 2010 *)
    LinearRecurrence[{4,-4},{0,2},40] (* Harvey P. Dale, Mar 02 2018 *)
  • PARI
    a(n)=n<Charles R Greathouse IV, Jun 15 2011
    
  • Python
    a=lambda n: n<Indranil Ghosh, Jan 05 2017

Formula

Main diagonal of array (A085454) defined by T(i, 1) = i, T(1, j) = 2j, T(i, j) = T(i-1, j) + T(i-1, j-1). - Benoit Cloitre, Aug 05 2003
Binomial transform of A005843, the even numbers. - Joshua Zucker, Jan 13 2006
G.f.: 2*x/(1-2*x)^2. - R. J. Mathar, Nov 21 2007
a(n) = A000079(n)*n. - Omar E. Pol, Dec 21 2008
E.g.f.: 2*x exp(2*x). - Geoffrey Critzer, Oct 03 2011
a(n) = A002064(n) - 1. - Reinhard Zumkeller, Mar 16 2013
From Vaclav Kotesovec, Feb 14 2015: (Start)
Sum_{n>=1} 1/a(n) = log(2).
Sum_{n>=1} (-1)^(n+1)/a(n) = log(3/2).
(End)

A134401 Row sums of triangle A134400.

Original entry on oeis.org

1, 2, 8, 24, 64, 160, 384, 896, 2048, 4608, 10240, 22528, 49152, 106496, 229376, 491520, 1048576, 2228224, 4718592, 9961472, 20971520, 44040192, 92274688, 192937984, 402653184, 838860800, 1744830464, 3623878656, 7516192768
Offset: 0

Views

Author

Gary W. Adamson, Oct 23 2007

Keywords

Comments

Essentially the same sequence as A036289.
An elephant sequence, see A175654. For the corner squares four A[5] vectors, with decimal values 187, 190, 250 and 442, lead to this sequence. For the central square these vectors lead to the companion sequence 2*A001792, for n >= 1 and a(0)=1. - Johannes W. Meijer, Aug 15 2010
Number of vertices on a partially truncated n-cube (column 1 of A271316). - Vincent J. Matsko, Apr 07 2016

Examples

			a(3) = 24 = sum of row 3 terms of triangle A134400: (3 + 9 + 9 + 3).
a(3) = 24 = (1, 3, 3, 1) dot (1, 1, 5, 5) = (1 + 3 + 15 + 5).
		

Crossrefs

Programs

  • GAP
    a:=Concatenation([1],List([1..30],n->n*2^n)); # Muniru A Asiru, Oct 28 2018
  • Maple
    1,seq(n*2^n,n=1..30); # Muniru A Asiru, Oct 28 2018
  • Mathematica
    F = Function[x, x*2^x];F[Range[1, 10]] (* Eugeny Yakimovitch (Eugeny.Yakimovitch(AT)gmail.com), Jan 08 2008 *)
    {1}~Join~Table[n 2^n, {n, 28}] (* or *) Total /@ Join[{{1}}, Table[n Binomial[n, k], {n, 28}, {k, 0, n}]] (* Michael De Vlieger, Apr 07 2016 *)
  • PARI
    x='x+O('x^99); Vec((1-2*x+4*x^2)/(1-2*x)^2) \\ Altug Alkan, Apr 07 2016
    

Formula

Binomial transform of repeats of (4n+1): [1, 1, 5, 5, 9, 9, 13, 13, ...].
a(n) = n*2^n, n > 1. - Eugeny Yakimovitch (Eugeny.Yakimovitch(AT)gmail.com), Jan 08 2008
From Colin Barker, Jul 29 2012: (Start)
a(n) = 4*a(n-1) - 4*a(n-2) for n > 2.
G.f.: (1 - 2*x + 4*x^2)/(1-2*x)^2. (End)
E.g.f.: 1-E(0) where E(k)=1 - (k+1)/(1 - 2*x/(2*x - (k+1)^2/E(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 07 2012
a(n) = A097064(n+1) for n >= 1. - Georg Fischer, Oct 28 2018
E.g.f.: 1 + 2*exp(2*x)*x. - Stefano Spezia, Feb 12 2023

Extensions

More terms from Johannes W. Meijer, Aug 15 2010

A097062 Interleave 2*n+1 and 2*n-1.

Original entry on oeis.org

1, -1, 3, 1, 5, 3, 7, 5, 9, 7, 11, 9, 13, 11, 15, 13, 17, 15, 19, 17, 21, 19, 23, 21, 25, 23, 27, 25, 29, 27, 31, 29, 33, 31, 35, 33, 37, 35, 39, 37, 41, 39, 43, 41, 45, 43, 47, 45, 49, 47, 51, 49, 53, 51, 55, 53, 57, 55, 59, 57, 61, 59, 63, 61, 65, 63, 67, 65, 69, 67, 71, 69, 73, 71, 75, 73, 77, 75, 79, 77, 81, 79, 83, 81, 85, 83, 87, 85
Offset: 0

Views

Author

Paul Barry, Jul 22 2004

Keywords

Comments

Partial sums are A097063, whose pairwise sums are A002061.
Binomial transform is A097064.

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a097062 n = a097062_list !! n
    a097062_list = concat $ transpose [a005408_list, (-1) : a005408_list]
    -- Reinhard Zumkeller, Apr 16 2015
    
  • Magma
    [(2*n-1)/2 + 3*(-1)^n/2 : n in [0..100]]; // Wesley Ivan Hurt, May 22 2021
  • Mathematica
    LinearRecurrence[{1, 1, -1}, {1, -1, 3}, 100] (* Amiram Eldar, May 21 2021 *)
    With[{nn=91},Riffle[Range[1,nn,2],Range[-1,nn-2,2]]] (* Harvey P. Dale, Jan 23 2023 *)
  • PARI
    a(n)=(2*n-1)/2+3*(-1)^n/2 \\ Charles R Greathouse IV, Oct 07 2015
    
  • PARI
    Vec((1-2*x+3*x^2)/((1-x^2)*(1-x)) + O(x^100)) \\ Altug Alkan, Nov 13 2015
    

Formula

G.f.: (1-2*x+3*x^2)/((1-x^2)*(1-x)).
a(n) = (2*n-1)/2 + 3*(-1)^n/2.
a(n) = 2*(n-1) - a(n-1), with a(0)=1. - Vincenzo Librandi, Nov 16 2010
a(n) = n - 2 + 3*((n-1) mod 2). - Lechoslaw Ratajczak, May 21 2021
a(n) = a(n-1)+a(n-2)-a(n-3). - Wesley Ivan Hurt, May 21 2021

A068566 Numerator of Sum_{k=1..n} 1/(k * 2^k).

Original entry on oeis.org

1, 5, 2, 131, 661, 1327, 1163, 148969, 447047, 44711, 983705, 7869871, 102309709, 204620705, 31972079, 32739453941, 556571077357, 556571247527, 10574855234543, 42299423848079, 42299425233749, 84598851790183
Offset: 1

Views

Author

Benoit Cloitre, Mar 25 2002

Keywords

Comments

Sum_{k>=1} 1/(k * 2^k) = log(2).
From Paul Curtz, Jun 11 2019: (Start)
(Link) page 9:
T0 = 1/2 = 1/2
T1 = 1/2 + 1/8 = 5/8
T2 = 5/8 + 1/24 = 2/3
T3 = 2/3 + 1/64 = 131/192
T4 = 131/192 + 1/160 = 661/960
(T5 = 661/960 + 1/384 = 1327/1920)
... .
a(n)/A068565(n) is the first and the third column.
The denominators of the second column are essentially A036289, A097064 and A134401. (End)

Crossrefs

Programs

  • GAP
    List([1..30], n-> NumeratorRat( Sum([1..n], k-> 1/(2^k*k)) ) ) # G. C. Greubel, Jun 30 2019
  • Magma
    [Numerator( (&+[1/(2^k*k): k in [1..n]]) ): n in [1..30]]; // G. C. Greubel, Jun 30 2019
    
  • Maple
    map(numer, ListTools:-PartialSums([seq(1/k/2^k,k=1..100)])); # Robert Israel, Jul 10 2015
  • Mathematica
    Numerator[Accumulate[Table[1/(k 2^k),{k,30}]]] (* Harvey P. Dale, May 11 2013 *)
    a[n_]:=Log[2]-Hypergeometric2F1[1+n,1+n,2+n,-1]/(1+n);
    Numerator[Table[Simplify[a[n]],{n,1,30}]] (* Gerry Martens, Aug 06 2015 *)
  • PARI
    vector(30, n, numerator(sum(k=1,n, 1/(k * 2^k)))) \\ Michel Marcus, Aug 07 2015
    
  • Sage
    [numerator( sum(1/(2^k*k) for k in (1..n)) ) for n in (1..30)] # G. C. Greubel, Jun 30 2019
    

Formula

From Peter Bala, Feb 05 2024: (Start)
Integral_{x = 0..1} x^n/(1 + x)^(n+1) dx = log(2) - Sum_{k = 1..n} 1/(k * 2^k).
Hence a(n) = the numerator of Integral_{x = 0..1} ((1 + x)^n - x^n)/(1 + x)^(n+1) dx.
Integral_{x = 0..1/2} x^n/(1 - x) dx = Integral_{x >= 2} 1/(x^(n+2) - x^(n+1)) dx = log(2) - a(n)/A068565(n). (End)

A099855 a(n) = n*2^n - 2^(n/2)*sin(Pi*n/4).

Original entry on oeis.org

0, 1, 6, 22, 64, 164, 392, 904, 2048, 4592, 10208, 22496, 49152, 106560, 229504, 491648, 1048576, 2227968, 4718080, 9960960, 20971520, 44041216, 92276736, 192940032, 402653184, 838856704, 1744822272, 3623870464, 7516192768
Offset: 0

Views

Author

Paul Barry, Oct 28 2004

Keywords

Comments

Related to binomial transform of A002265. Sequence is identical to its fourth differences (cf. A139756, A137221). See also A097064, A135035, A038504, A135356. - Paul Curtz, Jun 18 2008

Crossrefs

Binomial transform of A047538.

Programs

  • Magma
    I:=[0,1,6,22]; [n le 4 select I[n] else 6*Self(n-1) -14*Self(n-2) +16*Self(n-3) -8*Self(n-4): n in [1..51]]; // G. C. Greubel, Apr 20 2023
    
  • Mathematica
    LinearRecurrence[{6,-14,16,-8},{0,1,6,22},30] (* Harvey P. Dale, Mar 22 2018 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A099855
        if (n<5): return (0,1,6,22,64)[n]
        else: return 6*a(n-1) - 14*a(n-2) + 16*a(n-3) - 8*a(n-4)
    [a(n) for n in range(51)] # G. C. Greubel, Apr 20 2023

Formula

G.f.: x/((1-2*x+2*x^2)*(1-4*x+4*x^2)).
a(n) = Sum_{k=0..n} 2^(k/2)*sin(Pi*k/4)*2^(n-k)*(n-k+1).
a(n) = 6*a(n-1) - 14*a(n-2) + 16*a(n-3) - 8*a(n-4).
a(n) = 2*A001787(n) - A009545(n).

A113679 Expansion of (1-x-2x^2)/(1-x).

Original entry on oeis.org

1, 0, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2
Offset: 0

Views

Author

Paul Barry, Nov 04 2005

Keywords

Comments

From Gary W. Adamson, Mar 06 2012: (Start)
Signed (1, 0, -2, 2, -2, 2, ...) and convolved with the Toothpick sequence A139250 = A151548: (1, 3, 5, 7, 5, 11, ...). The inverse of (1, 0, -2, 2, -2, ...) = A151575: (1, 0, 2, -2, 6, -10, 22, ...).
The unsigned sequence convolved with:
(1, 2, 3, ...) = A002523, (n^2 + 1). Convolved with:
(A001045) = .... A097064: (1, 1, 5, 9, 21, 41, ...).
(End)

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1-x-2x^2)/(1-x),{x,0,80}],x] (* or *) Join[{1,0}, PadRight[{},80,-2]] (* Harvey P. Dale, Mar 05 2012 *)

Formula

a(n) = C(0, n) + 2*C(1, n) - 2.

A370469 Triangle read by columns where T(n,k) is the number of points in Z^n such that |x1| + ... + |xn| = k, |x1|, ..., |xn| > 0.

Original entry on oeis.org

2, 2, 4, 2, 8, 8, 2, 12, 24, 16, 2, 16, 48, 64, 32, 2, 20, 80, 160, 160, 64, 2, 24, 120, 320, 480, 384, 128, 2, 28, 168, 560, 1120, 1344, 896, 256, 2, 32, 224, 896, 2240, 3584, 3584, 2048, 512, 2, 36, 288, 1344, 4032, 8064, 10752, 9216, 4608, 1024
Offset: 1

Views

Author

Shel Kaphan, Mar 30 2024

Keywords

Comments

T(n,k) is the number of points on the n-dimensional cross polytope with facets at distance k from the origin which have no coordinate equal to 0.
T(n,n) = 2^n. The (n-1)-dimensional simplex at distance n from the origin in Z^n has exactly 1 point with no zero coordinates, at (1,1,...,1). There are 2^n (n-1)-dimensional simplexes at distance n from the origin as part of the cross polytope in Z^n. (The lower dimensional facets do not count as they have at least one 0 coordinate.)
T(2*n,3*n) = T(2*n+1,3*n), and this is A036909.

Examples

			 n\k 1 2 3  4  5   6   7    8    9    10    11    12     13     14      15
   -----------------------------------------------------------------------
 1 | 2 2 2  2  2   2   2    2    2     2     2     2      2      2       2
 2 |   4 8 12 16  20  24   28   32    36    40    44     48     52      56
 3 |     8 24 48  80 120  168  224   288   360   440    528    624     728
 4 |       16 64 160 320  560  896  1344  1920  2640   3520   4576    5824
 5 |          32 160 480 1120 2240  4032  6720 10560  15840  22880   32032
 6 |              64 384 1344 3584  8064 16128 29568  50688  82368  128128
 7 |                 128  896 3584 10752 26880 59136 118272 219648  384384
 8 |                      256 2048  9216 30720 84480 202752 439296  878592
 9 |                           512  4608 23040 84480 253440 658944 1537536
10 |                                1024 10240 56320 225280 732160 2050048
11 |                                      2048 22528 135168 585728 2050048
12 |                                            4096  49152 319488 1490944
13 |                                                   8192 106496  745472
14 |                                                         16384  229376
15 |                                                                 32768
The cross polytope in Z^3 (the octahedron) with points at distance 3 from the origin has 8 triangle facets, each with edge length 4. There is one point in the center of each triangle with coordinates (+-1,+-1,+-1).
		

Crossrefs

Cf. A033996, A333714 (n=3)
Cf. A102860 (n=4).
Cf. A036289, A097064, A134401 (+1-diagonal).
Cf. A001815 (+2-diagonal).
Cf. A371064.
Cf. A036909.
2 * A013609.

Programs

  • Mathematica
    T[n_,k_]:=Binomial[k-1,n-1]*2^n; Table[T[n,k],{k,10},{n,k}]//Flatten
  • Python
    from math import comb
    def A370469_T(n,k): return comb(k-1,n-1)<Chai Wah Wu, Apr 25 2024

Formula

T(n,k) = binomial(k-1,n-1)*2^n.
G.f.: 2*x*y/(1 - y - 2*x*y). - Stefano Spezia, Apr 27 2024
Showing 1-7 of 7 results.