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.

A129953 First differences of A129952.

Original entry on oeis.org

0, 1, 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
Offset: 0

Views

Author

Paul Curtz, Jun 10 2007

Keywords

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] ]; [ T[n+1]-T[n]: n in[1..2*m-1] ]; // Klaus Brockhaus, Jun 17 2007
    
  • PARI
    {m=29; print1(0, ",", 1, ","); for(n=2, m, print1((n+2)*2^(n-2), ","))} \\ Klaus Brockhaus, Jun 17 2007
    
  • Python
    def A129953(n): return n+2<1 else n # Chai Wah Wu, Oct 03 2024

Formula

a(n) = A129952(n+1) - A129952(n).
a(n) = A087447(n) for n > 0.
a(0) = 0, a(1) = 1; for n > 1, a(n) = (n+2)*2^(n-2).
G.f.: x*(1-2*x^2)/(1-2*x)^2.

Extensions

Edited and extended by Klaus Brockhaus, Jun 17 2007

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

A129955 Third differences of A129952.

Original entry on oeis.org

2, 3, 8, 18, 40, 88, 192, 416, 896, 1920, 4096, 8704, 18432, 38912, 81920, 172032, 360448, 753664, 1572864, 3276800, 6815744, 14155776, 29360128, 60817408, 125829120, 260046848, 536870912, 1107296256, 2281701376, 4697620480
Offset: 0

Views

Author

Paul Curtz, Jun 10 2007

Keywords

Crossrefs

Programs

  • Magma
    m:=17; 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] ]; V:=[ U[n+1]-U[n]: n in[1..2*m-2] ]; [ V[n+1]-V[n]: n in[1..2*m-3] ]; // Klaus Brockhaus, Jun 17 2007
    
  • Mathematica
    Differences[LinearRecurrence[{4,-4},{1,1,2,6},40],3] (* Harvey P. Dale, Sep 04 2020 *)
  • PARI
    {m=29; print1(2, ",", 3, ","); for(n=2, m, print1((n+6)*2^(n-2), ","))} \\ Klaus Brockhaus, Jun 17 2007

Formula

First differences of A129954: a(n) = A129954(n+1) - A129954(n).
a(n) = A034007(n+2)-2^(n-2) for n > 1.
a(0) = 2, a(1) = 3; for n > 1, a(n) = (n+6)*2^(n-2).
G.f.: (2-5*x+4*x^2-2*x^3)/(1-2*x)^2.
From Amiram Eldar, Jan 13 2021: (Start)
Sum_{n>=0} 1/a(n) = 256*log(2) - 12347/70.
Sum_{n>=0} (-1)^n/a(n) = 21851/210 - 256*log(3/2). (End)

Extensions

Edited and extended by Klaus Brockhaus, Jun 17 2007

A130002 Alternating sum along antidiagonals of the array of A129952 and its iterated differences.

Original entry on oeis.org

1, 1, 2, 3, 10, 23, 60, 139, 326, 735, 1648, 3635, 7962, 17287, 37316, 80091, 171118, 364079, 771864, 1631107, 3436994, 7223511, 15146092, 31690283, 66176790, 137945983, 287076800, 596523219, 1237785706, 2565049895, 5309056788, 10976027515, 22667882942
Offset: 0

Views

Author

Paul Curtz, Jun 15 2007

Keywords

Comments

Define the square array T of A129952 and its iterated differences: T(0,n)=A129952(n), T(d,n)=T(d-1,n+1)-T(d-1,n), d>0. Then a(n) = sum_{d=0..n} (-1)^d*T(d,n-d), the sum along the antidiagonals of T(d,n), alternating signs.

Examples

			The original series and first, 2nd etc. differences are the rows of
1..1..2...6..16..40.. <- A129952 = T(0,n)
0..1..4..10..24..56.. <- A129953 = T(1,n)
1..3..6..14..32..72.. <- A129954 = T(2,n)
2..3..8..18..40..88.. <- A129955 = T(3,n)
1..5.10..22..48......
...
a(2) = 2-1+1 = 2. a(3) = 6-4+3-2 = 3. a(4) = 16-10+6-3+1 = 10.
		

Formula

