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

A079859 a(n) = n*2^(n-4).

Original entry on oeis.org

4, 10, 24, 56, 128, 288, 640, 1408, 3072, 6656, 14336, 30720, 65536, 139264, 294912, 622592, 1310720, 2752512, 5767168, 12058624, 25165824, 52428800, 109051904, 226492416, 469762048, 973078528, 2013265920, 4160749568, 8589934592, 17716740096, 36507222016
Offset: 4

Views

Author

Silvia Heubach (sheubac(AT)calstatela.edu), Jan 11 2003

Keywords

Comments

a(n) = the number of occurrences of 3s in the palindromic compositions of m = 2*n-1 = the number of occurrences of 4s in the palindromic compositions of k = 2*n.
This sequence is part of a family of sequences, namely R(n,k), the number of ks in palindromic compositions of n. See also A057711, A001792, A078836, A079861, A079862, A079863. General formula: R(n,k)=2^(floor(n/2) - k) * (2 + floor(n/2) - k) if n and k have different parity and R(n,k)=2^(floor(n/2) - k) * (2 + floor(n/2) - k + 2^(floor((k+1)/2 - 1)) otherwise, for n >= 2k.
Number of 2 X n binary matrices avoiding simultaneously the right angled numbered polyomino patterns (ranpp) (00;1), (10;0) and (01;1). An occurrence of a ranpp (xy;z) in a matrix A=(a(i,j)) is a triple (a(i1,j1), a(i1,j2), a(i2,j1)) where i1Sergey Kitaev, Nov 11 2004
a(n) appears to be the coefficient of Pi^n in the closed-form expression for the expected value of X^n, where X is the area of a spherical triangle formed by three random points on the unit sphere. (The n*2^(n-4) formula applies when n=2,3 as well, and produces fractional coefficients.) - Drake Thomas, Jan 24 2021

Examples

			a(4)=4 since the palindromic compositions of 7 that contain a 3 are 2+3+2, 1+1+3+1+1 and 3+1+3, for a total of 4 3s. The palindromic compositions of 8 that contain a 4 are 2+4+2, 1+1+4+1+1 and 4+4.
		

Crossrefs

Main diagonal of A049089.

Programs

  • Magma
    [n*2^(n-4) : n in [4..40]]; // Vincenzo Librandi, Sep 22 2011
    
  • Mathematica
    Table[i*2^(i - 4), {i, 4, 50}]
  • PARI
    Vec(-2*x^4*(3*x-2)/(2*x-1)^2 + O(x^50)) \\ Colin Barker, Sep 29 2015
    
  • PARI
    a(n) = n*2^(n-4);
    vector(40, n, a(n+3)) \\ Altug Alkan, Sep 29 2015

Formula

O.g.f.: 2*x^4*(2-3*x)/(1-2*x)^2. a(n) = 2*A045623(n-3). - R. J. Mathar, Jun 13 2008
a(n) = 4*a(n-1) - 4*a(n-2) for n>5. - Colin Barker, Sep 29 2015
From Amiram Eldar, Jan 12 2021: (Start)
Sum_{n>=4} 1/a(n) = 16*log(2) - 32/3.
Sum_{n>=4} (-1)^n/a(n) = 20/3 - 16*log(3/2). (End)
E.g.f.: x*(exp(2*x) - 1 - 2*x - 2*x^2)/8. - Stefano Spezia, Apr 06 2021

A079861 a(n) is the number of occurrences of 7's in the palindromic compositions of 2*n-1, or also, the number of occurrences of 8's in the palindromic compositions of 2*n.

Original entry on oeis.org

10, 22, 48, 104, 224, 480, 1024, 2176, 4608, 9728, 20480, 43008, 90112, 188416, 393216, 819200, 1703936, 3538944, 7340032, 15204352, 31457280, 65011712, 134217728, 276824064, 570425344, 1174405120, 2415919104, 4966055936
Offset: 8

Views

Author

Silvia Heubach (sheubac(AT)calstatela.edu), Jan 11 2003

Keywords

Comments

This sequence is part of a family of sequences, namely R(n,k), the number of k's in palindromic compositions of n. See also A057711, A001792, A078836, A079861, A079862. General formula: R(n,k) = 2^(floor(n/2) - k) * (2 + floor(n/2) - k) if n and k have different parity and R(n,k) = 2^(floor(n/2) - k) * (2 + floor(n/2) - k + 2^(floor((k+1)/2 - 1)) otherwise, for n >= 2*k.

Examples

			a(8)=10 since the palindromic compositions of 15 that contain a 7 are 7+1+7, 4+7+4, 1+3+7+3+1, 3+1+7+1+3, 2+2+7+2+2, 1+1+1+1+7+1+1+1+1, 1+1+2+7+2+1+1, 1+2+1+7+1+2+1 and 2+1+1+7+1+1+2, for a total of 10 7's.
		

Crossrefs

Programs

  • Magma
    [(2+n)*2^(n-8) : n in [8..40]]; // Vincenzo Librandi, Sep 22 2011
    
  • Mathematica
    Table[(2 + i)*2^(i - 8), {i, 8, 50}]
    LinearRecurrence[{4,-4},{10,22},50] (* Harvey P. Dale, Jun 04 2025 *)
  • PARI
    Vec(-2*x^8*(9*x-5)/(2*x-1)^2 + O(x^100)) \\ Colin Barker, Dec 16 2014

Formula

a(n) = (2+n)*2^(n-8).
a(n) = 2*A111297(n-6). - Colin Barker, Dec 16 2014
a(n) = 4*a(n-1) - 4*a(n-2). - Colin Barker, Dec 16 2014
G.f.: -2*x^8*(9*x-5) / (2*x-1)^2. - Colin Barker, Dec 16 2014
From Amiram Eldar, Jan 13 2021: (Start)
Sum_{n>=8} 1/a(n) = 1024*log(2) - 447047/630.
Sum_{n>=8} (-1)^n/a(n) = 261617/630 - 1024*log(3/2). (End)

A079862 a(i) = the number of occurrences of 9's in the palindromic compositions of n=2*i-1 = the number of occurrences of 10's in the palindromic compositions of n=2*i.

Original entry on oeis.org

18, 38, 80, 168, 352, 736, 1536, 3200, 6656, 13824, 28672, 59392, 122880, 253952, 524288, 1081344, 2228224, 4587520, 9437184, 19398656, 39845888, 81788928, 167772160, 343932928, 704643072, 1442840576, 2952790016, 6039797760, 12348030976, 25232932864
Offset: 10

Views

Author

Silvia Heubach (sheubac(AT)calstatela.edu), Jan 11 2003

Keywords

Comments

This sequence is part of a family of sequences, namely R(n,k), the number of ks in palindromic compositions of n. See also A057711, A001792, A078836, A079861, A079862. General formula: R(n,k)=2^(floor(n/2) - k) * (2 + floor(n/2) - k) if n and k have different parity and R(n,k)=2^(floor(n/2) - k) * (2 + floor(n/2) - k + 2^(floor((k+1)/2 - 1)) otherwise, for n >= 2k.

Examples

			a(10) = 18 since the palindromic compositions of 19 that contain a 9 are 9+1+9 and the 16 compositions of the form c+9+(reverse of c), where c represents a composition of 5.
		

Crossrefs

Programs

  • Mathematica
    Table[(8 + i)*2^(i - 10), {i, 10, 50}]
  • PARI
    Vec(-2*x^10*(17*x-9)/(2*x-1)^2 + O(x^100)) \\ Colin Barker, Sep 29 2015

Formula

a(n) = (n+8)*2^(n-10).
From Colin Barker, Sep 29 2015: (Start)
a(n) = 2*A159697(n-10).
a(n) = 4*a(n-1) - 4*a(n-2) for n>11.
G.f.: -2*x^10*(17*x-9) / (2*x-1)^2.
(End)

A079863 a(n) is the number of occurrences of 11s in the palindromic compositions of m=2*n-1 = the number of occurrences of 12s in the palindromic compositions of m=2*n.

Original entry on oeis.org

34, 70, 144, 296, 608, 1248, 2560, 5248, 10752, 22016, 45056, 92160, 188416, 385024, 786432, 1605632, 3276800, 6684672, 13631488, 27787264, 56623104, 115343360, 234881024, 478150656, 973078528, 1979711488, 4026531840, 8187281408, 16642998272, 33822867456
Offset: 12

Views

Author

Silvia Heubach (sheubac(AT)calstatela.edu), Jan 11 2003

Keywords

Comments

This sequence is part of a family of sequences, namely R(n,k), the number of ks in palindromic compositions of n. See also A057711, A001792, A078836, A079861, A079862. General formula: R(n,k)=2^(floor(n/2) - k) * (2 + floor(n/2) - k) if n and k have different parity and R(n,k)=2^(floor(n/2) - k) * (2 + floor(n/2) - k + 2^(floor((k+1)/2 - 1)) otherwise, for n >= 2k.

Examples

			a(12) = 34 since the palindromic compositions of 23 that contain a 11 are 11+1+11 and the 32 compositions of the form c+11+(reverse of c), where c represents a composition of 6.
		

Crossrefs

Programs

  • Mathematica
    Table[(22 + i)*2^(i - 12), {i, 12, 50}]
    LinearRecurrence[{4,-4},{34,70},30] (* Harvey P. Dale, Jan 30 2017 *)
  • PARI
    Vec(-2*x^12*(33*x-17)/(2*x-1)^2 + O(x^100)) \\ Colin Barker, Sep 29 2015
    
  • PARI
    a(n)=(n+22)<<(n-12) \\ Charles R Greathouse IV, Sep 29 2015

Formula

a(n) = (n+22)*2^(n-12).
From Colin Barker, Sep 29 2015: (Start)
a(n) = 4*a(n-1) - 4*a(n-2) for n>13.
G.f.: -2*x^12*(33*x-17) / (2*x-1)^2.
(End)

A129954 Second differences of A129952.

Original entry on oeis.org

1, 3, 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

Views

Author

Paul Curtz, Jun 10 2007

Keywords

Comments

First differences of A129953: a(n) = A129953(n+1) - A129953(n).
Essentially the same as A078836: a(n) = A078836(n+4) for n > 1.

Crossrefs

Programs

  • Magma
    m:=16; S:=&cat[ [ 1, 2*i ]: i in [0..m] ]; T:=[ &+[ Binomial(j-1, k-1)*S[k]: k in [1..j] ]: j in [1..2*m] ]; U:=[ T[n+1]-T[n]: n in[1..2*m-1] ]; [ U[n+1]-U[n]: n in[1..2*m-2] ]; // Klaus Brockhaus, Jun 17 2007
    
  • PARI
    {m=29; print1(1, ",", 3, ","); for(n=2, m, print1((n+4)*2^(n-2), ","))} \\ Klaus Brockhaus, Jun 17 2007
    
  • Python
    def A129954(n): return n+4<1 else 2*n+1 # Chai Wah Wu, Oct 03 2024

Formula

a(0) = 1, a(1) = 3; for n > 1, a(n) = (n+4)*2^(n-2).
G.f.: (1-x)*(1-2*x^2)/(1-2*x)^2.
Binomial transform of [1, 2, 1, 4, 1, 6, 1, 8, ...]. - Gary W. Adamson, Sep 29 2007
E.g.f.: (x + exp(2*x)*(2 + x))/2. - Stefano Spezia, Oct 04 2024

Extensions

Edited and extended by Klaus Brockhaus, Jun 17 2007

A196410 a(n) = n*2^(n-5).

Original entry on oeis.org

5, 12, 28, 64, 144, 320, 704, 1536, 3328, 7168, 15360, 32768, 69632, 147456, 311296, 655360, 1376256, 2883584, 6029312, 12582912, 26214400, 54525952, 113246208, 234881024, 486539264, 1006632960, 2080374784, 4294967296, 8858370048, 18253611008, 37580963840, 77309411328, 158913789952
Offset: 5

Views

Author

Vincenzo Librandi, Oct 04 2011

Keywords

Crossrefs

Programs

  • Magma
    [n*2^(n-5): n in [5..40]]
  • Mathematica
    Table[n*2^(n-5), {n, 5, 37}] (* Amiram Eldar, Jan 12 2021 *)

Formula

G.f.: x^5*( 5-8*x ) / (2*x-1)^2 . - R. J. Mathar, Oct 13 2011
From Amiram Eldar, Jan 12 2021: (Start)
Sum_{n>=5} 1/a(n) = 32*log(2) - 131/6.
Sum_{n>=5} (-1)^(n+1)/a(n) = 32*log(3/2) - 77/6. (End)

A227978 a(0)=1, a(1)=2; for n>1, a(n) = n*(2^n+4)/4.

Original entry on oeis.org

1, 2, 4, 9, 20, 45, 102, 231, 520, 1161, 2570, 5643, 12300, 26637, 57358, 122895, 262160, 557073, 1179666, 2490387, 5242900, 11010069, 23068694, 48234519, 100663320, 209715225, 436207642, 905969691, 1879048220, 3892314141, 8053063710, 16642998303
Offset: 0

Views

Author

Paul Curtz, Oct 07 2013

Keywords

Comments

The inverse binomial transform of A176328/A176591 (see Comments field in A228827) begins: 1, -2, 25/6, -9, 599/30, -45, 4285/42, -231, 15599/30, -1161, 169625/66, ... Consider these values without sign and the fractions rounded to the nearest integer, the sequence lists the resulting numbers.
Differences table of a(n):
1, 2, 4, 9, 20, 45, 102, 231, 520, 1161, ...
1, 2, 5, 11, 25, 57, 129, 289, 641, 1409, ... After 2: 2^m*(m+4)+1.
1, 3, 6, 14, 32, 72, 160, 352, 768, 1664, ... A078836 (after 3).
2, 3, 8, 18, 40, 88, 192, 416, 896, 1920, ... A129955.
1, 5, 10, 22, 48, 104, 224, 480, 1024, 2176, ... A079861 (after 5).
4, 5, 12, 26, 56, 120, 256, 544, 1152, 2432, ... After 5: 2^m*(m+12).
1, 7, 14, 30, 64, 136, 288, 608, 1280, 2688, ... After 7: 2^m*(m+14).
6, 7, 16, 34, 72, 152, 320, 672, 1408, 2944, ..., etc.
(n-1)*a(n)-n*a(n-1) = A001788(n-1) for n>1. [Bruno Berselli, Oct 11 2013]

Crossrefs

Programs

  • Magma
    [1,2] cat [n*(2^n+4)/4: n in [2..40]]; // Bruno Berselli, Oct 11 2013
    
  • Mathematica
    Join[{1, 2}, Table[n (2^n + 4)/4, {n, 2, 40}]] (* Bruno Berselli, Oct 11 2013 *)
  • PARI
    a(n) = if (n == 0, 1, if (n == 1, 2, n*(2^n+4)/4)); \\ Michel Marcus, Oct 11 2013

Formula

a(2n+2) = A229135(n+1); a(2n-1) = -A228767(n) for n>0.
a(n) = 6*a(n-1) -13*a(n-2) +12*a(n-3) -4*a(n-4) for n>5.
G.f.: (1-4*x+5*x^2-x^3-2*x^4+2*x^5)/((1-x)^2*(1-2*x)^2). - Colin Barker, Oct 09 2013

Extensions

More terms from Colin Barker, Oct 09 2013

A239631 Triangular array read by rows: T(n,k) is the number of parts equal to k over all palindromic compositions of n, n>=1, 1<=k<=n.

Original entry on oeis.org

1, 2, 1, 3, 0, 1, 6, 3, 0, 1, 8, 2, 1, 0, 1, 16, 8, 2, 1, 0, 1, 20, 6, 4, 0, 1, 0, 1, 40, 20, 6, 4, 0, 1, 0, 1, 48, 16, 10, 2, 2, 0, 1, 0, 1, 96, 48, 16, 10, 2, 2, 0, 1, 0, 1, 112, 40, 24, 6, 6, 0, 2, 0, 1, 0, 1, 224, 112, 40, 24, 6, 6, 0, 2, 0, 1, 0, 1
Offset: 1

Views

Author

Geoffrey Critzer, Mar 22 2014

Keywords

Examples

			1,
2,   1,
3,   0,  1,
6,   3,  0,  1,
8,   2,  1,  0, 1,
16,  8,  2,  1, 0, 1,
20,  6,  4,  0, 1, 0, 1,
40,  20, 6,  4, 0, 1, 0, 1,
48,  16, 10, 2, 2, 0, 1, 0, 1,
96,  48, 16, 10,2, 2, 0, 1, 0, 1,
112, 40, 24, 6, 6, 0, 2, 0, 1, 0, 1
In the palindromic compositions of 5: 5, 1+3+1, 2+1+2, 1+1+1+1+1  there are T(5,1)=8 ones, T(5,2)=2 twos, and T(5,3)=1 three and T(5,5)=1 five.
		

Crossrefs

Programs

  • Mathematica
    nn=15;Table[Take[Drop[Transpose[Map[PadRight[#,nn+1]&,Level[Table[r=Solve[p==1/(1-x)-x^n+y x^n+(x^2/(1-x^2)-x^(2n)+y^2x^(2n))p,p];CoefficientList[Series[D[p/.r,y]/.y->1,{x,0,nn}],x],{n,1,nn}],{2}]]],1][[n]],n],{n,1,nn}]//Grid

Formula

Explicit formulas for T(n,k) given in reference [Chinn, Grimaldi, Heubach] as Theorem 6:
T(n,k) = 0 if n
T(n,k) = 2^(floor(n/2)-k)*(2 + floor(n/2) - k) if n>=2k and n!=k (mod 2);
T(n,k) = 1 if n=k;
T(n,k) = 2^((n-k)/2-1) if k
T(n,k) = 2^(floor(n/2)-k)*(2 + floor(n/2) - k + 2^floor((k+1)/2-1)) if n>=2k and n==k (mod 2).
O.g.f. for column k: x^k/(1-F(x^2)) + 2*x^(2*k)*(1 + F(x))/(1 - F(x^2))^2 where F(x)= x/(1-x).
Showing 1-8 of 8 results.