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

%I #38 Feb 06 2023 20:00:55

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

%T 49,49,49,49,64,64,64,64,81,81,81,81,100,100,100,100,121,121,121,121,

%U 144,144,144,144,169,169,169,169,196,196,196,196,225,225,225

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

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

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

%H Colin Barker, <a href="/A295643/b295643.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>

%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,2,-2,0,0,-1,1).

%F a(n) = A002265(n)^2.

%F a(2n) = a(2n+1) = floor(n/2)^2 = A004526(n)^2 = A008794(n).

%F a(4n) = A000290(n).

%F a(n) = Sum_{i=1..floor(n/2)-1} i * (i mod 2).

%F From _Colin Barker_, Nov 25 2017: (Start)

%F G.f.: x^4*(1 + x^4) / ((1 - x)^3*(1 + x)^2*(1 + x^2)^2).

%F a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5) - a(n-8) + a(n-9) for n>8.

%F (End)

%F a(n) = (1/16)*(n-(3-(-1)^n-2*(-1)^((2*n-1+(-1)^n)/4))/2)^2. - _Iain Fox_, Dec 18 2017

%p A295643:=n->floor(n/4)^2: seq(A295643(n), n=0..100);

%t Floor[Range[0, 80]/4]^2

%o (Magma) [Floor(n/4)^2 : n in [0..100]];

%o (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

%o (PARI) a(n) = (n\4)^2; \\ _Altug Alkan_, Dec 17 2017

%o (Python)

%o def A295643(n): return (n>>2)**2 # _Chai Wah Wu_, Feb 06 2023

%Y Cf. A000290, A002265, A004526, A008794.

%Y See also the quarter-squares, A002620.

%K nonn,easy

%O 0,9

%A _Wesley Ivan Hurt_, Nov 25 2017