close
login
A392126
The smallest k >= 0 that can be represented as a linear combination of 1^3, 2^3, ..., n^3 with coefficients +-1 and that cannot be represented using 1^3, 2^3, ..., m^3 with 1<=m<n.
2
1, 7, 18, 28, 25, 45, 26, 4, 5, 15, 12, 0, 3, 13, 8, 24, 83, 4463, 6932, 10710, 9269, 27845, 30410, 50660, 47853, 80109, 64610, 117368, 104237, 163709, 139880, 220500, 190709, 289205, 253268, 371384, 328509, 468693, 418040, 582884, 523565, 715805, 646884, 869400
OFFSET
1,2
COMMENTS
a(n) is the smallest k >= 0 such that A392025(k) = n.
EXAMPLE
a(1) = 1: 1^3 = 1.
a(2) = 7: -1^3 + 2^3 = 7.
a(12) = 0: 1^3 + 2^3 - 3^3 + 4^3 - 5^3 - 6^3 - 7^3 + 8^3 + 9^3 - 10^3 - 11^3 + 12^3 = 0.
MAPLE
b:= proc(n, i) option remember; (m-> n<=m and (n=m or
b(abs(n-i^3), i-1) or b(n+i^3, i-1)))((i*(i+1)/2)^2)
end:
g:= proc(n) option remember; local k; for k while not b(n, k) do od; k end:
a:= proc(n) option remember; local k; for k from 0 while not g(k)=n do od; k end:
seq(a(n), n=1..30);
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Dec 30 2025
STATUS
approved