OFFSET
1,1
COMMENTS
Inspired by my 4-year-old son, who loves Numberblocks, I decided to work out which numbers appear in the "squares with [square] holes club". These are numbers which, when configured as a square, have a square wholly removed. For example, 8 is 3 X 3 with a 1 X 1 hole in the middle. 24 is both a 5 X 5 with a 1 X 1 hole in the middle and a 7 X 7 with a 5 X 5 hole in the middle. The hole has to be "wholly contained", meaning I can't, for example, have 3^2 - 2^2 = 9 - 4 = 5, as removing a 2 X 2 square from a 3 X 3 square doesn't leave a "hole", as we are working with blocks, i.e., integers.
This sequence contains all natural numbers which factor as (j - k)*(j + k), where j - k >= 2 and k >= 1. That is, all natural numbers which have at least one factor pair of the form u*v such that u and v have the same parity, are distinct, and are both strictly greater than 1. This precisely rules out 1, primes, squares of primes, and the even numbers which are congruent to 2 modulo 4. In other words, this sequence is equal to A080257\A016825.
EXAMPLE
8 = 3^2 - 1^2, 12 = 4^2 - 2^2, 15 = 4^2 - 1^2, ...
PROG
(PARI) isok(k) = ((omega(k)>1) || (isprimepower(k)>2)) && ((k % 4) != 2); \\ Michel Marcus, Jun 30 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Thomas A. Fisher, Jun 25 2023
STATUS
approved