MathDB
Combinatorics / Counting squares

Source:

August 11, 2019
combinatoricsgeometryrectangle

Problem Statement

A 1×n1 \times n rectangle (n1n \geq 1 ) is divided into nn unit (1×11 \times 1) squares. Each square of this rectangle is colored red, blue or green. Let f(n)f(n) be the number of colourings of the rectangle in which there are an even number of red squares. What is the largest prime factor of f(9)/f(3)f(9)/f(3)? (The number of red squares can be zero.)