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 31-40 of 41 results. Next

A317301 Sequence obtained by taking the general formula for generalized k-gonal numbers: m*((k - 2)*m - k + 4)/2, where m = 0, +1, -1, +2, -2, +3, -3, ... and k >= 5. Here k = 1.

Original entry on oeis.org

0, 1, -2, 1, -5, 0, -9, -2, -14, -5, -20, -9, -27, -14, -35, -20, -44, -27, -54, -35, -65, -44, -77, -54, -90, -65, -104, -77, -119, -90, -135, -104, -152, -119, -170, -135, -189, -152, -209, -170, -230, -189, -252, -209, -275, -230, -299, -252, -324, -275, -350, -299, -377, -324, -405, -350, -434
Offset: 0

Views

Author

Omar E. Pol, Jul 29 2018

Keywords

Comments

Taking the same formula with k = 0 we have A317300.
Taking the same formula with k = 2 we have A001057 (canonical enumeration of integers).
Taking the same formula with k = 3 we have 0 together with A008795 (Molien series for 3-dimensional representation of dihedral group D_6 of order 6).
Taking the same formula with k = 4 we have A008794 (squares repeated) except the initial zero.
Taking the same formula with k >= 5 we have the generalized k-gonal numbers (see Crossrefs section).

Crossrefs

Row 1 of A303301.
Sequences of generalized k-gonal numbers: A001318 (k=5), A000217 (k=6), A085787 (k=7), A001082 (k=8), A118277 (k=9), A074377 (k=10), A195160 (k=11), A195162 (k=12), A195313 (k=13), A195818 (k=14), A277082 (k=15), A274978 (k=16), A303305 (k=17), A274979 (k=18), A303813 (k=19), A218864 (k=20), A303298 (k=21), A303299 (k=22), A303303 (k=23), A303814 (k=24), A303304 (k=25), A316724 (k=26), A316725 (k=27), A303812 (k=28), A303815 (k=29), A316729 (k=30).

Programs

  • Magma
    /* By definition: */ k:=1; [0] cat [m*i*((k-2)*m*i-k+4)/2: i in [1,-1], m in [1..30]]; // Bruno Berselli, Jul 30 2018
    
  • Mathematica
    Table[(-2 n (n + 1) - 5 (2 n + 1) (-1)^n + 5)/16, {n, 0, 60}] (* Bruno Berselli, Jul 30 2018 *)
  • PARI
    concat(0, Vec(x*(1 - 3*x + x^2)/((1 + x)^2*(1 - x)^3) + O(x^50))) \\ Colin Barker, Aug 01 2018

Formula

From Bruno Berselli, Jul 30 2018: (Start)
O.g.f.: x*(1 - 3*x + x^2)/((1 + x)^2*(1 - x)^3).
E.g.f.: (-5*(1 + 2*x) + (5 - 2*x^2)*exp(2*x))*exp(-x)/16.
a(n) = a(-n+1) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
a(n) = (-2*n*(n + 1) - 5*(2*n + 1)*(-1)^n + 5)/16. Therefore:
a(n) = -n*(n + 6)/8 for even n;
a(n) = -(n - 5)*(n + 1)/8 for odd n. Also:
a(n) = a(n-5) for odd n > 3.
2*(2*n - 1)*a(n) + 2*(2*n + 1)*a(n-1) + n*(n^2 - 3) = 0. (End)

A329708 Triangle, read by rows, where the n-th row lists the (2n+1) coefficients of (1+2*x+...+(n+1)*x^n)^2.

Original entry on oeis.org

1, 1, 4, 4, 1, 4, 10, 12, 9, 1, 4, 10, 20, 25, 24, 16, 1, 4, 10, 20, 35, 44, 46, 40, 25, 1, 4, 10, 20, 35, 56, 70, 76, 73, 60, 36, 1, 4, 10, 20, 35, 56, 84, 104, 115, 116, 106, 84, 49, 1, 4, 10, 20, 35, 56, 84, 120, 147, 164, 170, 164, 145, 112, 64
Offset: 0

Views

Author

Seiichi Manyama, Feb 29 2020

Keywords

Examples

			Triangle begins:
  1;
  1, 4,  4;
  1, 4, 10, 12,  9;
  1, 4, 10, 20, 25, 24, 16;
  1, 4, 10, 20, 35, 44, 46, 40, 25;
  ...
		

Crossrefs

Row sums give A000537(n+1).
T(n,2n) gives A000290(n+1).

