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



Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 2
1, 1, 1, 2, 5, 7, 10, 20, 41, 67, 110, 220, 441, 767, 1335, 2670, 5341, 9587, 17211, 34422, 68845, 126011, 230655, 461310, 922621, 1711595, 3175311, 6350622, 12701245, 23796515, 44584536, 89169072, 178338145 (list; graph; refs; listen; history; text; internal format)



The first Genealodron consists of one square.

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.

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.

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.

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.

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.

This continues, and the edges on which the new squares are added keep alternating between left and right and then upper and lower.

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.


Table of n, a(n) for n=1..33.

Andrew Smith, Illustration of initial terms



%I solved the problem by representing each Genealodron as a matrix

n=input('how many terms?');

%preallocation of length of output (length n)

vec=zeros(1, n);

%below I initialize the first 3 terms which are easily done with pen and paper




%imat is the intermediate matrix to go from 3rd to 4th matrix.

imat=[1, 0, 1; 0, 0, 0; 1, 0, 1];

%mat is the 3rd matrix

mat=[1, 0, 1; 1, 1, 1; 1, 0, 1];


for i=4:n

    %when i is even

    if mod(i, 2)==0

        imat2=[zeros(i-1, 2), imat];

        imat3=[imat, zeros(i-1, 2)];

        %superposing two variations of previous intermediate matrix to get next one


        %making mat same size as imat

        mat=[zeros(i-1, 1), mat, zeros(i-1, 1)];

        %calculating new matrix (=old matrix+intermediate)


    %similarly when i is odd


       imat2=[zeros(2, i); imat];

       imat3=[imat; zeros(2, i)];


       mat=[zeros(1, i); mat; zeros(1, i)];



    %working out the maximum value of new matrix and allocating it to a position in the output vector



format long g



Cf. A179178, A179316.

Sequence in context: A076802 A226650 A024374 * A065219 A013660 A257325

Adjacent sequences:  A297100 A297101 A297102 * A297104 A297105 A297106




Andrew Smith, Dec 25 2017



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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 7 18:19 EST 2021. Contains 349585 sequences. (Running on oeis4.)