From Chai Wah Wu, Jan 30 2018: (Start)
a(n) = 4*a(n-1) - 2*a(n-2) - 8*a(n-3) + 7*a(n-4) + 4*a(n-5) - 4*a(n-6) for n > 6.
G.f.: (-2*x^6 - 6*x^5 + 3*x^4 + 5*x^3 - 3*x + 1)/((x - 1)^2*(x + 1)^2*(2*x - 1)^2). (End)

Extensions

Edited and extended by R. J. Mathar, Jun 30 2008

A124625 Even numbers sandwiched between 1's.

Original entry on oeis.org

1, 0, 1, 2, 1, 4, 1, 6, 1, 8, 1, 10, 1, 12, 1, 14, 1, 16, 1, 18, 1, 20, 1, 22, 1, 24, 1, 26, 1, 28, 1, 30, 1, 32, 1, 34, 1, 36, 1, 38, 1, 40, 1, 42, 1, 44, 1, 46, 1, 48, 1, 50, 1, 52, 1, 54, 1, 56, 1, 58, 1, 60, 1, 62, 1, 64, 1, 66, 1, 68, 1, 70, 1, 72, 1, 74, 1, 76, 1, 78, 1, 80, 1, 82, 1, 84
Offset: 0

Views

Author

N. J. A. Sloane, Jun 13 2007

Keywords

Comments

Interleaving of A000012 and A005843.
Created to simplify the definition of A129952.
a(n) = abs(A009531(n-1)).
Starting (1, 2, 1, 4,...): square (1 + x - x^2 - x^3 + x^4 + x^5 - ...) = (1 + 2x - x^2 - 4x^3 + x^4 + 6x^5 - ...).
With a(3) taken as 0, a(n+2) = n^k+1 mod 2*n, n>=1, for any k>=2, also for k=n. - Wolfdieter Lang, Dec 21 2011
Also !(n+2) mod n for n>0 where !n is a subfactorial number (A000166). - Michel Lagneau, Sep 05 2012
Greatest common divisor of n-1 and (n-1) mod 2. - Bruno Berselli, Mar 07 2017

References

  • Murat Sahin and Elif Tan, Conditional (strong) divisibility sequences, Fib. Q., 56 (No. 1, 2018), 18-31.

Crossrefs

