Thursday, 20 February 2025

Not the Sum of Distinct Squares or Cubes

I guess I'd never really thought about the issue before. I've written about what numbers can and cannot be expressed as a sum of two squares and what numbers cannot be expressed as a sum of three squares but what numbers cannot be expressed a sum of two or more distinct squares? Well, the answer is not many and 128 is the largest of them. These number form OEIS A001422 :


A001422    Numbers which are not the sum of distinct squares.


The numbers are: 2, 3, 6, 7, 8, 11, 12, 15, 18, 19, 22, 23, 24, 27, 28, 31, 32, 33, 43, 44, 47, 48, 60, 67, 72, 76, 92, 96, 108, 112, 128


This led me on to OEIS A001476 that deals with the same issue but involving cubes. 


A001476    Numbers that are not the sum of distinct positive cubes.


2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 66, 67, 68, 69, 70, 71, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 93,94, 95, 96, 97, 98

These are the initial terms below 100 and the OEIS comments go on to say the following:
There are 85 terms below 100, 793 terms below 1000, but only 2765 terms below 10000, and only 23 more up to the largest term a(2788)=12758.

No comments:

Post a Comment