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-10 of 25 results. Next

A305197 Number of set partitions of [n] with symmetric block size list of length A004525(n).

Original entry on oeis.org

1, 1, 1, 1, 3, 7, 19, 56, 171, 470, 2066, 10299, 31346, 91925, 559987, 3939653, 11954993, 36298007, 282835456, 2571177913, 7785919355, 24158837489, 229359684137, 2557117944391, 7731656573016, 24350208829581, 272633076900991, 3601150175699409, 10876116332074739
Offset: 0

Views

Author

Alois P. Heinz, May 27 2018

Keywords

Crossrefs

Bisections give A275283 (even part), A305198 (odd part).

Programs

  • Maple
    b:= proc(n, s) option remember; expand(`if`(n>s,
          binomial(n-1, n-s-1)*x, 1)+add(binomial(n-1, j-1)*
          b(n-j, s+j)*binomial(s+j-1, j-1), j=1..(n-s)/2)*x^2)
        end:
    a:= n-> coeff(b(n, 0), x, (n+sin(n*Pi/2))/2):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, s_] := b[n, s] = Expand[If[n > s, Binomial[n - 1, n - s - 1]*x, 1] + Sum[Binomial[n - 1, j - 1]*b[n - j, s + j]*Binomial[s + j - 1, j - 1], {j, 1, (n - s)/2}]*x^2];
    a[n_] := Coefficient[b[n, 0], x, (n + Sin[n*Pi/2])/2];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jun 13 2018, from Maple *)

Formula

a(n) = A275281(n,(n+sin(n*Pi/2))/2).

A059841 Period 2: Repeat [1,0]. a(n) = 1 - (n mod 2); Characteristic function of even numbers.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0
Offset: 0

Views

Author

Alford Arnold, Feb 25 2001

Keywords

Comments

When viewed as a triangular array, the row sum values are 0 1 1 1 2 3 3 3 4 5 5 5 6 ... (A004525).
This is the r=0 member of the r-family of sequences S_r(n) defined in A092184 where more information can be found.
Successive binomial transforms of this sequence: A011782, A007051, A007582, A081186, A081187, A081188, A081189, A081190, A060531, A081192.
Characteristic function of even numbers: a(A005843(n))=1, a(A005408(n))=0. - Reinhard Zumkeller, Sep 29 2008
This sequence is the Euler transformation of A185012. - Jason Kimberley, Oct 14 2011
a(n) is the parity of n+1. - Omar E. Pol, Jan 17 2012
Read as partial sequences, we get to A000975. - Jon Perry, Nov 11 2014
Elementary Cellular Automata rule 77 produces this sequence. See Wolfram, Weisstein and Index links below. - Robert Price, Jan 30 2016
Column k = 1 of A051159. - John Keith, Jun 28 2021
When read as a constant: decimal expansion of 10/99, binary expansion of 2/3. - Jason Bard, Aug 25 2025

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1, 0;
  1, 0, 1, 0;
  1, 0, 1, 0, 1;
  0, 1, 0, 1, 0, 1;
  0, 1, 0, 1, 0, 1, 0;
  1, 0, 1, 0, 1, 0, 1, 0;
  1, 0, 1, 0, 1, 0, 1, 0, 1;
  0, 1, 0, 1, 0, 1, 0, 1, 0, 1;
  0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0;
  ...
		

Crossrefs

One's complement of A000035 (essentially the same, but shifted once).
Cf. A033999 (first differences), A008619 (partial sums), A004525, A011782 (binomial transf.), A000975.
Characteristic function of multiples of g: A000007 (g=0), A000012 (g=1), this sequence (g=2), A079978 (g=3), A121262 (g=4), A079998 (g=5), A079979 (g=6), A082784 (g=7).

