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.

A363863 Numbers expressible as j^2 - k^2, 1 <= k <= j-2 ("squares with a square hole").

Original entry on oeis.org

8, 12, 15, 16, 20, 21, 24, 27, 28, 32, 33, 35, 36, 39, 40, 44, 45, 48, 51, 52, 55, 56, 57, 60, 63, 64, 65, 68, 69, 72, 75, 76, 77, 80, 81, 84, 85, 87, 88, 91, 92, 93, 95, 96, 99, 100, 104, 105, 108, 111, 112, 115, 116, 117, 119, 120, 123, 124, 125, 128, 129, 132, 133, 135, 136
Offset: 1

Views

Author

Thomas A. Fisher, Jun 25 2023

Keywords

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.

Examples

			8 = 3^2 - 1^2, 12 = 4^2 - 2^2, 15 = 4^2 - 1^2, ...
		

Crossrefs

Subsequence of A024352.

Programs

  • PARI
    isok(k) = ((omega(k)>1) || (isprimepower(k)>2)) && ((k % 4) != 2); \\ Michel Marcus, Jun 30 2023