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 22 results. Next

A038520 Number of elements of GF(2^n) with trace 1 and subtrace 0.

Original entry on oeis.org

0, 1, 0, 3, 4, 6, 20, 28, 64, 136, 240, 528, 1024, 2016, 4160, 8128, 16384, 32896, 65280, 131328, 262144, 523776, 1049600, 2096128, 4194304, 8390656, 16773120, 33558528, 67108864, 134209536, 268451840, 536854528, 1073741824
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,2,4},{0,1,0,3},40] (* Harvey P. Dale, Oct 15 2017 *)
  • PARI
    concat(0, Vec(x*(1 + x^2) / ((1 - 2*x)*(1 + 2*x + 2*x^2)) + O(x^40))) \\ Colin Barker, Aug 02 2019

Formula

a(n) = C(n, r+0)+C(n, r+4)+C(n, r+8)+... where r = 1 if n odd, r = 3 if n even.
a(n) = 2*a(n-2) + 4*a(n-3), n > 3. - Paul Curtz, Feb 06 2008
From Colin Barker, Aug 02 2019: (Start)
G.f.: x*(1 + x^2) / ((1 - 2*x)*(1 + 2*x + 2*x^2)).
a(n) = (2^n + i*((-1-i)^n - (-1+i)^n)) / 4 for n>0, where i=sqrt(-1).
(End)

A091917 Coefficient array of polynomials (z-1)^n-1.

Original entry on oeis.org

1, -2, 1, 0, -2, 1, -2, 3, -3, 1, 0, -4, 6, -4, 1, -2, 5, -10, 10, -5, 1, 0, -6, 15, -20, 15, -6, 1, -2, 7, -21, 35, -35, 21, -7, 1, 0, -8, 28, -56, 70, -56, 28, -8, 1, -2, 9, -36, 84, -126, 126, -84, 36, -9, 1, 0, -10, 45, -120, 210, -252, 210, -120, 45, -10, 1, -2, 11, -55, 165, -330, 462, -462, 330, -165, 55, -11, 1
Offset: 0

Views

Author

Paul Barry, Feb 13 2004

Keywords

Comments