Programs

  • Haskell
    a059841 n = (1 -) . (`mod` 2)
    a059841_list = cycle [1,0]
    -- Reinhard Zumkeller, May 05 2012, Dec 30 2011
    
  • Magma
    [0^(n mod 2): n in  [0..100]]; // Vincenzo Librandi, Nov 09 2014
    
  • Maple
    seq(1-modp(n,2), n=0..150); # Muniru A Asiru, Apr 05 2018
  • Mathematica
    CoefficientList[Series[1/(1 - x^2), {x, 0, 104}], x] (* or *)
    Array[1/2 + (-1)^#/2 &, 105, 0] (* Michael De Vlieger, Feb 19 2019 *)
    Table[QBinomial[n, 1, -1], {n, 1, 74}] (* John Keith, Jun 28 2021 *)
    PadRight[{},120,{1,0}] (* Harvey P. Dale, Mar 06 2023 *)
  • PARI
    a(n)=(n+1)%2; \\ or 1-n%2 as in NAME.
    
  • PARI
    A059841(n)=!bittest(n,0) \\ M. F. Hasler, Jan 13 2012
    
  • Python
    def A059841(n): return 1 - (n & 1) # Chai Wah Wu, May 25 2022

Formula

a(n) = 1 - A000035(n). - M. F. Hasler, Jan 13 2012
From Paul Barry, Mar 11 2003: (Start)
G.f.: 1/(1-x^2).
E.g.f.: cosh(x).
a(n) = (n+1) mod 2.
a(n) = 1/2 + (-1)^n/2. (End)
Additive with a(p^e) = 1 if p = 2, 0 otherwise.
a(n) = Sum_{k=0..n} (-1)^k*A038137(n, k). - Philippe Deléham, Nov 30 2006
a(n) = Sum_{k=1..n} (-1)^(n-k) for n > 0. - William A. Tedeschi, Aug 05 2011
E.g.f.: cosh(x) = 1 + x^2/(Q(0) - x^2); Q(k) = 8k + 2 + x^2/(1 + (2k + 1)*(2k + 2)/Q(k + 1)); (continued fraction). - Sergei N. Gladkovskii, Nov 21 2011
E.g.f.: cosh(x) = 1/2*Q(0); Q(k) = 1 + 1/(1 - x^2/(x^2 + (2k + 1)*(2k + 2)/Q(k + 1))); (continued fraction). - Sergei N. Gladkovskii, Nov 21 2011
E.g.f.: cosh(x) = E(0)/(1-x) where E(k) = 1 - x/(1 - x/(x - (2*k+1)*(2*k+2)/E(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Apr 05 2013
For the general case: the characteristic function of numbers that are not multiples of m is a(n) = floor((n-1)/m) - floor(n/m) + 1, m,n > 0. - Boris Putievskiy, May 08 2013
a(n) = A000035(n+1) = A008619(n) - A110654(n). - Wesley Ivan Hurt, Jul 20 2013

Extensions

Better definition from M. F. Hasler, Jan 13 2012
Reinhard Zumkeller's Sep 29 2008 description added as a secondary name by Antti Karttunen, May 03 2022

A101950 Product of A049310 and A007318 as lower triangular matrices.

Original entry on oeis.org

1, 1, 1, 0, 2, 1, -1, 1, 3, 1, -1, -2, 3, 4, 1, 0, -4, -2, 6, 5, 1, 1, -2, -9, 0, 10, 6, 1, 1, 3, -9, -15, 5, 15, 7, 1, 0, 6, 3, -24, -20, 14, 21, 8, 1, -1, 3, 18, -6, -49, -21, 28, 28, 9, 1, -1, -4, 18, 36, -35, -84, -14, 48, 36, 10, 1, 0, -8, -4, 60, 50, -98, -126, 6, 75, 45, 11, 1, 1, -4, -30, 20, 145, 36, -210
Offset: 0

Views

Author

Paul Barry, Dec 22 2004

Keywords

Comments

A Chebyshev and Pascal product.
Row sums are n+1, diagonal sums the constant sequence 1 resp. A023434(n+1). Riordan array (1/(1-x+x^2),x/(1-x+x^2)).
Apart from signs, identical with A104562.
Subtriangle of the triangle given by [0,1,-1,1,0,0,0,0,0,0,0,...] DELTA [1,0,0,0,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Jan 27 2010
The Fi1 and Fi2 sums lead to A004525 and the Gi1 sums lead to A077889, see A180662 for the definitions of these triangle sums. - Johannes W. Meijer, Aug 06 2011
Also the convolution triangle of the inverse of 6th cyclotomic polynomial A010892. - Peter Luschny, Oct 08 2022

Examples

			Triangle begins:
   1,
   1, 1,
   0, 2, 1,
  -1, 1, 3, 1,
  -1,-2, 3, 4, 1,
  ...
Triangle [0,1,-1,1,0,0,0,0,...] DELTA [1,0,0,0,0,0,...] begins : 1 ; 0,1 ; 0,1,1 ; 0,0,2,1 ; 0,-1,1,3,1 ; 0,-1,-2,3,4,1 ; ... - _Philippe Deléham_, Jan 27 2010
		

Crossrefs

Programs

  • Maple
    A101950 := proc(n,k) local j,k1: add((-1)^((n-j)/2)*binomial((n+j)/2,j)*(1+(-1)^(n+j))* binomial(j,k)/2, j=0..n) end: seq(seq(A101950(n,k),k=0..n), n=0..11); # Johannes W. Meijer, Aug 06 2011
    # Uses function PMatrix from A357368. Adds a row on top and a column to the left.
    PMatrix(10, n -> [0, 1, 1, 0, -1,-1][irem(n, 6) + 1]); # Peter Luschny, Oct 08 2022
  • Mathematica
    T[0, 0] = 1; T[n_, k_] /; k>n || k<0 = 0; T[n_, k_] := T[n, k] = T[n-1, k-1]+T[n-1, k]-T[n-2, k]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Mar 07 2014, after Philippe Deléham *)

Formula

T(n, k) = Sum_{j=0..n} (-1)^((n-j)/2)*C((n+j)/2,j)*(1+(-1)^(n+j))*C(j,k)/2.
T(0,0) = 1, T(n,k) = 0,if k>n or if k<0, T(n,k) = T(n-1,k-1) + T(n-1,k) - T(n-2,k). - Philippe Deléham, Jan 26 2010
p(n,x) = (x+1)*p(n-1,x)-p(n-2,x) with p(0,x) = 1 and p(1,x) = x+1 [Dias].
G.f.: 1/(1-x-x^2-y*x). - Philippe Deléham, Feb 10 2012
T(n,0) = A010892(n), T(n+1,1) = A099254(n), T(n+2,2) = A128504(n). - Philippe Deléham, Mar 07 2014
T(n,k) = C(n,k)*hypergeom([(k-n)/2, (k-n+1)/2], [-n], 4) for n>=1. - Peter Luschny, Apr 25 2016

Extensions

Typo in formula corrected and information added by Johannes W. Meijer, Aug 06 2011

A032528 Concentric hexagonal numbers: floor(3*n^2/2).

Original entry on oeis.org

0, 1, 6, 13, 24, 37, 54, 73, 96, 121, 150, 181, 216, 253, 294, 337, 384, 433, 486, 541, 600, 661, 726, 793, 864, 937, 1014, 1093, 1176, 1261, 1350, 1441, 1536, 1633, 1734, 1837, 1944, 2053, 2166, 2281, 2400, 2521, 2646, 2773, 2904, 3037, 3174, 3313, 3456, 3601, 3750
Offset: 0

Views

Author

Keywords

Comments

From Omar E. Pol, Aug 20 2011: (Start)
Cellular automaton on the hexagonal net. The sequence gives the number of "ON" cells in the structure after n-th stage. A007310 gives the first differences. For a definition without words see the illustration of initial terms in the example section. Note that the cells become intermittent. A083577 gives the primes of this sequences.
A033581 and A003154 interleaved.
Row sums of an infinite square array T(n,k) in which column k lists 2*k-1 zeros followed by the numbers A008458 (see example). (End)
Sequence found by reading the line from 0, in the direction 0, 1, ... and the same line from 0, in the direction 0, 6, ..., in the square spiral whose vertices are the generalized pentagonal numbers A001318. Main axis perpendicular to A045943 in the same spiral. - Omar E. Pol, Sep 08 2011

Examples

			From _Omar E. Pol_, Aug 20 2011: (Start)
Using the numbers A008458 we can write:
  0, 1, 6, 12, 18, 24, 30, 36, 42,  48,  54, ...
  0, 0, 0,  1,  6, 12, 18, 24, 30,  36,  42, ...
  0, 0, 0,  0,  0,  1,  6, 12, 18,  24,  30, ...
  0, 0, 0,  0,  0,  0,  0,  1,  6,  12,  18, ...
  0, 0, 0,  0,  0,  0,  0,  0,  0,   1,   6, ...
And so on.
===========================================
The sums of the columns give this sequence:
0, 1, 6, 13, 24, 37, 54, 73, 96, 121, 150, ...
...
Illustration of initial terms as concentric hexagons:
.
.                                         o o o o o
.                         o o o o        o         o
.             o o o      o       o      o   o o o   o
.     o o    o     o    o   o o   o    o   o     o   o
. o  o   o  o   o   o  o   o   o   o  o   o   o   o   o
.     o o    o     o    o   o o   o    o   o     o   o
.             o o o      o       o      o   o o o   o
.                         o o o o        o         o
.                                         o o o o o
.
. 1    6        13           24               37
.
(End)
		

Crossrefs

Programs

Formula

From Joerg Arndt, Aug 22 2011: (Start)
G.f.: (x+4*x^2+x^3)/(1-2*x+2*x^3-x^4) = x*(1+4*x+x^2)/((1+x)*(1-x)^3).
a(n) = +2*a(n-1) -2*a(n-3) +1*a(n-4). (End)
a(n) = (6*n^2+(-1)^n-1)/4. - Bruno Berselli, Aug 22 2011
a(n) = A184533(n), n >= 2. - Clark Kimberling, Apr 20 2012
First differences of A011934: a(n) = A011934(n) - A011934(n-1) for n>0. - Franz Vrabec, Feb 17 2013
From Paul Curtz, Mar 31 2019: (Start)
a(-n) = a(n).
a(n) = a(n-2) + 6*(n-1) for n > 1.
a(2*n) = A033581(n).
a(2*n+1) = A003154(n+1). (End)
E.g.f.: (3*x*(x + 1)*cosh(x) + (3*x^2 + 3*x - 1)*sinh(x))/2. - Stefano Spezia, Aug 19 2022
Sum_{n>=1} 1/a(n) = Pi^2/36 + tan(Pi/(2*sqrt(3)))*Pi/(2*sqrt(3)). - Amiram Eldar, Jan 16 2023

Extensions

New name and more terms a(41)-a(50) from Omar E. Pol, Aug 20 2011

A004524 Three even followed by one odd.

Original entry on oeis.org

0, 0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, 7, 8, 8, 8, 9, 10, 10, 10, 11, 12, 12, 12, 13, 14, 14, 14, 15, 16, 16, 16, 17, 18, 18, 18, 19, 20, 20, 20, 21, 22, 22, 22, 23, 24, 24, 24, 25, 26, 26, 26, 27, 28, 28, 28, 29, 30, 30, 30, 31, 32, 32, 32, 33, 34, 34, 34, 35, 36, 36, 36, 37
Offset: 0

Views

Author

Keywords

Comments

Ignoring the first term, for n >= 0, n/2 rounded by the method called "banker's rounding", "statistician's rounding", or "round-to-even" gives 0, 0, 1, 2, 2, 2, 3, ..., where this method rounds k + 0.5 to k if positive integer k is even but rounds k + 0.5 to k + 1 when k + 1 is even. (If the method is indeed defined such that the above statement is also true with the word "positive" removed, then the first 0 term need not be ignored and this sequence can be further extended symmetrically with a(m) = -a(-m) for all integers m, an advantage over usual rounding.) The corresponding sequence for n/2 rounded by the common method is A004526 (considered as beginning with n = -1). - Rick L. Shepherd, Nov 16 2006
From Anthony Hernandez, Aug 08 2016: (Start)
Arrange the positive integers starting at 1 into a triangular array
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31 32 33 34 35 36
and let e(n) count the even numbers in the n-th row of the array. Then e(n) = a(n+1). For example, e(6) = a(7) = 3 and there are three even numbers in the 6th row of the array. For the count of odd numbers, f(n), look at the sequence A004525. (End)
Also the domination number of the (n-1) X (n-1) white bishop graph. - Eric W. Weisstein, Jun 26 2017
Let (b(n)) be the p-INVERT of A010892 using p(S) = 1 - S^2; then b(n) = a(n+1) for n >= 0. See A292301. - Clark Kimberling, Sep 30 2017
Also the total domination number of the (n-2)-complete graph (for n>3), (n-2)-cycle graph (for n>4), and (n-2)-pan graph (for n>4). - Eric W. Weisstein, Apr 07 2018
The sequence is the interleaving of the duplicated even integers (A052928) with the nonnegative integers (A001477). - Guenther Schrack, Mar 05 2019

Examples

			G.f. = x^3 + 2*x^4 + 2*x^5 + 2*x^6 + 3*x^7 + 4*x^8 + 4*x^9 + 4*x^10 + ...
		

Crossrefs

Zero followed by partial sums of A021913.
First differences of A011848.

Programs

  • GAP
    List([0..79],n->Int(n/4)+Int((n+1)/4)); # Muniru A Asiru, Mar 06 2019
    
  • Haskell
    a004524 n = n `div` 4 + (n + 1) `div` 4
    a004524_list = 0 : 0 : 0 : 1 : map (+ 2) a004524_list
    -- Reinhard Zumkeller, Feb 22 2013, Jul 14 2012
    
  • Magma
    [Floor(n/4)+Floor((n+1)/4) : n in [0..80]]; // Wesley Ivan Hurt, Jul 21 2014
    
  • Maple
    A004524:=n->floor(n/4)+floor((n+1)/4): seq(A004524(n), n=0..50); # Wesley Ivan Hurt, Jul 21 2014
  • Mathematica
    Table[Floor[n/4] + Floor[(n + 1)/4], {n, 0, 80}] (* Wesley Ivan Hurt, Jul 21 2014 *)
    Flatten[Table[{n, n, n, n + 1}, {n, 0, 38, 2}]] (* Alonso del Arte, Aug 10 2016 *)
    Table[(n + Cos[n Pi/2] - 1)/2, {n, 0, 80}] (* Eric W. Weisstein, Apr 07 2018 *)
    Table[Floor[n/2 - 1] + Ceiling[n/4 - 1/2] - Floor[n/4 - 1/2], {n, 0, 80}] (* Eric W. Weisstein, Apr 07 2018 *)
    LinearRecurrence[{2, -2, 2, -1}, {0, 0, 1, 2}, {0, 80}] (* Eric W. Weisstein, Apr 07 2018 *)
    CoefficientList[Series[x^3/((1 - x)^2 (1 + x^2)), {x, 0, 80}], x] (* Eric W. Weisstein, Apr 07 2018 *)
    Table[Round[(n - 1)/2], {n, 0, 20}] (* Eric W. Weisstein, Jun 19 2024 *)
    Round[(Range[0, 20] - 1)/2] (* Eric W. Weisstein, Jun 19 2024 *)
    Table[PadRight[{},If[EvenQ[n],3,1],n],{n,0,40}]//Flatten (* Harvey P. Dale, Dec 11 2024 *)
  • PARI
    {a(n) = n\4 + (n+1)\4}; /* Michael Somos, Jul 19 2003 */
    
  • PARI
    concat([0,0,0], Vec(x^3/((1-x)^2*(1+x^2)) + O(x^80))) \\ Altug Alkan, Oct 31 2015
    
  • Python
    def A004524(n): return (n>>2)+(n+1>>2) # Chai Wah Wu, Jul 29 2022
  • Sage
    [floor(n/4)+floor((n+1)/4) for n in (0..80)] # G. C. Greubel, Mar 08 2019
    

Formula

a(n) = a(n-1) - a(n-2) + a(n-3) + 1 = (n-1) - A004525(n-1). - Henry Bottomley, Mar 08 2000
G.f.: x^3/((1 - x)^2*(1 + x^2)) = x^3*(1 - x^2)/((1 - x)^2*(1 - x^4)). - Michael Somos, Jul 19 2003
If the sequence is extended to negative arguments in the natural way, it satisfies a(n) = -a(2-n) for all n in Z. - Michael Somos, Jul 19 2003
a(n) = A092038(n-3) for n > 4. - Reinhard Zumkeller, Mar 28 2004
From Paul Barry, Oct 27 2004: (Start)
E.g.f.: (exp(x)*(x-1) + cos(x))/2.
a(n) = (n - 1 - cos(Pi*(n-2)/2))/2. (End)
a(n+3) = Sum_{k = 0..n} (1 + (-1)^C(n,2))/2. - Paul Barry, Mar 31 2008
a(n) = floor(n/4) + floor((n+1)/4). - Arkadiusz Wesolowski, Sep 19 2012
From Wesley Ivan Hurt, Jul 21 2014, Oct 31 2015: (Start)
a(n) = Sum_{i = 1..n-1} (floor(i/2) mod 2).
a(n) = n/2 - sqrt(n^2 mod 8)/2. (End)
Euler transform of length 4 sequence [2, -1, 0, 1]. - Michael Somos, Apr 03 2017
a(n) = (2*n - 2 + (1 + (-1)^n)*(-1)^(n*(n-1)/2))/4. - Guenther Schrack, Mar 04 2019
Sum_{n>=3} (-1)^(n+1)/a(n) = log(2) (A002162). - Amiram Eldar, Sep 29 2022

A357637 Triangle read by rows where T(n,k) is the number of integer partitions of n with half-alternating sum k, where k ranges from -n to n in steps of 2.

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 0, 0, 1, 2, 0, 0, 1, 1, 3, 0, 0, 0, 2, 2, 3, 0, 0, 0, 0, 5, 2, 4, 0, 0, 0, 0, 2, 6, 3, 4, 0, 0, 0, 0, 2, 3, 9, 3, 5, 0, 0, 0, 0, 0, 4, 7, 10, 4, 5, 0, 0, 0, 0, 0, 0, 11, 8, 13, 4, 6, 0, 0, 0, 0, 0, 0, 4, 15, 12, 14, 5, 6, 0, 0, 0, 0, 0, 0, 3, 7, 25, 13, 17, 5, 7
Offset: 0

Views

Author

Gus Wiseman, Oct 10 2022

Keywords

Comments

We define the half-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A + B - C - D + E + F - G - ...

Examples

			Triangle begins:
  1
  0  1
  0  0  2
  0  0  1  2
  0  0  1  1  3
  0  0  0  2  2  3
  0  0  0  0  5  2  4
  0  0  0  0  2  6  3  4
  0  0  0  0  2  3  9  3  5
  0  0  0  0  0  4  7 10  4  5
  0  0  0  0  0  0 11  8 13  4  6
  0  0  0  0  0  0  4 15 12 14  5  6
  0  0  0  0  0  0  3  7 25 13 17  5  7
Row n = 9 counts the following partitions:
  (3222)       (333)      (432)     (441)  (9)
  (22221)      (3321)     (522)     (531)  (54)
  (21111111)   (4221)     (4311)    (621)  (63)
  (111111111)  (32211)    (5211)    (711)  (72)
               (222111)   (6111)           (81)
               (2211111)  (33111)
               (3111111)  (42111)
                          (51111)
                          (321111)
                          (411111)
		

Crossrefs

Row sums are A000041.
Number of nonzero entries in row n appears to be A004525(n+1).
Last entry of row n is A008619(n).
Column sums appear to be A029862.
The central column is A035363, skew A035544.
For original alternating sum we have A344651, ordered A097805.
The skew-alternating version is A357638.
The central column of the reverse is A357639, skew A357640.
The ordered version (compositions) is A357645, skew A357646.
The reverse version is A357704, skew A357705.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.

Programs

  • Maple
    b:= proc(n, i, s, t) option remember; `if`(n=0, x^s, `if`(i<1, 0,
          b(n, i-1, s, t)+b(n-i, min(n-i, i), s+`if`(t<2, i, -i), irem(t+1, 4))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=-n..n, 2))(b(n$2, 0$2)):
    seq(T(n), n=0..15);  # Alois P. Heinz, Oct 12 2022
  • Mathematica
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Table[Length[Select[IntegerPartitions[n],halfats[#]==k&]],{n,0,12},{k,-n,n,2}]

Formula

Conjecture: The column sums are A029862.

A282011 Number T(n,k) of k-element subsets of [n] having an even sum; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 4, 6, 3, 0, 1, 3, 6, 10, 9, 3, 0, 1, 3, 9, 19, 19, 9, 3, 1, 1, 4, 12, 28, 38, 28, 12, 4, 1, 1, 4, 16, 44, 66, 60, 40, 20, 5, 0, 1, 5, 20, 60, 110, 126, 100, 60, 25, 5, 0, 1, 5, 25, 85, 170, 226, 226, 170, 85, 25, 5, 1, 1, 6, 30, 110, 255, 396, 452, 396, 255, 110, 30, 6, 1
Offset: 0

Views

Author

Alois P. Heinz, Feb 04 2017

Keywords

Comments

Row n is symmetric if and only if n mod 4 in {0,3} (or if T(n,n) = 1).

Examples

			T(5,0) = 1: {}.
T(5,1) = 2: {2}, {4}.
T(5,2) = 4: {1,3}, {1,5}, {2,4}, {3,5}.
T(5,3) = 6: {1,2,3}, {1,2,5}, {1,3,4}, {1,4,5}, {2,3,5}, {3,4,5}.
T(5,4) = 3: {1,2,3,4}, {1,2,4,5}, {2,3,4,5}.
T(5,5) = 0.
T(7,7) = 1: {1,2,3,4,5,6,7}.
Triangle T(n,k) begins:
  1;
  1, 0;
  1, 1,  0;
  1, 1,  1,   1;
  1, 2,  2,   2,   1;
  1, 2,  4,   6,   3,   0;
  1, 3,  6,  10,   9,   3,   0;
  1, 3,  9,  19,  19,   9,   3,   1;
  1, 4, 12,  28,  38,  28,  12,   4,   1;
  1, 4, 16,  44,  66,  60,  40,  20,   5,   0;
  1, 5, 20,  60, 110, 126, 100,  60,  25,   5,  0;
  1, 5, 25,  85, 170, 226, 226, 170,  85,  25,  5, 1;
  1, 6, 30, 110, 255, 396, 452, 396, 255, 110, 30, 6, 1;
		

Crossrefs

Columns k=0..10 give (offsets may differ): A000012, A004526, A002620, A005993, A005994, A032092, A032093, A018211, A018212, A282077, A282078.
Row sums give A011782.
Main diagonal gives A133872(n+1).
Lower diagonals T(n+j,n) for j=1..10 give: A004525(n+1), A282079, A228705, A282080, A282081, A282082, A282083, A282084, A282085, A282086.
T(2n,n) gives A119358.

Programs

  • Maple
    b:= proc(n, s) option remember; expand(
          `if`(n=0, s, b(n-1, s)+x*b(n-1, irem(s+n, 2))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 1)):
    seq(T(n), n=0..16);
  • Mathematica
    Flatten[Table[Sum[Binomial[Ceiling[n/2],2j]Binomial[Floor[n/2],k-2j],{j,0,Floor[(n+1)/4]}],{n,0,10},{k,0,n}]] (* Indranil Ghosh, Feb 26 2017 *)
  • PARI
    a(n,k)=sum(j=0,floor((n+1)/4),binomial(ceil(n/2),2*j)*binomial(floor(n/2),k-2*j));
    tabl(nn)={for(n=0,nn,for(k=0,n,print1(a(n,k),", "););print(););} \\ Indranil Ghosh, Feb 26 2017

Formula

T(n,k) = Sum_{j=0..floor((n+1)/4)} C(ceiling(n/2),2*j) * C(floor(n/2),k-2*j).
T(n,k) = A007318(n,k) - A159916(n,k).
Sum_{k=0..n} k * T(n,k) = A057711(n-1) for n>0.
Sum_{k=0..n} (k+1) * T(n,k) = A087447(n) + [n=2].

A038505 Sum of every 4th entry of row n in Pascal's triangle, starting at binomial(n,2).

Original entry on oeis.org

0, 0, 1, 3, 6, 10, 16, 28, 56, 120, 256, 528, 1056, 2080, 4096, 8128, 16256, 32640, 65536, 131328, 262656, 524800, 1048576, 2096128, 4192256, 8386560, 16777216, 33558528, 67117056, 134225920, 268435456, 536854528, 1073709056
Offset: 0

Views

Author

Keywords

Comments

Number of strings over Z_2 of length n with trace 0 and subtrace 1.
Same as number of strings over GF(2) of length n with trace 0 and subtrace 1.
Binomial transform of (0,1,1,0,0,1,1,0,...) gives a(n) for n >= 1. - Paul Barry, Jul 07 2003
From Gary W. Adamson, Mar 13 2009: (Start)
M^n * [1,0,0,0] = [A038503(n), A000749(n), a(n), A038504(n)]; where M = a 4 X 4 matrix [1,1,0,0; 0,1,1,0; 0,0,1,1; 1,0,0,1]. Sum of terms = 2^n.
Example: M^6 * [1,0,0,0] [16, 20, 16, 12]; sum = 2^6 = 64. (End)
{A038503, A038504, A038505, A000749} is the difference analog of the hyperbolic functions of order 4, {h_1(x), h_2(x), h_3(x), h_4(x)}. For a definition of {h_i(x)} and the difference analog {H_i (n)} see [Erdelyi] and the Shevelev link respectively. - Vladimir Shevelev, Jun 14 2017

Examples

			a(3; 0, 1) = 3 since the three binary strings of trace 0, subtrace 1 and length 3 are { 011, 101, 110 }.
		

References

  • A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1955, Vol. 3, Chapter XVIII.

Crossrefs

Programs

  • GAP
    List([0..35],n->Sum([0..n],k->Binomial(n,2+4*k))); # Muniru A Asiru, Feb 21 2019
  • Haskell
    a038505 n = a038505_list !! n
    a038505_list = tail $ zipWith (-) (tail a000749_list) a000749_list
    -- Reinhard Zumkeller, Jul 15 2013
    
  • Magma
    I:=[0, 0, 1, 3]; [n le 3 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jun 22 2012
    
  • Maple
    # From Peter Luschny, Jun 15 2017: (Start)
    s := sqrt(2): h := n -> [-2, -s, 0, s, 2, s, 0, -s][1 + (n mod 8)]:
    a := n -> `if`(n=0, 0, (2^n + 2^(n/2)*h(n))/4): seq(a(n), n=0..32);
    # Alternatively:
    egf := (1 + exp(2*x) - 2*exp(x)*cos(x))/4:
    series(egf, x, 33): seq(n!*coeff(%,x,n), n=0..32); # (End)
  • Mathematica
    LinearRecurrence[{4, -6, 4}, {0, 0, 1, 3}, 40] (* Vincenzo Librandi, Jun 22 2012 *)
    Table[If[n==0, 0, 2^(n-2) - 2^(n/2-1) Cos[Pi*n/4]], {n, 0, 32}] (* Vladimir Reshetnikov, Sep 16 2016 *)
  • Sage
    A = lambda n: (2^n - (1-I)^n - (1+I)^n) / 4 if n != 0 else 0
    print([A(n) for n in (0..32)]) # Peter Luschny, Jun 16 2017
    

Formula

a(n; t, s) = a(n-1; t, s) + a(n-1; t+1, s+t+1) where t is the trace and s is the subtrace.
a(n) = Sum_{k=0..n} binomial(n, 2 + 4*k), n >= 0.
a(n) = Sum_{k=0..n} (1/2)*C(n, k)*(-1)^C(k+3, 3) for n >= 1. - Paul Barry, Jul 07 2003
From Paul Barry, Nov 29 2004: (Start)
G.f.: x^2*(1-x)/((1-x)^4-x^4) = x^2*(1-x)/((1-2*x)*(1-2*x+2*x^2));
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2*k)*(1-(-1)^k)/2. (End)
Conjecture: 2*a(n+2) = A038504(n+2) + A000749(n+2) + 2*A009545(n). - Creighton Dement, May 22 2005
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3), n > 3; sequence is identical to its fourth differences. - Paul Curtz, Dec 21 2007
a(n) = A000749(n+1) - A000749(n). - Reinhard Zumkeller, Jul 15 2013
a(n+m) = a(n)*H_1(m) + H_2(n)*H_2(m) + H_1(n)*a(m) + H_4(n)*H_4(m),
where H_1=A038503, H_2=A038504, H_4=A000749. - Vladimir Shevelev, Jun 14 2017
From Peter Luschny, Jun 15 2017: (Start)
a(n) = n! [x^n] (1 + exp(2*x) - 2*exp(x)*cos(x))/4.
a(n) = A038503(n+2) - 2*A038503(n+1) + A038503(n).
a(n) = 2^(n-2) - A046980(n)*2^(A004525(n-3)) for n >= 1.
a(n) = (2^n - (1-i)^n - (1+i)^n) / 4 for n >= 1. Compare V. Shevelevs' formula (1) in A000749. (End)
From Vladimir Shevelev, Jun 16 2017: (Start)
Proof of the conjecture by Creighton Dement (May 22 2005): using the first formula of Theorem 1 in [Shevelev link] for n=4, omega=i=sqrt(-1), i:=1,2,3,4, m:=n>=1, we have
a(n) = (1/2)*(2^(n-1)-2^(n/2)*cos(Pi*n/4)), A038504(n) = (1/2)*(2^(n-1)+2^(n/2)* sin(Pi*n/4)), A000749(n) = (1/2)*(2^(n-1)-2^(n/2)*sin(Pi*n/4)). Finally we use the formula by Paul Barry: A009545(n) = 2^(n/2)*sin(Pi*n/4) = 2^(n/2)*(-cos(Pi*(n+2)/4)). Now it is easy to obtain the hypothetical formula. (End)

Extensions

Missing 0 prepended by Vladimir Shevelev, Jun 14 2017
Edited by Peter Luschny, Jun 16 2017

A275281 Number T(n,k) of set partitions of [n] with symmetric block size list of length k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 3, 2, 1, 0, 1, 0, 7, 0, 1, 0, 1, 10, 19, 13, 3, 1, 0, 1, 0, 56, 0, 22, 0, 1, 0, 1, 35, 160, 171, 86, 34, 4, 1, 0, 1, 0, 463, 0, 470, 0, 50, 0, 1, 0, 1, 126, 1337, 2306, 2066, 1035, 250, 70, 5, 1, 0, 1, 0, 3874, 0, 10299, 0, 2160, 0, 95, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 21 2016

Keywords

Examples

			T(4,2) = 3: 12|34, 13|24, 14|23.
T(5,3) = 7: 12|3|45, 13|2|45, 1|234|5, 1|235|4, 14|2|35, 1|245|3, 15|2|34.
T(6,4) = 13: 12|3|4|56, 13|2|4|56, 1|23|45|6, 1|23|46|5, 14|2|3|56, 1|24|35|6, 1|24|36|5, 1|25|34|6, 1|26|34|5, 15|2|3|46, 1|25|36|4, 1|26|35|4, 16|2|3|45.
T(7,5) = 22: 12|3|4|5|67, 13|2|4|5|67, 1|23|4|56|7, 1|23|4|57|6, 14|2|3|5|67, 1|24|3|56|7, 1|24|3|57|6, 1|2|345|6|7, 1|2|346|5|7, 1|2|347|5|6, 15|2|3|4|67, 1|25|3|46|7, 1|25|3|47|6, 1|2|356|4|7, 1|2|357|4|6, 1|26|3|45|7, 1|27|3|45|6, 16|2|3|4|57, 1|26|3|47|5, 1|2|367|4|5, 1|27|3|46|5, 17|2|3|4|56.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,   1;
  0, 1,   0,    1;
  0, 1,   3,    2,    1;
  0, 1,   0,    7,    0,    1;
  0, 1,  10,   19,   13,    3,    1;
  0, 1,   0,   56,    0,   22,    0,   1;
  0, 1,  35,  160,  171,   86,   34,   4,  1;
  0, 1,   0,  463,    0,  470,    0,  50,  0, 1;
  0, 1, 126, 1337, 2306, 2066, 1035, 250, 70, 5, 1;
  ...
		

Crossrefs

Columns k=0-1,3,5,7,9 give: A000007, A000012 for n>0, A275289, A275290, A275291, A275292.
Bisections of columns k=2,4,6,8,10 give: A001700(n-1) for n>0, A275293, A275294, A275295, A275296.
Row sums give A275282.
T(n,A004525(n)) gives A305197.
T(2n,n) gives A275283.
T(2n+1,A109613(n)) gives A305198.
T(n,n) gives A000012.
T(n+3,n+1) gives A002623.

Programs

  • Maple
    b:= proc(n, s) option remember; expand(`if`(n>s,
          binomial(n-1, n-s-1)*x, 1)+add(binomial(n-1, j-1)*
          b(n-j, s+j)*binomial(s+j-1, j-1), j=1..(n-s)/2)*x^2)
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 0)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, s_] := b[n, s] = Expand[If[n>s, Binomial[n-1, n-s-1]*x, 1] + Sum[ Binomial[n-1, j-1]*b[n-j, s+j]*Binomial[s+j-1, j-1], {j, 1, (n-s)/2} ]*x^2]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, 0]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Feb 03 2017, translated from Maple *)

Formula

T(n,k) = 0 if n is odd and k is even.

A145392 Number of inequivalent sublattices of index n in square lattice, where two sublattices are considered equivalent if one can be rotated by a multiple of Pi/2 to give the other.

Original entry on oeis.org

1, 2, 2, 4, 4, 6, 4, 8, 7, 10, 6, 14, 8, 12, 12, 16, 10, 20, 10, 22, 16, 18, 12, 30, 17, 22, 20, 28, 16, 36, 16, 32, 24, 28, 24, 46, 20, 30, 28, 46, 22, 48, 22, 42, 40, 36, 24, 62, 29, 48, 36, 50, 28, 60, 36, 60, 40, 46, 30, 84, 32, 48, 52, 64, 44, 72, 34, 64, 48, 72
Offset: 1

Views

Author

N. J. A. Sloane, Feb 23 2009

Keywords

Comments

From Andrey Zabolotskiy, Mar 12 2018: (Start)
The parent lattice of the sublattices under consideration has Patterson symmetry group p4, and two sublattices are considered equivalent if they are related via a symmetry from that group [Rutherford]. For other 2D Patterson groups, the analogous sequences are A000203 (p2), A069734 (p2mm), A145391 (c2mm), A145393 (p4mm), A145394 (p6), A003051 (p6mm).
If we count sublattices related by parent-lattice-preserving reflection as equivalent, we get A145393 instead of this sequence. If we count sublattices related by rotation of the sublattice only (but not parent lattice; equivalently, sublattices related by rotation by angle which is not a multiple of Pi/2; see illustration in links) as equivalent, we get A054345. If we count sublattices related by any rotation or reflection as equivalent, we get A054346.
Rutherford says at p. 161 that a(n) != A054345(n) only when A002654(n) > 1, but actually these two sequences differ at other terms, too, for example, at n = 15 (see illustration). (End)

Crossrefs

Programs

Formula

a(n) = (A000203(n) + A002654(n))/2. [Rutherford] - N. J. A. Sloane, Mar 13 2009
a(n) = Sum_{ m: m^2|n } A000089(n/m^2) + A157224(n/m^2) = A002654(n) + Sum_{ m: m^2|n } A157224(n/m^2). - Andrey Zabolotskiy, May 07 2018
a(n) = Sum_{ d|n } A004525(d). - Andrey Zabolotskiy, Aug 29 2019

Extensions

New name from Andrey Zabolotskiy, Mar 12 2018
Showing 1-10 of 25 results. Next