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.

A261225 n minus the number of positive cubes needed to sum to n using the greedy algorithm: a(n) = n - A055401(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 14, 14, 14, 21, 21, 21, 26, 26, 26, 26, 26, 26, 26, 26, 33, 33, 33, 33, 33, 33, 33, 33, 40, 40, 40, 40, 40, 40, 40, 40, 47, 47, 47, 52, 52, 52, 52, 52, 52, 52, 52, 59, 59, 63, 63, 63, 63, 63, 63, 63, 63, 70, 70, 70, 70, 70, 70, 70, 70, 77, 77, 77, 77, 77, 77, 77, 77, 84, 84, 84, 89
Offset: 0

Views

Author

Antti Karttunen, Aug 16 2015

Keywords

Examples

			a(8) = 7, because when the greedy algorithm partitions 8 into cubes, it first finds 8 (= 2*2*2), thus A055401(8) = 1, and 8-1 = 7.
		

Crossrefs

Formula

a(n) = n - A055401(n).
As a recurrence:
a(0) = 0; for n >= 1, a(n) = -1 + A048762(n) + a(n-A048762(n)). [Where A048762(n) gives the largest cube <= n.]