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

A338329 First differences of A326118.

Original entry on oeis.org

1, 1, 3, 1, 3, 5, 7, 3, 5, 7, 9, 5, 7, 9, 11, 7, 9, 11, 13, 9, 11, 13, 15, 11, 13, 15, 17, 13, 15, 17, 19, 15, 17, 19, 21, 17, 19, 21, 23, 19, 21, 23, 25, 21, 23, 25, 27, 23, 25, 27, 29, 25, 27, 29, 31, 27, 29, 31, 33, 29, 31, 33, 35, 31, 33, 35, 37, 33, 35, 37, 39
Offset: 0

Views

Author

Stefano Spezia, Oct 23 2020

Keywords

Comments

It includes exclusively all the odd numbers (A005408). Except for 1, 3 and 5 that appear three times, each other odd number appears four times.

Crossrefs

Cf. A004277 (averages of the increasing runs), A005408, A326118.

Programs

  • Mathematica
    LinearRecurrence[{1,0,0,1,-1},{1,1,3,1,3,5,7,3},71]

Formula

O.g.f.: (1 + 2*x^2 - 2*x^3 + x^4 + 2*x^5 - 2*x^7)/((1 - x)^2*(1 + x + x^2 + x^3)).
E.g.f.: (3*exp(-x) + exp(x)*(7 + 2*x) - 6*cos(x) + 6*sin(x))/4 - 2*x - x^2.
a(n) = a(n-1) + a(n-4) - a(n-5) for n > 7.
a(n) = (7 + 2*n - 6*cos(n*Pi/2) + 3*(-1)^n + 6*sin(n*Pi/2))/4 for n > 2.

A309038 Irregular triangle T read by rows: given a square made of n^2 squares of unit area, T(n, k) is the longest perimeter that can be obtained by removing k of n^2 squares such that the modified figure remains connected and without holes (n >= 0 and 0 <= k <= n^2).

Original entry on oeis.org

0, 4, 0, 8, 8, 8, 4, 0, 12, 14, 16, 18, 20, 16, 12, 8, 4, 0, 16, 18, 20, 22, 24, 26, 28, 28, 28, 26, 24, 20, 16, 12, 8, 4, 0, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 42, 40, 38, 36, 32, 28, 24, 20, 16, 12, 8, 4, 0, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 56, 56, 56, 56, 56, 56, 52, 48, 44, 40, 36, 32, 28, 24, 20, 16, 12, 8, 4, 0
Offset: 0

Views

Author

Stefano Spezia, Jul 08 2019

Keywords

Comments

All the terms of this sequence are even numbers (A005843).
In the figure, two unit area squares can be connected in a corner or sideways.
Every n-th row of the triangle is made of almost four successive finite arithmetic progressions characterized respectively by the following common differences: 2, 0, -2, -4. If we let h_i(n) be the number of first differences of i-th progression (i = 1,2,3,4), we have that 4*n + 2*h_1(n) - 2*h_3(n) - 4*h_4(n) = 0 and h_1(n) + h_2(n) + h_3(n) + h_4(n) = n^2.

Examples

			The triangle T(n, k) begins:
---+-------------------------------------------------------------------
n\k|  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16
---+-------------------------------------------------------------------
0  |  0
1  |  4   0
2  |  8   8   8   4   0
3  | 12  14  16  18  20  16  12   8   4   0
4  | 16  18  20  22  24  26  28  28  28  26  24  20  16  12   8   4   0
...
Here are the values of h_i's for the first seven rows of the triangle T:
n    h_1(n)   h_2(n)   h_3(n)   h_4(n)
--------------------------------------
0         0        0        0        0
1         0        0        0        1
2         0        2        0        2
3         4        0        0        5
4         6        2        2        6
5        12        0        4        9
6        16        6        0       14
...
Illustrations for n = 4, k=0..15 by _Andrew Howroyd_, Sep 01 2019: (Start)
   __.__.__.__    __.__.__.__    __.__.__.__    __.__.__.__
  |           |  |           |  |           |  |           |
  |           |  |__         |  |__         |  |__       __|
  |           |   __|        |   __|__      |   __|__   |__
  |__.__.__.__|  |__.__.__.__|  |__|  |__.__|  |__|  |__.__|
       (16)           (18)          (20)           (22)
   __.__.__.__    __.  .__.__    __    __.__    __    __.__
  |           |  |  |__|     |  |  |  |     |  |  |  |   __|
  |__    __.__|  |__    __.__|  |__|__|__.__|  |__|__|__|
   __|__|__.__    __|__|__.__    __|__|__.__    __|__|__.__
  |__|  |__.__|  |__|  |__.__|  |__|  |__.__|  |__|  |__.__|
      (24)            (26)          (28)           (28)
   __       __             __             __
  |  |   __|__|   __    __|__|   __    __|__|   __    __
  |__|__|__|     |__|__|__|     |__|__|__|     |__|__|__|
   __|__|__.__    __|__|__.__    __|__|__       __|__|__
  |__|  |__.__|  |__|  |__.__|  |__|  |__|     |__|  |__|
      (28)            (26)         (24)           (20)
   __    __             __
  |__|__|__|         __|__|         __             __
   __|__|         __|__|         __|__|           |__|
  |__|           |__|           |__|
      (16)         (12)            (8)             (4)