Programs

  • Mathematica
    row[n_]:=CoefficientList[Series[(Sum[(i+1)x^i,{i,0,n}])^2,{x,0,2n}],x]; Array[row,8,0]//Flatten (* Stefano Spezia, Feb 15 2025 *)
  • PARI
    for(n=0, 10, print(Vecrev(sum(k=0, n, (k+1)*x^k)^2), ", "))

Formula

T(n,k) = A000292(k+1) for k=0..n.
Sum_{k=0..2n} (-1)^k * T(n,k) = A008794(n+2). - Alois P. Heinz, Feb 14 2025

A115012 Sum_{i=1..n, gcd(5,i)=1} i.

Original entry on oeis.org

1, 3, 6, 10, 10, 16, 23, 31, 40, 40, 51, 63, 76, 90, 90, 106, 123, 141, 160, 160, 181, 203, 226, 250, 250, 276, 303, 331, 360, 360, 391, 423, 456, 490, 490, 526, 563, 601, 640, 640, 681, 723, 766, 810, 810, 856, 903, 951, 1000, 1000, 1051, 1103, 1156, 1210, 1210, 1266
Offset: 1

Views

Author

N. J. A. Sloane, Feb 24 2006

Keywords

Crossrefs

Replacing 5 in the definition by 2, 3, 4, 5, 6, 7, 8, 9 gives respectively A008794, A068626, A008794, this sequence, A115014, A115015, A008794, A068626.

A122656 a(n) = n*floor(n/2)^2.

Original entry on oeis.org

0, 0, 2, 3, 16, 20, 54, 63, 128, 144, 250, 275, 432, 468, 686, 735, 1024, 1088, 1458, 1539, 2000, 2100, 2662, 2783, 3456, 3600, 4394, 4563, 5488, 5684, 6750, 6975, 8192, 8448, 9826, 10115, 11664, 11988, 13718, 14079, 16000, 16400, 18522, 18963, 21296, 21780
Offset: 0

Views

Author

N. J. A. Sloane, Sep 22 2006

Keywords

Comments

Szeged index of cycle of length n.

Crossrefs

Programs

  • Magma
    [n*Floor(n/2)^2: n in [0..50]]; // Vincenzo Librandi, May 31 2014
  • Mathematica
    Table[n Floor[n/2]^2,{n,0,50}] (* or *) LinearRecurrence[ {1,3,-3,-3,3,1,-1},{0,0,2,3,16,20,54},50] (* Harvey P. Dale, May 31 2014 *)

Formula

a(n) = (n*(1-(-1)^n+2*(-1+(-1)^n)*n+2*n^2))/8. G.f.: x^2*(x^4+x^3+7*x^2+x+2) / ((x-1)^4*(x+1)^3). - Colin Barker, Sep 20 2013
a(n) = n*A008794(n). - R. J. Mathar, Mar 04 2018
Sum_{n>=2} 1/a(n) = zeta(3)/2 + zeta(2) + 4*(log(2)-1). - Amiram Eldar, May 15 2024

A262742 Irregular table read by rows: T(n,k) is the number of binary symmetric n X n matrices with exactly k 1's; n>=0, 0<=k<=n^2. Where the symmetry axes are in horizontal and vertical.

Original entry on oeis.org

1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 1, 1, 1, 4, 4, 10, 10, 20, 20, 31, 31, 40, 40, 44, 44, 40, 40, 31, 31, 20, 20, 10, 10, 4, 4, 1, 1, 1, 0, 0, 0, 9, 0, 0, 0, 36, 0, 0, 0, 84, 0, 0, 0, 126, 0, 0
Offset: 0

Views

Author

Kival Ngaokrajang, Sep 29 2015

Keywords

Comments

The row length of this irregular triangle is n^2+1 = A002522(n).
Inspired by A262666, but rotating the diagonal and antidiagonal symmetry axis to horizontal and vertical axes.
From Wolfdieter Lang, Oct 12 2015 (Start):
Double symmetry of n X n matrix M: M(i, j) = M(n-i+1, j) = M(i, n-j+1) (= M(n-i+1, n-j+1)), here with entries from {0, 1}.
Due to 0 <-> 1 flip the rows are symmetric.
The number of independent entries in such an n X n doubly symmetric matrix is A008794(n+1) (squares repeated). Therefore, the row sums give repeated A002416 (omitting the first 1): 1, 2, 2, 16, 16, 512, 512, ... (End) - Wolfdieter Lang, Oct 12 2015

Examples

			Irregular table begins:
