The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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). 4

%I

%S 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,

%T 28,26,24,20,16,12,8,4,0,20,22,24,26,28,30,32,34,36,38,40,42,44,42,40,

%U 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

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

%C All the terms of this sequence are even numbers (A005843).

%C In the figure, two unit area squares can be connected in a corner or sideways.

%C 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.

%F T(n, 0) = A008586(n).

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

%e The triangle T(n, k) begins:

%e ---+-------------------------------------------------------------------

%e n\k| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

%e ---+-------------------------------------------------------------------

%e 0 | 0

%e 1 | 4 0

%e 2 | 8 8 8 4 0

%e 3 | 12 14 16 18 20 16 12 8 4 0

%e 4 | 16 18 20 22 24 26 28 28 28 26 24 20 16 12 8 4 0

%e ...

%e Here are the values of h_i's for the first seven rows of the triangle T:

%e n h_1(n) h_2(n) h_3(n) h_4(n)

%e --------------------------------------

%e 0 0 0 0 0

%e 1 0 0 0 1

%e 2 0 2 0 2

%e 3 4 0 0 5

%e 4 6 2 2 6

%e 5 12 0 4 9

%e 6 16 6 0 14

%e ...

%e Illustrations for n = 4, k=0..15 by _Andrew Howroyd_, Sep 01 2019: (Start)

%e __.__.__.__ __.__.__.__ __.__.__.__ __.__.__.__

%e | | | | | | | |

%e | | |__ | |__ | |__ __|

%e | | __| | __|__ | __|__ |__

%e |__.__.__.__| |__.__.__.__| |__| |__.__| |__| |__.__|

%e (16) (18) (20) (22)

%e __.__.__.__ __. .__.__ __ __.__ __ __.__

%e | | | |__| | | | | | | | | __|

%e |__ __.__| |__ __.__| |__|__|__.__| |__|__|__|

%e __|__|__.__ __|__|__.__ __|__|__.__ __|__|__.__

%e |__| |__.__| |__| |__.__| |__| |__.__| |__| |__.__|

%e (24) (26) (28) (28)

%e __ __ __ __

%e | | __|__| __ __|__| __ __|__| __ __

%e |__|__|__| |__|__|__| |__|__|__| |__|__|__|

%e __|__|__.__ __|__|__.__ __|__|__ __|__|__

%e |__| |__.__| |__| |__.__| |__| |__| |__| |__|

%e (28) (26) (24) (20)

%e __ __ __

%e |__|__|__| __|__| __ __

%e __|__| __|__| __|__| |__|

%e |__| |__| |__|

%e (16) (12) (8) (4)

%e (End)

%t 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]<k<=(h1[n]+h2[n]),2(2n+h1[n]),If[(h1[n]+h2[n])<k<=(h1[n]+h2[n]+h3[n]),2(2(n+h1[n])+h2[n]-k),2(2(n+h2[n]-k)+3h1[n]+h3[n])]]]; Flatten[Table[T[n,k],{n,0,6},{k,0,n^2}]]

%Y Cf. A000290, A005843, A008586, A048759, A326118 (h_4).

%K nonn,tabf

%O 0,2

%A _Stefano Spezia_, Jul 08 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified February 28 11:08 EST 2020. Contains 332323 sequences. (Running on oeis4.)