The first element has been changed to 1 to produce an invertible matrix. Alternatively, this is the coefficient array for the polynomials P(z,n) = Product_{j=0..n-1} (z-(1+w(n)^j)) where w(n) = e^(2*Pi*i/n), i=sqrt(-1).
The row entries determine interesting recurrences. For instance, a(n) = 4a(n-1) + 6a(n-2) + 4a(n-3), a(0)=a(1)=a(2)=1, gives A038503. Sequences of the form a(n) = Sum_{k=0..n} (binomial(n,k) if k mod m = r, otherwise 0), for r=0..m-1, result. Equivalently, a(n) = Sum_{j=0..n-1} 2^n*(cos(Pi*j/m))^n*cos((n-2r)Pi*j/m)/m, r=0..m-1. These include A024493, A024494, A024495, A038503, A038504, A038505. The inverse matrix is A091918.
Triangle T(n,k), 0 <= k <= n, read by rows given by [ -2, 2, 1/2, -1/2, 0, 0, 0, 0, 0, ...] DELTA [1, 0, -1/2, 1/2, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Oct 11 2007

Examples

			Rows begin:
  { 1},
  {-2,  1},
  { 0, -2,  1},
  {-2,  3, -3,  1},
  { 0, -4,  6, -4,  1},
  ...
		

Programs

  • Maple
    T:= n-> `if`(n=0, 1, (p-> seq(coeff(p,z,i), i=0..n))((z-1)^n-1)):
    seq(T(n), n=0..12);  # Alois P. Heinz, May 23 2015
  • Mathematica
    Table[If[n == 0, 1, CoefficientList[(z-1)^n-1, z]], {n, 0, 12}] // Flatten (* Jean-François Alcover, Apr 08 2016 *)
  • PARI
    row(n) = if (n==0, 1, Vecrev((z-1)^n-1)); \\ Michel Marcus, May 23 2015

Formula

T(n,k) = T(n-1,k-1) + T(n-2,k) - T(n-2,k-1), T(0,0) = T(1,1) = T(2,2) = 1, T(1,0) = T(2,1) = -2, T(2,0) = 0, T(n,k) = 0 for k > n or for k < 0. - Philippe Deléham, May 23 2015
G.f.: (1-2*x-x^2+x^2*y)/((x-1)*(-x+x*y-1)). - R. J. Mathar, Aug 11 2015

A094266 LQTL Lean Quaternary Temporal Logic: a terse form of temporal logic created by assigning four descriptors such that false, becoming true, true and becoming false are represented and become a linear sequence. In a branching tree two alternative are open, change or no change. The integer sequence above is the count of the row possibilities of the four states over successive iterations.

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 1, 0, 1, 3, 3, 1, 2, 4, 6, 4, 6, 6, 10, 10, 16, 12, 16, 20, 36, 28, 28, 36, 72, 64, 56, 64, 136, 136, 120, 120, 256, 272, 256, 240, 496, 528, 528, 496, 992, 1024, 1056, 1024, 2016, 2016, 2080, 2080, 4096, 4032, 4096, 4160, 8256, 8128, 8128, 8256, 16512
Offset: 0

Views

Author

Robert H Barbour and L. D. Painter, Jun 01 2004

Keywords

Comments

This is a table read by rows of length 4. Every row is formed from the previous one by the circular Pascal triangle-like rule: a, b, c, d -> d+a, a+b, b+c, c+d. Consider a labeled binary tree such that the root has label 0 and every node labeled k has children labeled k and (k+1) mod 4; the n-th row of this sequence counts nodes on the level n+1 with labels 0, 1, 2, 3, while the n-th row of A099423 counts nodes up to level n. - Andrey Zabolotskiy, Jan 06 2023

Crossrefs

Programs

  • Maple
    Algorithm available from Robert H Barbour

Formula

Appears to satisfy a 12-degree linear recurrence. - Ralf Stephan, Dec 04 2004

A307078 Square array A(n,k), n >= 0, k >= 1, read by antidiagonals, where column k is the expansion of g.f. ((1-x)^(k-2))/((1-x)^k-x^k).

Original entry on oeis.org

1, 1, 3, 1, 2, 7, 1, 2, 4, 15, 1, 2, 3, 8, 31, 1, 2, 3, 5, 16, 63, 1, 2, 3, 4, 10, 32, 127, 1, 2, 3, 4, 6, 21, 64, 255, 1, 2, 3, 4, 5, 12, 43, 128, 511, 1, 2, 3, 4, 5, 7, 28, 86, 256, 1023, 1, 2, 3, 4, 5, 6, 14, 64, 171, 512, 2047, 1, 2, 3, 4, 5, 6, 8, 36, 136, 341, 1024, 4095
Offset: 0

Views

Author

Seiichi Manyama, Mar 22 2019

Keywords

Examples

			Square array begins:
     1,   1,   1,   1,  1,  1,  1,  1, 1, ...
     3,   2,   2,   2,  2,  2,  2,  2, 2, ...
     7,   4,   3,   3,  3,  3,  3,  3, 3, ...
    15,   8,   5,   4,  4,  4,  4,  4, 4, ...
    31,  16,  10,   6,  5,  5,  5,  5, 5, ...
    63,  32,  21,  12,  7,  6,  6,  6, 6, ...
   127,  64,  43,  28, 14,  8,  7,  7, 7, ...
   255, 128,  86,  64, 36, 16,  9,  8, 8, ...
   511, 256, 171, 136, 93, 45, 18, 10, 9, ...
		

Crossrefs

Columns 1-6 give A126646, A000079, A024494(n+1), A038504(n+1), A133476(n+1), A119336.

Programs

  • Mathematica
    T[n_, k_] := Sum[Binomial[n+1, k*j+1], {j, 0, Floor[n/k]}]; Table[T[n-k, k], {n, 0, 12}, {k, n, 1, -1}] // Flatten (* Amiram Eldar, May 20 2021 *)

Formula

A(n,k) = Sum_{j=0..floor(n/k)} binomial(n+1,k*j+1).
A(n,2*k) = Sum_{i=0..n} Sum_{j=0..n-i} binomial(i,k*j) * binomial(n-i,k*j).

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

A100216 Relates row sums of Pascal's triangle to expansion of cos(x)/exp(x).

Original entry on oeis.org

1, 4, 9, 16, 26, 44, 84, 176, 376, 784, 1584, 3136, 6176, 12224, 24384, 48896, 98176, 196864, 393984, 787456, 1573376, 3144704, 6288384, 12578816, 25163776, 50335744, 100675584, 201342976, 402661376, 805289984, 1610563584, 3221159936
Offset: 0

Views

Author

Creighton Dement, Nov 11 2004

Keywords

Comments

A100215(n) (ves) = ((-1)^n)*A009116(n+3) (jes) + a(n) (les) + A038503(n+1) (tes) (Sn, below, corresponds to the generating function from above). Coefficients of Sn(z)*(1-z)/(1+z) gives match to A038504 (Sum of every 4th entry of row n in Pascal's triangle, starting at "n choose 1"). Coefficients of Sn(z)/(1+z) gives match to A038505 (Sum of every 4th entry of row n in Pascal's triangle, starting at "n choose 2"). Coefficients of Sn(z)/(1-z^2) gives match to A000749 (Number of strings over Z_2 of length n with trace 1 and subtrace 1). The elements 'i, 'j, 'k, i', j', k', 'ii', 'jj', 'kk', 'ij', 'ik', 'ji', 'jk', 'ki', 'kj', e ("floretions") are members of the quaternion product factor space Q x Q /{(1,1), (-1,-1)}. "les" sums over coefficients belonging to basis vectors which squared give the unit e (excluding e itself).
This sequence is identical to its 4th differences. - Jean-François Alcover, Nov 07 2013

Examples

			a(2) = 9 because (.5 'j + .5 'k + .5 j' + .5 k' + 1 'ii' + 1 e)^3 =
1'j + 1'k + 1j' + 1k' + 3'ii' + 2'jj' + 2'kk' + 1'jk' + 1'kj' + 1e
and the sum of the coefficients belonging to basis vectors which squared give the unit e (excluding e itself) is 3+2+2+1+1 = 9 (see comment).
		

Crossrefs

Programs

  • Magma
    [n le 3 select n^2 else 4*Self(n-1) -6*Self(n-2) +4*Self(n-3): n in [1..40]]; // G. C. Greubel, Mar 28 2024
    
  • Maple
    a:= n-> (<<0|1|0>, <0|0|1>, <4|-6|4>>^n. <<1, 4, 9>>)[1, 1]:
    seq(a(n), n=0..35);  # Alois P. Heinz, Nov 07 2013
  • Mathematica
    d = 4; nmax = 31; a[n_ /; n < d] := (n + 1)^2; seq = Table[a[n], {n, 0, nmax}]; seq /. Solve[ Thread[ Take[seq, nmax - d + 1] == Differences[seq, d]]] // First (* Jean-François Alcover, Nov 07 2013 *)
    LinearRecurrence[{4,-6,4}, {1,4,9}, 41] (* G. C. Greubel, Mar 28 2024 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A100216
        if n<3: return (n+1)^2
        else: return 4*a(n-1) -6*a(n-2) +4*a(n-3)
    [a(n) for n in range(41)] # G. C. Greubel, Mar 28 2024

Formula

a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3), with a(0) = 1, a(1) = 4, a(2) = 9.
G.f.: (1-x^2)/((1-2*x)*(1-2*x+2*x^2)).
(a(n)) = lesseq(.5 'j + .5 'k + .5 j' + .5 k' + 1 'ii' + 1 e).
2*a(n) = 3*2^n - A009545(n+1) + 4*A009545(n). - R. J. Mathar, May 21 2019
E.g.f.: (1/2)*exp(x)*(3*sin(x) - cos(x) + 3*exp(x)). - G. C. Greubel, Mar 28 2024

A323346 Square array read by ascending antidiagonals: T(p,q) is the number of bases e such that e^2 = 1 (including e = 1) in Clifford algebra Cl(p,q)(R).

Original entry on oeis.org

1, 2, 1, 3, 3, 1, 4, 6, 4, 2, 6, 10, 10, 6, 6, 12, 16, 20, 16, 12, 16, 28, 28, 36, 36, 28, 28, 36, 64, 56, 64, 72, 64, 56, 64, 72, 136, 120, 120, 136, 136, 120, 120, 136, 136, 272, 256, 240, 256, 272, 256, 240, 256, 272, 256, 528, 528, 496, 496, 528, 528, 496, 496, 528, 528, 496
Offset: 0

Views

Author

Jianing Song, Jan 12 2019

Keywords

Comments

See A323100 for an introduction of Clifford algebras.

Examples

			Table begins
p\q|  0   1   2    3    4    5  ...
---+-------------------------------
0  |  1,  1,  1,   2,   6,  16, ...
1  |  2,  3,  4,   6,  12,  28, ...
2  |  3,  6, 10,  16,  28,  56, ...
3  |  4, 10, 20,  36,  64, 120, ...
4  |  6, 16, 36,  72, 136, 256, ...
5  | 12, 28, 64, 136, 272, 528, ...
...
See A323100 for an example that shows T(1,3) = 6.
		

Crossrefs

Cf. A038503(n+1) (first row), A038504(n+1) (first column), A007582 (main diagonal).
A323100 is the complement sequence.

Programs

  • Maple
    s := sqrt(2): h := n -> [ 0, -s, -2, -s, 0, s, 2,  s][1 + modp(n+1, 8)]:
    T := proc(n, k) option remember;
    if n = 0 then return 2^k*(1 - 1/2) - 2^((k - 3)/2)*h(k + 2) fi;
    if k = 0 then return 2^n*(1 - 1/2) - 2^((n - 3)/2)*h(n) fi;
    T(n, k-1) + T(n-1, k) end:
    for n from 0 to 9 do seq(T(n, k), k=0..9) od; # Peter Luschny, Jan 12 2019
  • Mathematica
    T[n_, k_] := 2^(n + k) - Sum[Binomial[n, i] Binomial[k, j] Mod[Binomial[i - j, 2], 2], {i, 0, n}, {j, 0, k}];
    Table[T[n - k, k], {n, 0, 10}, {k, 0, n}] (* Jean-François Alcover, Jun 19 2019 *)
  • PARI
    T(p,q) = sum(i=0, p, sum(j=0, q, binomial(p, i)*binomial(q, j)*!(binomial(i-j, 2)%2)))

Formula

T(p,q) = Sum_{i=0..p} Sum_{j=0..q} binomial(p, i)*binomial(q, j)*(1 - (binomial(i - j, 2) mod 2)).
T(p,q) = 2^(p+q) - A323100(p,q).

A130668 Diagonal of A129819.

Original entry on oeis.org

0, 0, 1, -2, 5, -11, 23, -48, 102, -220, 476, -1024, 2184, -4624, 9744, -20480, 42976, -90048, 188352, -393216, 819328, -1704192, 3539200, -7340032, 15203840, -31456256, 65010688, -134217728, 276826112, -570429440, 1174409216
Offset: 0

Views

Author

Paul Curtz, Jun 27 2007

Keywords

Comments

This sequence is connected to A124072. To see this, change the sign of every negative term and consider the differences of every line. Hence for the second line, and following lines, the four terms form periodic sequences:
0 1 0 1 0
1 0 0 1 1
1 0 1 2 1
1 1 3 3 1
2 4 6 4 2
6 10 10 6 6
16 20 16 12 16
36 36 28 28 36
72 64 56 64 72
136 120 120 136 136
256 240 256 272 256.
The lines are connected as seen by the examples: (3rd line connected to 2nd, from right to left) 1+1=2, 1+0=1, 0+0=0, 0+1=1; (11th line connected to 10th) 136+136=272, 136+120=256, 120+120=240, 120+136=256.
The 4 columns are almost known (must the first line be suppressed?): A038503 (without the first 1), A000749 (without the first 0), A038505, A038504. Like the present sequence, every sequence of A124072 beginning with a negative number (-2, -11, ...) is a "twisted" sequence (see A129339 comments, A129961 and the present 4 columns). Periodic with period 2^n.
Inverse binomial transform of A129819. - R. J. Mathar, Feb 25 2009

Programs

  • GAP
    a:=[-2,5,-11,23];; for n in [5..30] do a[n]:=-6*a[n-1]+-14*a[n-2] -16*a[n-3]-8*a[n-4]; od; Concatenation([0,0,1], a); # G. C. Greubel, Mar 24 2019
  • Magma
    I:=[-2,5,-11,23]; [0,0,1] cat [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..30]]; // G. C. Greubel, Mar 24 2019
    
  • Mathematica
    gf = x^2*(1+x)*(1+3*x+4*x^2+3*x^3)/((1+2*x+2*x^2)*(1+2*x)^2); CoefficientList[Series[gf, {x, 0, 30}], x] (* Jean-François Alcover, Dec 16 2014, after R. J. Mathar *)
    Join[{0, 0, 1}, LinearRecurrence[{-6,-14,-16,-8}, {-2,5,-11,23}, 30]] (* Jean-François Alcover, Feb 15 2016 *)
  • PARI
    my(x='x+O('x^30)); concat([0,0], Vec(x^2*(1+x)*(1+3*x+4*x^2+3*x^3 )/((1+2*x +2*x^2)*(1+2*x)^2))) \\ G. C. Greubel, Mar 24 2019
    
  • Sage
    (x^2*(1+x)*(1+3*x+4*x^2+3*x^3)/((1+2*x+2*x^2)*(1+2*x)^2 )).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Mar 24 2019
    

