%I #43 Jun 04 2021 22:51:43
%S 10,15,20,30,40,45,50,60,65,68,70,75,78,80,90,100,105,110,120,130,135,
%T 136,140,150,156,160,165,170,175,180,190,195,200,204,210,220,222,225,
%U 230,234,240,250,255,260,270,272,280,285,290,300,310,312,315,320,325,330,340,345,350,360,369,370
%N Sides s of squares that can be tiled with squares of two different sizes so that the number of large or small squares is the same.
%C This sequence is a generalization of the 4th problem proposed for the pupils in grade 6 during the 19th Mathematical Festival at Moscow in 2008.
%C Some notations: s = side of the tiled square, a = side of small squares, b = side of large squares, and z = number of small squares = number of large squares.
%C Side s of such tiled squares must satisfy the Diophantine equation s^2 = z * (a^2+b^2).
%C There are two types of solutions. See A344331 for type 1 and A344332 for type 2.
%C If q is a term, k * q is another term for k > 1.
%D Ivan Yashchenko, Invitation to a Mathematical Festival, pp. 10 and 102, MSRI, Mathematical Circles Library, 2013.
%H <a href="/index/O#Olympiads">Index to sequences related to Olympiads</a>.
%e -> Example of type 1:
%e Square 10 x 10 with a = 1, b = 2, s = 10, z = 20.
%e ___ ___ _ ___ ___ _
%e | | |_| | |_|
%e |___|___|_|___|___|_|
%e | | |_| | |_| with 10 elementary 2 x 5 rectangles
%e |___|___|_|___|___|_|
%e | | |_| | |_| ___ ___ _
%e |___|___|_|___|___|_| | | |_|
%e | | |_| | |_| |___|___|_|
%e |___|___|_|___|___|_|
%e | | |_| | |_|
%e |___|___|_|___|___|_|
%e .
%e -> Example of type 2:
%e Square 15 x 15 with a = 3, b = 4, s = 15, z = 9.
%e ________ ________ ________ _____
%e | | | | |
%e | | | | |
%e | | | |_____|
%e |_______ |________|________| |
%e | | | | |
%e | | | |_____|
%e | | | | |
%e |________|________|________| |
%e | | | |_____|
%e | | | | |
%e | | | | |
%e |_____ __|___ ____|_ ______|_____|
%e | | | | | |
%e | | | | | |
%e |_____|______|______|______|_____|
%e Remarks:
%e - With terms as 10, 20, ... we only obtain sides of squares of type 1:
%e 10 is a term of this type because the square 10 X 10 only can be tiled with 20 squares of size 1 X 1 and 20 squares of size 2 X 2 (see first example),
%e 20 is another term of this type because the square 20 X 20 only can be tiled with 80 squares of size 1 x 1 and 80 squares of size 2 x 2.
%e - With terms as 15, 65, ... we only obtain sides of squares of type 2:
%e 15 is a term of this type because the square 15 X 15 only can be tiled with 9 squares of size 3 X 3 and 9 squares of size 4 X 4 (see second example),
%e 65 is another term of this type because the square 65 X 65 only can be tiled with 25 squares of size 5 X 5 and 25 squares of size 12 X 12.
%e - With terms as 30, 60, ... we obtain both sides of squares of type 1 and of type 2:
%e 30 is a term of type 1 because the square 30 X 30 can be tiled with 180 squares of size 1 X 1 and 180 squares of size 2 X 2, but,
%e 30 is also a term of type 2 because the square 30 X 30 can be tiled with 9 squares of size 6 X 6 and 9 squares of size 8 X 8.
%o (PARI) pts(lim) = my(v=List(), m2, s2, h2, h); for(middle=4, lim-1, m2=middle^2; for(small=1, middle, s2=small^2; if(issquare(h2=m2+s2, &h), if(h>lim, break); listput(v, [small, middle, h])))); vecsort(Vec(v)); \\ A009000
%o isdp4(s) = my(k=1, x); while(((x=k^4 - (k-1)^4) <= s), if (x == s, return (1)); k++); return(0);
%o isokp2(s) = {if (!isdp4(s), return(0)); if (s % 2, my(vp = pts(s)); for (i=1, #vp, my(vpi = vp[i], a = vpi[1], b = vpi[2], c = vpi[3]); if (a*c/(c-b) == s, return(1)); ); ); }
%o isok2(s) = {if (isokp2(s), return (1)); fordiv(s, d, if ((d>1) || (d<s), if (isokp2(s/d), return (1)))); }
%o isokp1(s) = {if (!(s % 2) && ispower(s/2, 4), return (0)); my(m = sqrtnint(s, 3)); vecsearch(setbinop((x, y)->x*y*(x^2+y^2), [1..m]), s);}
%o isok1(s) = {if (isokp1(s), return (1)); fordiv(s, d, if ((d>1) || (d<s), if (isokp1(s/d), return (1))));}
%o isok(s) = isok1(s) || isok2(s); \\ _Michel Marcus_, Jun 04 2021
%Y Subsequences: A008592 \ {0}, A008597 \ {0}, A034262 \ {0,1}.
%Y Cf. A344331, A344332, A344333, A344334.
%K nonn
%O 1,1
%A _Bernard Schott_, May 15 2021
%E Corrected by _Michel Marcus_, May 18 2021
%E Incorrect term 145 removed by _Michel Marcus_, Jun 04 2021
|