n\k 0   1   2   3   4   5   6   7   8   9   ...
0:  1
1:  1   1
2:  1   0   0   0   1
3:  1   1   2   2   2   2   2   2   1   1
...
Row 4: 1, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 1;
Row 5: 1, 1, 4, 4, 10, 10, 20, 20, 31, 31, 40, 40, 44, 44, 40, 40, 31, 31, 20, 20, 10, 10, 4, 4, 1, 1.
...
		

Crossrefs

Extensions

More terms from Alois P. Heinz, Sep 29 2015

A295643 Squares repeated 4 times; a(n) = floor(n/4)^2.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 4, 4, 4, 4, 9, 9, 9, 9, 16, 16, 16, 16, 25, 25, 25, 25, 36, 36, 36, 36, 49, 49, 49, 49, 64, 64, 64, 64, 81, 81, 81, 81, 100, 100, 100, 100, 121, 121, 121, 121, 144, 144, 144, 144, 169, 169, 169, 169, 196, 196, 196, 196, 225, 225, 225
Offset: 0

Views

Author

Wesley Ivan Hurt, Nov 25 2017

Keywords

Comments

a(n+1) is the sum of the smallest odd parts of the partitions of n into two distinct parts. For example, a(11) = 4; the partitions of 10 into two distinct parts are (9,1), (8,2), (7,3) and (6,4). The sum of the smallest odd parts in these partitions is then 1+3 = 4.
a(n+2) is the sum of the smallest odd parts of the partitions of n into two parts. For example, a(8) = 4; the partitions of 6 into two parts are (5,1), (4,2) and (3,3). The sum of the smallest odd parts is then 1+3 = 4.

Crossrefs

See also the quarter-squares, A002620.

Programs

  • Magma
    [Floor(n/4)^2 : n in [0..100]];
    
  • Maple
    A295643:=n->floor(n/4)^2: seq(A295643(n), n=0..100);
  • Mathematica
    Floor[Range[0, 80]/4]^2
  • PARI
    concat(vector(4), Vec(x^4*(1 + x^4) / ((1 - x)^3*(1 + x)^2*(1 + x^2)^2) + O(x^100))) \\ Colin Barker, Nov 25 2017
    
  • PARI
    a(n) = (n\4)^2; \\ Altug Alkan, Dec 17 2017
    
  • Python
    def A295643(n): return (n>>2)**2 # Chai Wah Wu, Feb 06 2023

Formula

a(n) = A002265(n)^2.
a(2n) = a(2n+1) = floor(n/2)^2 = A004526(n)^2 = A008794(n).
a(4n) = A000290(n).
a(n) = Sum_{i=1..floor(n/2)-1} i * (i mod 2).
From Colin Barker, Nov 25 2017: (Start)
G.f.: x^4*(1 + x^4) / ((1 - x)^3*(1 + x)^2*(1 + x^2)^2).
a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5) - a(n-8) + a(n-9) for n>8.
(End)
a(n) = (1/16)*(n-(3-(-1)^n-2*(-1)^((2*n-1+(-1)^n)/4))/2)^2. - Iain Fox, Dec 18 2017

A136523 Triangle T(n,k) = A053120(n,k) + A053120(n-1,k), read by rows.

Original entry on oeis.org

1, 1, 1, -1, 1, 2, -1, -3, 2, 4, 1, -3, -8, 4, 8, 1, 5, -8, -20, 8, 16, -1, 5, 18, -20, -48, 16, 32, -1, -7, 18, 56, -48, -112, 32, 64, 1, -7, -32, 56, 160, -112, -256, 64, 128, 1, 9, -32, -120, 160, 432, -256, -576, 128, 256, -1, 9, 50, -120, -400, 432, 1120, -576, -1280, 256, 512
Offset: 0

Views

Author

Roger L. Bagula, Mar 23 2008

Keywords

Examples

			Triangle begins as:
   1;
   1,  1;
  -1,  1,   2;
  -1, -3,   2,    4;
   1, -3,  -8,    4,    8;
   1,  5,  -8,  -20,    8,   16;
  -1,  5,  18,  -20,  -48,   16,   32;
  -1, -7,  18,   56,  -48, -112,   32,   64;
   1, -7, -32,   56,  160, -112, -256,   64,   128;
   1,  9, -32, -120,  160,  432, -256, -576,   128, 256;
  -1,  9,  50, -120, -400,  432, 1120, -576, -1280, 256, 512;
		

Crossrefs