Cf. A000012 (all 1's), A005843 (even numbers), A009531, A093178, A152271.

Programs

  • Magma
    &cat[[1, 2*k]: k in [0..42]];
    
  • Maple
    A124625:=n->(n-(n-2)*(-1)^n)/2; seq(A124625(k), k=0..100); # Wesley Ivan Hurt, Oct 19 2013
  • Mathematica
    Join[{1},Riffle[2Range[0,50],1]] (* Harvey P. Dale, Nov 02 2011 *)
  • PARI
    {for(n=0, 85, print1(if(n%2>0, n-1, 1), ","))}
    
  • Python
    print([(n-1)**(n%2) for n in range(0, 86)]) # Karl V. Keller, Jr., Jul 26 2020

Formula

a(n) = 1 for even n, a(n) = n-1 for odd n.
a(2*k) = 1, a(2*k+1) = 2*k.
G.f.: (1 - x^2 + 2*x^3)/((1 - x)^2*(1 + x)^2).
a(n) = (n - (n - 2)*(-1)^n)/2. - Bruno Berselli, May 06 2011
E.g.f.: 1 + x^2*U(0)/2 where U(k) = 1 + 2*x*(k+1)/(2*k + 3 - x*(2*k+3)/(x + 4*(k+2)*(k+1)/U(k+1))) (continued fraction, 3rd kind, 3-step). - Sergei N. Gladkovskii, Oct 20 2012
a(n) = 2*floor(n/2) - (n-1)*((n-1) mod 2). - Wesley Ivan Hurt, Oct 19 2013
a(n) = (n-1)^((1-(-1)^n)/2). - Wesley Ivan Hurt, Mar 21 2015
a(n) = (n-1) - a(a(n-1))*a(n-1), a(0) = 0. - Eli Jaffe, Jun 07 2016
E.g.f.: (x + 1)*cosh(x) - sinh(x). - Ilya Gutkovskiy, Jun 07 2016
a(n) = (-1)^n mod n for n > 0. - Franz Vrabec, Mar 06 2020
a(n) = (n-1)^(n mod 2). - Karl V. Keller, Jr., Aug 01 2020

Extensions

More terms from Klaus Brockhaus, Jun 16 2007
Edited by N. J. A. Sloane, May 21 2008 at the suggestion of R. J. Mathar

A192933 Triangle read by rows: T(n,k) = Sum_{i <= n, j <= k, (i,j) <> (n,k)} T(i,j), starting with T(1,1) = 1, for n >= 1 and 1 <= k <= n.

Original entry on oeis.org

1, 1, 2, 2, 6, 12, 4, 16, 44, 88, 8, 40, 136, 360, 720, 16, 96, 384, 1216, 3152, 6304, 32, 224, 1024, 3712, 11296, 28896, 57792, 64, 512, 2624, 10624, 36416, 108032, 273856, 547712, 128, 1152, 6528, 29056, 109696, 362624, 1056896, 2661504, 5323008, 256, 2560, 15872, 76800, 314880, 1135616, 3659776, 10528768, 26380544, 52761088
Offset: 1

Views

Author

Andrea Raffetti, Jul 13 2011

Keywords

Comments

The outer diagonal is A059435.
The second outer diagonal is A090442.
The third outer diagonal is essentially 2*A068766.
The first column is A011782.
The second column is essentially A057711 (not considering its first two terms).
The second column is essentially A129952 (not considering its first two terms).
The second column is essentially 2*A001792.
The differences between the terms of the second column is essentially 2*A045623.
The third column is essentially 4*A084266.
The cumulative sums of the third column are essentially 4*A176027.
T(n,k) = 0 for n < k. If this overriding constraint is not applied, you get A059576. - Franklin T. Adams-Watters, Jul 24 2011
For n >= 2 and 1 <= k <= n, T(n,k) is the number of bimonotone subdivisions of a 2-row grid with n points on the first row and k points on the second row (with the lower left point of the grid being the origin). A bimonotone subdivision of a convex polygon (the convex hull of the grid) is one where the internal dividing lines have nonnegative (including infinite) slopes. See Robeva and Sun (2020). - Petros Hadjicostas and Michel Marcus, Jul 15 2020

Examples

			Triangle (with rows n >= 1 and columns k = 1..n) begins:
   1;
   1,   2;
   2,   6,   12;
   4,  16,   44,    88;
   8,  40,  136,   360,   720;
  16,  96,  384,  1216,  3152,   6304;
  32, 224, 1024,  3712, 11296,  28896,  57792;
  64, 512, 2624, 10624, 36416, 108032, 273856, 547712;
  ...
Example: T(4,3) = 44 = 1 + 1 + 2 + 2 + 6 + 12 + 4 + 16.
From _Petros Hadjicostas_, Jul 15 2020: (Start)
Consider the following 2-row grid with n = 3 points at the top and k = 2 points at the bottom:
   A  B  C
   *--*--*
   |    /
   |   /
   *--*
   D  E
The sets of the dividing internal lines of the T(3,2) = 6 bimonotone subdivisions of the above 2-row grid are as follows: { }, {DC}, {DB}, {EB}, {DB, DC}, and {DB, EB}. We exclude subdivisions {EA} and {EA, EB} because they have at least one dividing line with a negative slope. (End)
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(T=matrix(nn, nn)); T[1,1] = 1; for (n=2, nn, for (k=1, n, T[n,k] = sum(i=1, n, sum(j=1, k, if ((i!=n) || (j!=k), T[i,j]))););); vector(nn, k, vector(k, i, T[k, i]));} \\ Michel Marcus, Mar 18 2020

Formula