(End)
		

Crossrefs

Programs

  • Mathematica
    h4[n_]:=If[n>2,(1/8)(-29+12n+2n^2-3*Cos[n*Pi]-12*Sin[n*Pi/2]),n]; h3[n_]:=1-Cos[n*Pi]-4*KroneckerDelta[n,1]+2*KroneckerDelta[n,4]+2*Sin[n*Pi/2]; h2[n_]:=If[n>4,(1/8)(71-20n+2n^2+25Cos[n*Pi]+4Sin[n*Pi/2]),2*(KroneckerDelta[n,2]+KroneckerDelta[n,4])]; h1[n_]:=n^2-(h2[n]+h3[n]+h4[n]); T[n_,k_]:=If[0<=k<=h1[n],2(2n+k),If[h1[n]
    				

Formula

T(n, 0) = A008586(n).
T(n, k) = 2*(2*n + k) for 0 <= k <= h_1(n), T(n, k) = 2*(2*n + h_1(n)) for h_1(n) <= k <= h_1(n) + h_2(n), T(n, k) = 2*(2*(n + h_1(n)) + h_2(n) - k) for h_1(n) + h_2(n) <= k <= h_1(n) + h_2(n) + h_3(n), T(n, k) = 2*(2*(n + h_2(n) - k) + 3*h_1(n) + h_3(n)), for h_1(n) + h_2(n) + h_3(n) <= k <= n^2, where h_4(n) = n for 0 <= n <= 2 and h_4(n) = (1/8)*(-29 + 12*n + 2*n^2 - 3*cos(n*Pi) - 12*sin(n*Pi/2)) for n > 2, h_3(n) = 2*delta(n, 4) - 4*delta(n, 1) + 1 - cos(n*Pi) + 2*sin(n*Pi/2) and delta(i, j) is the Kronecker delta, h_2(n) = 2*(delta(n, 2) + delta(n, 4)) for 0 <= n <= 4 and h_2(n) = (1/8)*(71 - 20*n + 2*n^2 + 25*cos(n*Pi) + 4*sin(n*Pi/2)) for n > 4, h_1(n) = n^2 - (h_1(n) + h_2(n) + h_3(n)).

A327480 a(n) is the maximum number of squares of unit area that can be removed from an n X n square while still obtaining a connected figure without holes and of the longest perimeter.

Original entry on oeis.org

0, 0, 2, 4, 8, 12, 22, 28, 40, 48, 64, 76, 94, 108, 130, 148, 172, 192, 220, 244, 274, 300, 334, 364, 400, 432, 472, 508, 550, 588, 634, 676, 724, 768, 820, 868, 922, 972, 1030, 1084, 1144, 1200, 1264, 1324, 1390, 1452, 1522, 1588, 1660, 1728, 1804, 1876, 1954
Offset: 0

Views

Author

Stefano Spezia, Sep 16 2019

Keywords

Comments

a(n) is equal to h_1(n) + h_2(n) as defined in A309038.

Examples

			Illustrations for n = 2..7:
      __                      __    __                __    __
     |__|__                  |__|__|__|              |__|__|__|
        |__|                  __|__|__                __|__|__ __
                             |__|  |__|              |__|  |     |
                                                           |__ __|
      a(2) = 2                a(3) = 4                  a(4) = 8
   __    __ __ __     __    __    __         __    __    __    __
  |__|__|__ __ __|   |__|__|__|  |__|__     |__|__|__|  |__|__|__|
   __|__|__    __     __|__|__    __|__|     __|__|__    __|__|__
  |  |  |__|__|__|   |__|  |__|__|__|       |__|  |__|__|__|  |__|
  |  |   __|__|__     __    __|__|__         __    __|__|__    __
  |__|  |__|  |__|   |__|__|__|  |__|__     |__|__|__|  |__|__|__|
                        |__|        |__|     __|__|__    __|__|__
                                            |__|  |__|  |__|  |__|
      a(5) = 12           a(6) = 22               a(7) = 28
		

Crossrefs

Programs

  • Magma
    I:=[0, 0, 2, 4, 8, 12, 22, 28, 40, 48, 64]; [n le 11 select I[n] else 2*Self(n-1)-Self(n-2)+Self(n-4)-2*Self(n-5)+Self(n-6): n in [1..53]];
    
  • Maple
    gf := (1/24)*exp(-x)*(33+9*exp(2*x)*(2*x^2-2*x+7)-2*exp(x)*(x^4+12*x^2+48)-12*exp(x)*sin(x)); ser := series(gf, x, 53):
    seq(factorial(n)*coeff(ser, x, n), n = 0 .. 52)
  • Mathematica
    Join[{0,0,2,4,8},Table[(1/8)*(21-12n+6n^2+11*(-1)^n-4*Sin[n*Pi/2]),{n,5,52}]]
  • PARI
    concat([0, 0], Vec(2*x^2*(1+x^2+2*x^4-2*x^5+2*x^6-2*x^7+x^8)/((1-x)^3*(1+x)*(1+x^2))+O(x^53)))

Formula

O.g.f.: 2*x^2*(1 + x^2 + 2*x^4 - 2*x^5 + 2*x^6 - 2*x^7 + x^8)/((1 - x)^3*(1 + x)*(1 + x^2)).
E.g.f.: (1/24)*exp(-x)*(33 + 9*exp(2*x)*(7 - 2*x + 2*x^2) - 2*exp(x)*(48 + 12*x^2 + x^4) - 12*exp(x)*sin(x)).
a(n) = 2*a(n-1) - a(n-2) + a(n-4) - 2*a(n-5) + a(n-6) for n > 10.
a(n) = (1/8)*(21 - 12*n + 6*n^2 + 11*(-1)^n + 4*A056594(n+1)) for n > 4, a(0) = 0, a(1) = 0, a(2) = 2, a(3) = 4, a(4) = 8. [corrected by Jason Yuen, Dec 17 2024]
Limit_{n->oo} a(n)/A000290(n) = 3/4.

A327479 a(n) is the minimum number of squares of unit area that must be removed from an n X n square to obtain a connected figure without holes and of the longest perimeter.

Original entry on oeis.org

0, 0, 0, 4, 6, 12, 16, 28, 32, 44, 52, 68, 76, 92, 104, 124, 136, 156, 172, 196, 212, 236, 256, 284, 304, 332, 356, 388, 412, 444, 472, 508, 536, 572, 604, 644, 676, 716, 752, 796, 832, 876, 916, 964, 1004, 1052, 1096, 1148, 1192, 1244, 1292, 1348, 1396, 1452, 1504
Offset: 0

Views

Author

Stefano Spezia, Sep 16 2019

Keywords

Comments

a(n) is equal to h_1(n) as defined in A309038.
All the terms are even numbers (A005843).

Examples

			Illustrations for n = 3..8:
      __    __               __    __.__             __    __.__.__
     |__|__|__|             |__|__|__.__|           |__|__|__.__.__|
      __|__|__               __|__|__.__             __|__|__    __
     |__|  |__|             |  |  |     |           |  |  |__|__|__|
                            |__|  |__.__|           |  |   __|__|__
                                                    |__|  |__|  |__|
      a(3) = 4                a(4) = 6                  a(5) = 12
   __    __    __.__     __    __    __    __     __    __    __    __.__
  |__|__|__|  |__   |   |__|__|__|  |__|__|__|   |__|__|__|  |__|__|__   |
   __|__|__    __|  |    __|__|__    __|__|__     __|__|__    __|  |  |__|
  |__|  |__|__|__.__|   |__|  |__|__|__|  |__|   |__|  |__|__|__.__|   __
   __    __|__|__.__     __    __|__|__    __     __    __|__|__    __|  |
  |  |__|  |  |     |   |__|__|__|  |__|__|__|   |__|__|  |  |__|__|__.__|
  |__.__.__|  |__.__|    __|__|__    __|__|__     __|__.__|   __|__|__.__
                        |__|  |__|  |__|  |__|   |  |__    __|  |  |     |
                                                 |__.__|  |__.__|  |__.__|
     a(6) = 16                a(7) = 28                 a(8) = 32
		

Crossrefs

Programs

  • Magma
    I:=[0, 0, 0, 4, 6, 12, 16, 28, 32, 44, 52]; [n le 11 select I[n] else 2*Self(n-1)-Self(n-2)+Self(n-4)-2*Self(n-5)+Self(n-6): n in [1..55]];
    
  • Maple
    gf := 8+4*x+2*x^2+(1/12)*x^4+1/4*(-7*exp(-x)+exp(x)*(2*x^2+6*x-25)-4*sin(x)):
    ser := series(gf, x, 55): seq(factorial(n)*coeff(ser, x, n), n = 0..54);
  • Mathematica
    Join[{0,0,0,4,6},Table[(1/4)*(-25+2n*(2+n)-7*Cos[n*Pi]-4*Sin[n*Pi/2]),{n,5,54}]]
  • PARI
    concat([0, 0, 0], Vec(2*x^3*(-2+x-2*x^2+x^3-2*x^4+3*x^5-2*x^6+x^7)/((-1+x)^3*(1+x+x^2+x^3))+O(x^55)))

Formula

O.g.f.: 2*x^3*(-2 + x - 2*x^2 + x^3 - 2*x^4 + 3*x^5 - 2*x^6 + x^7)/((-1 + x)^3*(1 + x + x^2 + x^3)).
E.g.f.: 8 + 4*x + 2*x^2 + x^4/12 + (1/4)*(-7*exp(-x) + exp(x)*(-25 + 6*x + 2*x^2) - 4*sin(x)).
a(n) = 2*a(n-1) - a(n-2) + a(n-4) - 2*a(n-5) + a(n-6) for n > 10.
a(n) = (1/4)*(- 25 + 2*n*(2 + n) - 7*cos(n*Pi) - 4*sin(n*Pi/2)) for n > 4, a(0) = 0, a(1) = 0, a(2) = 0, a(3) = 4, a(4) = 6.
Lim_{n->inf} a(n)/A000290(n) = 1/2.

A328685 Row sums of A309038.

Original entry on oeis.org

0, 4, 28, 120, 320, 716, 1380, 2464, 3984, 6196, 9124, 13128, 18048, 24476, 32244, 42096, 53440, 67460, 83604, 103192, 124944, 150892, 179908, 214080, 251184, 294356, 341700, 396264, 454624, 521276, 593364, 675088, 761568, 858916, 963124, 1079736, 1202160, 1338380
Offset: 0

Views

Author

Stefano Spezia, Oct 25 2019

Keywords

Comments

All the terms are even.

Crossrefs

Programs

  • Mathematica
    (* The function T is defined in A309038. *)
    Flatten[Table[Sum[T[n, k], {k, 0, n^2}], {n, 0, 37}]]

Formula

Conjectures from Colin Barker, Oct 25 2019: (Start)
G.f.: 4*x*(1 + 5*x + 17*x^2 + 27*x^3 + 46*x^4 + 52*x^5 + 54*x^6 + 28*x^7 + 29*x^8 - 7*x^9+ 5*x^10 - 17*x^11 + 4*x^12 - 6*x^13 + 12*x^14 - 14*x^15 + 8*x^16 - 4*x^17) / ((1 - x)^5*(1 + x)^3*(1 + x^2)^3).
a(n) = 2*a(n-1) - a(n-2) + 3*a(n-4) - 6*a(n-5) + 3*a(n-6) - 3*a(n-8) + 6*a(n-9) - 3*a(n-10) + a(n-12) - 2*a(n-13) + a(n-14) for n > 18.
(End)
a(n) ~ 5*n^4/8. - Conjectured by Stefano Spezia, Sep 08 2021
Showing 1-5 of 5 results.