OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
Let n=10. The sum of the noncube numbers <= 10 is 2+3+4+5+6+7+9+10 = 46, the 10th entry in the sequence.
MATHEMATICA
Accumulate[Table[If[IntegerQ[n^(1/3)], 0, n], {n, 60}]] (* Harvey P. Dale, Oct 16 2012 *)
PROG
(PARI) g(n)=for(x=1, n, r=floor(x^(1/3)); sumcu=(r*(r+1)/2)^2; sn=x*(x+1)/2; print1(sn-sumcu", "))
(Python)
from sympy import integer_nthroot
def A132296(n): return n*(n+1)-(((r:=integer_nthroot(n, 3)[0])*(r+1))**2>>1)>>1 # Chai Wah Wu, Sep 03 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Nov 07 2007
STATUS
approved