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.

A297103 The number of equal-sized squares in the highest stack of squares contained in successive Genealodrons formed from 2^n - 1 equal-sized squares.

This page as a plain text file.
%I A297103 #15 Feb 03 2018 08:54:21
%S A297103 1,1,1,2,5,7,10,20,41,67,110,220,441,767,1335,2670,5341,9587,17211,
%T A297103 34422,68845,126011,230655,461310,922621,1711595,3175311,6350622,
%U A297103 12701245,23796515,44584536,89169072,178338145
%N A297103 The number of equal-sized squares in the highest stack of squares contained in successive Genealodrons formed from 2^n - 1 equal-sized squares.
%C A297103 The first Genealodron consists of one square.
%C A297103 The second Genealodron is formed by joining another equal-sized square to the left edge and to the right edge of the first so that the second Genealodron is made up of three squares.
%C A297103 The third Genealodron is formed by joining squares to the upper and lower edges of both the second and third square of the second Genealodron so that the third Genealodron is made up of seven squares.
%C A297103 The fourth Genealodron is formed by joining squares to the left and right edges of the fourth, fifth, sixth and seventh squares of the third Genealodron so that the fourth Genealodron has fifteen squares. The fourth Genealodron has the first overlaps, so although it contains 15 squares only 13 are seen when it is viewed from above.
%C A297103 The fifth Genealodron is formed by adding 16 more squares to the upper and lower edges of the last eight squares added to the fourth Genealodron so the fifth Genealodron has 31 squares, only 21 of which are seen when it is viewed from above because of the increasing number of overlaps.
%C A297103 The sixth Genealodron is formed by adding 32 more squares to the left and right edge of the last 16 squares added to the fifth Genealodron. So the sixth Genealodron has 63 squares only 31 of which are visible.
%C A297103 This continues, and the edges on which the new squares are added keep alternating between left and right and then upper and lower.
%C A297103 Gradually within the Genealodron, spirals are building counterclockwise and clockwise. The sequence that the Genealodron built with squares generates is different from the one built with equilateral triangles, because when a square is added, the spiral then turns through 90 degrees rather than just 60 degrees.
%H A297103 Andrew Smith, <a href="/A297103/a297103_3.pdf">Illustration of initial terms</a>
%o A297103 (MATLAB)
%o A297103 %I solved the problem by representing each Genealodron as a matrix
%o A297103 n=input('how many terms?');
%o A297103 %preallocation of length of output (length n)
%o A297103 vec=zeros(1,n);
%o A297103 %below I initialize the first 3 terms which are easily done with pen and paper
%o A297103 vec(1)=1;
%o A297103 vec(2)=1;
%o A297103 vec(3)=1;
%o A297103 %imat is the intermediate matrix to go from 3rd to 4th matrix.
%o A297103 imat=[1,0,1;0,0,0;1,0,1];
%o A297103 %mat is the 3rd matrix
%o A297103 mat=[1,0,1;1,1,1;1,0,1];
%o A297103 %loop
%o A297103 for i=4:n
%o A297103     %when i is even
%o A297103     if mod(i,2)==0
%o A297103         imat2=[zeros(i-1,2),imat];
%o A297103         imat3=[imat,zeros(i-1,2)];
%o A297103         %superposing two variations of previous intermediate matrix to get next one
%o A297103         imat=imat2+imat3;
%o A297103         %making mat same size as imat
%o A297103         mat=[zeros(i-1,1),mat,zeros(i-1,1)];
%o A297103         %calculating new matrix (=old matrix+intermediate)
%o A297103         mat=mat+imat;
%o A297103     %similarly when i is odd
%o A297103     else
%o A297103        imat2=[zeros(2,i);imat];
%o A297103        imat3=[imat;zeros(2,i)];
%o A297103        imat=imat2+imat3;
%o A297103        mat=[zeros(1,i);mat;zeros(1,i)];
%o A297103        mat=mat+imat;
%o A297103     end
%o A297103     %working out the maximum value of new matrix and allocating it to a position in the output vector
%o A297103     vec(i)=max(max(mat));
%o A297103 end
%o A297103 format long g
%o A297103 disp(vec)
%Y A297103 Cf. A179178, A179316.
%K A297103 nonn,easy
%O A297103 1,4
%A A297103 _Andrew Smith_, Dec 25 2017