T(n,1) = 2^(n-2) for n >= 2.
T(n,2) = n*2^(n-2) for n >= 2.
T(n,3) = 2^(n-2)*((n-k+1)^2 + 7*(n-k+1) + 4)/2 = 2^(n-3)*(n^2 + 3*n - 6) for k = 3 and n >= 3.
In general: For 1 <= k <= n with (n,k) <> 1,
T(n,k) = 2^(n-2)*Sum_{i=0..k-1} c(k,i)*(n-k+1)^(k-1-i)/(k-1)! and
T(n,k) = 2^(n-2)*Sum_{j=0..k-1} c(k,k-1-j)*(n-k+1)^j/(k-1)!
with c(k,i) being specific coefficients. Below are the first values for c(k,i):
1;
1, 1;
1, 7, 4;
1, 18, 77, 36;
1, 34, 359, 1238, 528,
1, 55, 1065, 8705, 26654, 10800;
... [Formula corrected by Petros Hadjicostas, Jul 15 2020]
The diagonal of this triangle for c(k,i) divided by (k-1)! (except for the first term) is equal to the Shroeder number sequence A006318(k-1).
From Petros Hadjicostas and Michel Marcus, Jul 15 2020: (Start)
T(n,1) = 2^(n-2) for n >= 2; T(n,k) = 2*(T(n,k-1) + T(n-1,k) - T(n-1,k-1)) for n > k >= 2; T(n,n) = 2*T(n,n-1) for n = k >= 2; and T(n,k) = 0 for 1 <= n < k. [Robeva and Sun (2020)] (They do not specify T(1,1) explicitly since they do not care about subdivisions of a degenerate polygon with only one side.)
T(n,k) = (2^(n-2)/(k-1)!) * P_k(n) = (2^(n-2)/(k-1)!) * Sum_{j=1..k} A336245(k,j)*n^(k-j) for n >= k >= 1 with (n,k) <> (1,1), where P_k(n) is some polynomial with integer coefficients of degree k-1. [Robeva and Sun (2020)]
A336245(k,j) = Sum_{s=0..j-1} c(k,s) * binomial(k-1-s, k-j) * (1-k)^(j-1-s) for 1 <= j <= k, in terms of the above coefficients c(k,i).
So c(k,s) = Sum_{j=1..s+1} A336245(k,j) * binomial(k-j, k-s-1) * (k-1)^(s+1-j) for k >= 1 and 0 <= s <= k-1, obtained by inverting the binomial transform.
Bivariate o.g.f.: x*y*(1 - x)*(1 - 2*y*g(2*x*y))/(1 - 2*x - 2*y + 2*x*y), where g(w) = 2/(1 + w + sqrt(1 - 6*w + w^2)) = g.f. of A001003.
Letting y = 1 in the above joint o.g.f., we get the o.g.f. of the row sums: x*(1-x)*(2*g(2*x) - 1). It can then be easily proved that
Sum_{k=1..n} T(n,k) = 2^n*A001003(n-1) - 2^(n-1)*A001003(n-2) for n >= 3. (End)

Extensions

Offset changed by Andrew Howroyd, Dec 31 2017
Name edited by Petros Hadjicostas, Jul 15 2020

A287879 Irregular triangle read by rows: normalized dimensions of certain generalized quadratic residue codes of length n.

Original entry on oeis.org

2, 4, 2, 8, 6, 16, 16, 18, 32, 40, 50, 64, 96, 132, 146, 128, 224, 336, 406, 256, 512, 832, 1088, 1186, 512, 1152, 2016, 2832, 3330, 1024, 2560, 4800, 7200, 9060, 9762, 2048, 5632, 11264, 17952, 24024, 27654, 4096, 12288, 26112, 44032, 62352, 76176, 81330, 8192, 26624, 59904, 106496, 158912, 204984, 232050, 16384, 57344, 136192, 254464, 398720, 540736, 645540, 684210
Offset: 1

Views

Author

N. J. A. Sloane, Jun 18 2017

Keywords

Examples

			Triangle begins:
[2],
[4, 2],
[8, 6],
[16, 16, 18],
[32, 40, 50],
[64, 96, 132, 146],
[128, 224, 336, 406],
[256, 512, 832, 1088, 1186],
[512, 1152, 2016, 2832, 3330],
[1024, 2560, 4800, 7200, 9060, 9762],
[2048, 5632, 11264, 17952, 24024, 27654],
[4096, 12288, 26112, 44032, 62352, 76176, 81330],
[8192, 26624, 59904, 106496, 158912, 204984, 232050],
[16384, 57344, 136192, 254464, 398720, 540736, 645540, 684210],
...
		

Crossrefs

The 0th column is A000079; column 1 is essentially the same as A057711 or A129952, and is also essentially twice A001792 or A049610.
Row sums are twice A287880.

Programs

  • Maple
    g:=proc(m,w) local k;
    if w=0 then 2^m else
    2^m*add( (m/(m-w))*binomial(w-1,w-k)*binomial(m-w,k)/4^k, k=1..w);
    fi;
    end;
    for n from 1 to 14 do
    lprint( [seq(g(n,w),w=0..floor(n/2))]);
    od;

Formula

See Ward, pp. 99-100, or the Maple code below.
Showing 1-7 of 7 results.