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.

A345118 a(n) is the sum of the lengths of all the segments used to draw a square of side n representing a basketweave pattern where all the multiple strands are of unit width, the horizontal ones appearing as 1 X 3 rectangles, while the vertical ones as unit area squares.

This page as a plain text file.
%I A345118 #29 Jan 31 2024 16:47:34
%S A345118 0,4,11,20,34,50,69,92,116,144,175,208,246,286,329,376,424,476,531,
%T A345118 588,650,714,781,852,924,1000,1079,1160,1246,1334,1425,1520,1616,1716,
%U A345118 1819,1924,2034,2146,2261,2380,2500,2624,2751,2880,3014,3150,3289,3432,3576,3724
%N A345118 a(n) is the sum of the lengths of all the segments used to draw a square of side n representing a basketweave pattern where all the multiple strands are of unit width, the horizontal ones appearing as 1 X 3 rectangles, while the vertical ones as unit area squares.
%H A345118 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1,-1,3,-3,1).
%F A345118 O.g.f.: x*(4 - x - x^2 + 3*x^3 + x^4)/((1 - x)^3*(1 + x^4)).
%F A345118 E.g.f.: (exp(x)*x*(8 + 3*x) + (-1)^(1/4)*(sinh((-1)^(1/4)*x) - sin((-1)^(1/4)*x)))/2.
%F A345118 a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) - a(n-4) + 3*a(n-5) - 3*a(n-6) + a(n-7) for n > 6.
%F A345118 a(n) = (n*(5 + 3*n) - (1 - (-1)^n)*sin((n-1)*Pi/4))/2.
%F A345118 a(n) = A211014(n/2) - A000035(n)*A056594((n-3)/2).
%F A345118 a(2*n) = A211014(n).
%F A345118 a(k) = A115067(k+1) for k not congruent to 3 mod 4 (A004773).
%F A345118 From _Helmut Ruhland_, Jan 29 2024: (Start)
%F A345118 For n > 1: a(n) - (2 * A368052(n+2) + A368052(n+3)) * 2 is periodic for n mod 8, i.e. a(n) = (2 * A368052(n+2) + A368052(n+3)) * 2 + f8(n) with
%F A345118 n mod 8 =   0   1   2   3   4   5   6   7
%F A345118 f8(n)   =   0   0  -3  -2  -2  -2   1   0   (End)
%e A345118 Illustrations for n = 1..8:
%e A345118         _           _ _          _ _ _
%e A345118        |_|         |_|_|        |_ _ _|
%e A345118                    |_ _|        |_|_|_|
%e A345118                                 |_ _ _|
%e A345118     a(1) = 4     a(2) = 11     a(3) = 20
%e A345118      _ _ _ _     _ _ _ _ _    _ _ _ _ _ _
%e A345118     |_ _|_|_|   |_ _|_|_ _|  |_|_|_ _ _|_|
%e A345118     |_|_ _ _|   |_|_ _ _|_|  |_ _ _|_|_ _|
%e A345118     |_ _|_|_|   |_ _|_|_ _|  |_|_|_ _ _|_|
%e A345118     |_|_ _ _|   |_|_ _ _|_|  |_ _ _|_|_ _|
%e A345118                 |_ _|_|_ _|  |_|_|_ _ _|_|
%e A345118                              |_ _ _|_|_ _|
%e A345118     a(4) = 34    a(5) = 50     a(6) = 69
%e A345118       _ _ _ _ _ _ _      _ _ _ _ _ _ _ _
%e A345118      |_|_|_ _ _|_|_|    |_ _|_|_ _ _|_|_|
%e A345118      |_ _ _|_|_ _ _|    |_|_ _ _|_|_ _ _|
%e A345118      |_|_|_ _ _|_|_|    |_ _|_|_ _ _|_|_|
%e A345118      |_ _ _|_|_ _ _|    |_|_ _ _|_|_ _ _|
%e A345118      |_|_|_ _ _|_|_|    |_ _|_|_ _ _|_|_|
%e A345118      |_ _ _|_|_ _ _|    |_|_ _ _|_|_ _ _|
%e A345118      |_|_|_ _ _|_|_|    |_ _|_|_ _ _|_|_|
%e A345118                         |_|_ _ _|_|_ _ _|
%e A345118         a(7) = 92           a(8) = 116
%t A345118 LinearRecurrence[{3,-3,1,-1,3,-3,1},{0,4,11,20,34,50,69},50]
%t A345118 a[ n_] := (3*n^2 + 5*n)/2 - (-1)^Floor[n/4]*Boole[Mod[n, 4] == 3]; (* _Michael Somos_, Jan 25 2024 *)
%o A345118 (PARI) concat(0, Vec(x*(4 - x - x^2 + 3*x^3 + x^4)/((1 - x)^3*(1 + x^4)) + O(x^40))) \\ _Felix Fröhlich_, Jun 09 2021
%o A345118 (PARI) {a(n) = (3*n^2 + 5*n)/2 - (-1)^(n\4)*(n%4==3)}; /* _Michael Somos_, Jan 25 2024 */
%Y A345118 Cf. A000035, A004773, A056594, A115067, A211014, A316316, A316317, A368052.
%K A345118 nonn,easy
%O A345118 0,2
%A A345118 _Stefano Spezia_, Jun 08 2021