Programs

  • Magma
    function A053120(n,k)
      if ((n+k) mod 2) eq 1 then return 0;
      elif n eq 0 then return 1;
      else return (-1)^Floor((n-k)/2)*(n/(n+k))*Binomial(Floor((n+k)/2), k)*2^k;
      end if;
    end function;
    A136523:= func< n,k | A053120(n,k) + A053120(n-1,k) >;
    [A136523(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 26 2023
    
  • Mathematica
    A053120[n_, k_]:= Coefficient[ChebyshevT[n,x], x, k];
    T[n_, k_]:= T[n, k]= A053120[n,k] + A053120[n-1,k];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten
  • SageMath
    def A053120(n,k):
        if (n+k)%2==1: return 0
        elif n==0: return 1
        else: return floor((-1)^((n-k)//2)*(n/(n+k))*binomial((n+k)//2, k)*2^k)
    def A136523(n,k): return A053120(n,k) + A053120(n-1,k)
    flatten([[A136523(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jul 26 2023

Formula

T(n, k) = A053120(n,k) + A053120(n-1,k).
Sum_{k=0..n} T(n, k) = A040000(n).
From G. C. Greubel, Jul 26 2023: (Start)
T(n, 0) = A057077(n).
T(n, 1) = (-1)^floor((n-1)/2) * A109613(n-1).
T(n, 2) = (-1)^floor((n-2)/2) * A008794(n-1).
T(n, 3) = (-1)^floor((n+1)/2) * A000330(n-1).
T(n, n) = A011782(n).
T(n, n-1) = A011782(n-1).
T(n, n-2) = -A001792(n-2).
T(n, n-4) = A001793(n-3).
T(n, n-6) = -A001794(n-6).
Sum_{k=0..n} (-1)^k*T(n,k) = A000007(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A000007(n) + [n=1].
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = (-1)^floor(n/2)*A025192(floor(n/2)). (End)

Extensions

Edited by G. C. Greubel, Jul 26 2023

A141543 Triangle T(n,k) read by brows: T(n,2k)=k, T(n,2k+1) = k-n, for 0<=k<=n.

Original entry on oeis.org

0, 0, -1, 0, -2, 1, 0, -3, 1, -2, 0, -4, 1, -3, 2, 0, -5, 1, -4, 2, -3, 0, -6, 1, -5, 2, -4, 3, 0, -7, 1, -6, 2, -5, 3, -4, 0, -8, 1, -7, 2, -6, 3, -5, 4, 0, -9, 1, -8, 2, -7, 3, -6, 4, -5, 0, -10, 1, -9, 2, -8, 3, -7, 4, -6, 5
Offset: 0

Views

Author

Paul Curtz, Aug 16 2008

Keywords

Comments

In each row, two bisections count up.

Examples

			Triangle begins as:
  0;
  0, -1;
  0, -2, 1;
  0, -3, 1, -2;
  0, -4, 1, -3, 2;
  0, -5, 1, -4, 2, -3;
  0, -6, 1, -5, 2, -4, 3;
		

Crossrefs

Sums include: A000217 (signed row), A008794 (row), A159915 (diagonal).

Programs

  • Magma
    A141543:= func< n,k | ((k+1) mod 2)*Floor(k/2) + (k mod 2)*(-n + Floor((k-1)/2)) >;
    [A141543(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Sep 17 2024
    
  • Maple
    A141543 := proc(n,k) if type(k,'even') then k/2; else (k-1)/2-n ; end if; end proc:
    seq(seq(A141543(n,k),k=0..n),n=0..15) ; # R. J. Mathar, Jul 07 2011
  • Mathematica
    Flatten[Table[If[EvenQ[k],k/2,(k-1)/2-n],{n,0,10},{k,0,n}]] (* Harvey P. Dale, Sep 24 2013 *)
  • SageMath
    def A141543(n,k): return ((k+1)%2)*(k//2) + (k%2)*(-n + ((k-1)//2))
    flatten([[A141543(n,k) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Sep 17 2024

Formula

From G. C. Greubel, Sep 17 2024: (Start)
T(n, k) = (1/2)*((1+(-1)^k)*floor(k/2) + (1-(-1)^k)*(-n + floor((k - 1)/2)) ).
T(n, n) = A130472(n).
T(2*n, n) = (-1)^n*A014682(n).
Sum_{k=0..n} T(n, k) = (-1)*A008794(n+1).
Sum_{k=0..n} (-1)^k*T(n, k) = A000217(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A159915(n+1).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = (1/32)*(6*n^2 + 6*n - 5 + (-1)^n*(2*n + 1) + 2*(1 - i)*(-i)^n + 2*(1 + i)*i^n). (End)

A355011 Array read by ascending antidiagonals: T(n, k) is the number of self-conjugate n-core partitions with k corners.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 3, 4, 5, 1, 1, 3, 9, 5, 7, 1, 1, 4, 9, 15, 7, 8, 1, 1, 4, 16, 15, 27, 8, 10, 1, 1, 5, 16, 34, 27, 37, 10, 11, 1, 1, 5, 25, 34, 76, 37, 55, 11, 13, 1, 1, 6, 25, 65, 76, 124, 55, 69, 13, 14, 1, 1, 6, 36, 65, 175, 124, 216, 69, 93, 14, 16, 1, 1
Offset: 2

Views

Author

Stefano Spezia, Jun 15 2022

Keywords

Comments

T(n, k) is also equal to the number of cornerless symmetric Motzkin paths of length 2*k + n - 1 with n - 1 flat steps (see Theorem 3.7 and Proposition 3.8 at pp. 16 - 17 in Cho et al.).

Examples

			The array begins:
  1,  1,  1,   1,   1,   1,    1,    1, ...
  1,  1,  1,   1,   1,   1,    1,    1, ...
  2,  4,  5,   7,   8,  10,   11,   13, ...
  2,  4,  5,   7,   8,  10,   11,   13, ...
  3,  9, 15,  27,  37,  55,   69,   93, ...
  3,  9, 15,  27,  37,  55,   69,   93, ...
  4, 16, 34,  76, 124, 216,  309,  471, ...
  4, 16, 34,  76, 124, 216,  309,  471, ...
  5, 25, 65, 175, 335, 675, 1095, 1875, ...
  5, 25, 65, 175, 335, 675, 1095, 1875, ...
  ...
		

Crossrefs

Cf. A000012 (n = 2,3), A001651, A004526 (k = 1), A008794 (k = 2), A247643 (n = 6,7), A355010.

Programs

  • Mathematica
    T[n_,k_]:=Sum[Binomial[Floor[(k-1)/2],Floor[(i-1)/2]]Binomial[Floor[k/2],Floor[i/2]]Binomial[Floor[n/2]+k-i,k],{i,Min[k,Floor[n/2]]}]; Flatten[Table[T[n-k+1,k],{n,2,13},{k,1,n-1}]]

Formula

T(n, k) = Sum_{i=1..min(k,floor(n/2))} binomial(floor((k-1)/2), floor((i-1)/2))*binomial(floor(k/2), floor(i/2))*binomial(floor(n/2)+k-i, k). (See proposition 3.8 in Cho et al.).
T(4, n) = T(5, n) = A001651(n+1).

A360610 Triangle read by rows: T(n,k) is the number of squares of side length k that can be placed inside a square of side length n without overlap, 1 <= k <= n.

Original entry on oeis.org

1, 4, 1, 9, 1, 1, 16, 4, 1, 1, 25, 4, 1, 1, 1, 36, 9, 4, 1, 1, 1, 49, 9, 4, 1, 1, 1, 1, 64, 16, 4, 4, 1, 1, 1, 1, 81, 16, 9, 4, 1, 1, 1, 1, 1, 100, 25, 9, 4, 4, 1, 1, 1, 1, 1, 121, 25, 9, 4, 4, 1, 1, 1, 1, 1, 1, 144, 36, 16, 9, 4, 4, 1, 1, 1, 1, 1, 1, 169, 36, 16, 9, 4, 4, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Torlach Rush, Feb 13 2023

Keywords

Comments

T(n,k) is square 1 <= k <= n.
Alternative triangle construction: Write each column k as each square repreated k times.
T(*,1) is A000290.
T(*,2) is A008794.
T(*,3) is A211547.
T(*,4) is A295643(n+4).
T(*,5) is A287392(n+1).
Row sums of triangle are A222548.
This assumes the sides of the small squares are parallel to those of the large square. If the small squares are allowed to be rotated, better packings may exist (see e.g. the Friedman link).

Examples

			Sum_{T(1,*)} = A222548(1) = 1;
Sum_{T(2,*)} = A222548(2) = 5;
Sum_{T(3,*)} = A222548(3) = 11.
Triangle begins:
    1;
    4,  1;
    9,  1, 1;
   16,  4, 1, 1;
   25,  4, 1, 1, 1;
   36,  9, 4, 1, 1, 1;
   49,  9, 4, 1, 1, 1, 1;
   64, 16, 4, 4, 1, 1, 1, 1;
   81, 16, 9, 4, 1, 1, 1, 1, 1;
  100, 25, 9, 4, 4, 1, 1, 1, 1, 1;
  ...
		

Crossrefs

Programs

  • Python
    def T(n, k): return (n//k)**2

Formula

T(n,k) = floor(n/k)^2.
Previous Showing 31-40 of 41 results. Next