Formula

From R. J. Mathar, Feb 25 2009: (Start)
G.f.: x^2*(1+x)*(1 + 3*x + 4*x^2 + 3*x^3)/((1 + 2*x + 2*x^2)*(1+2*x)^2).
a(n) = ((-1)^n*A001787(n+1) - 4*A108520(n) + 4*A122803(n))/32, n > 2. (End)
a(n) = -6*a(n-1) - 14*a(n-2) - 16*a(n-3) - 8*a(n-4) for n >= 7. - G. C. Greubel, Mar 24 2019

Extensions

Extended by R. J. Mathar, Feb 25 2009

A137171 Interleaved reading of A000749 and its first to third differences.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 2, 1, 1, 3, 3, 1, 4, 6, 4, 2, 10, 10, 6, 6, 20, 16, 12, 16, 36, 28, 28, 36, 64, 56, 64, 72, 120, 120, 136, 136, 240, 256, 272, 256, 496, 528, 528, 496, 1024, 1056, 1024, 992, 2080, 2080, 2016, 2016, 4160, 4096, 4032, 4096, 8256, 8128, 8128
Offset: 0

Views

Author

Paul Curtz, May 11 2008

Keywords

Comments

A000749 is identical to its fourth differences, which implies that the 2nd differences equal the 5th, the 3rd differences the 6th and so on and implies that each of the sequences of these differences obeys the recurrence a(n)=4a(n-1)-6a(n-2)+4a(n-3), n > 3.
The table containing A000749 and its first differences (essentially A038505), 2nd differences (A038504) and 3rd differences (A038503) as the 4 rows is
O, 0, 0, 1, 4, 10, 20, 36, 64, ...
0, 0, 1, 3, 6, 10, 16, 28, 56, ...
0, 1, 2, 3, 4, 6, 12, 28, 64, ...
1, 1, 1, 1, 2, 6, 16, 36, 72, ...
Columns sums are 1, 2, 4, 8, 16, 32 ... = 2^n =A000079. The sequence reads this table column by column.

Crossrefs

Programs

  • Mathematica
    Join[{0, 0, 0, 1},LinearRecurrence[{0, 0, 0, 4, 0, 0, 0, -6, 0, 0, 0, 4},{0, 0, 1, 1, 0, 1, 2, 1, 1, 3, 3, 1},59]] (* Ray Chandler, Sep 23 2015 *)

Extensions

Edited by R. J. Mathar, Jun 28 2008

A130305 Triangle read by rows: A007318 * A130304 as infinite lower triangular matrices.

Original entry on oeis.org

1, 2, 1, 3, 3, 1, 4, 6, 4, 1, 6, 10, 10, 5, 1, 12, 16, 20, 15, 6, 1, 28, 28, 36, 35, 21, 7, 1, 64, 56, 64, 71, 56, 28, 8, 1, 136, 120, 120, 135, 127, 84, 36, 9, 1, 272, 256, 240, 255, 262, 211, 120, 45, 10, 1
Offset: 1

Views

Author

Gary W. Adamson, May 20 2007

Keywords

Examples

			First few rows of the triangle:
   1;
   2,  1;
   3,  3,  1;
   4,  6,  4,  1;
   6, 10, 10,  5,  1;
  12, 16, 20, 15,  6,  1;
  28, 28, 36, 35, 21,  7,  1;
  ...
		

Crossrefs

Cf. A007318, A038504 (left column), A130304.

Formula

Binomial transform of A130304.
Previous Showing 11-20 of 22 results. Next