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.

A109470 Sum of first n noncubes.

This page as a plain text file.
%I A109470 #31 Sep 03 2024 08:26:27
%S A109470 2,5,9,14,20,27,36,46,57,69,82,96,111,127,144,162,181,201,222,244,267,
%T A109470 291,316,342,370,399,429,460,492,525,559,594,630,667,705,744,784,825,
%U A109470 867,910,954,999,1045,1092,1140,1189,1239,1290,1342,1395,1449,1504,1560
%N A109470 Sum of first n noncubes.
%F A109470 a(n) = Sum_{i=1..n} A007412(i).
%F A109470 a(n) = A000217(A007412(n)) - Sum_{i=1..floor((A007412(n)^(1/3)))} i^3.
%F A109470 a(n) = A000217(A007412(n)) - A000217(floor(A007412(n)^(1/3)))^2.
%F A109470 Let R = A007412(n) and S = floor(R^(1/3)); then a(n) = (R*(R+1))/2 - ((S*(S+1))/2)^2. - _Gerald Hillier_, Dec 21 2008
%e A109470 a(6) = 2 + 3 + 4 + 5 + 6 + 7 = 27.
%e A109470 a(7) = 2 + 3 + 4 + 5 + 6 + 7 + 9 = 36.
%t A109470 Accumulate[With[{no=60},Complement[Range[no],Range[Floor[Power[no, (3)^-1]]]^3]]]  (* _Harvey P. Dale_, Feb 14 2011 *)
%o A109470 (Python)
%o A109470 from sympy import integer_nthroot
%o A109470 def A109470(n): return ((m:=n+(k:=integer_nthroot(n,3)[0])+int(n>=(k+1)**3-k))*(m+1)>>1)-((r:=integer_nthroot(m,3)[0])*(r+1)>>1)**2 # _Chai Wah Wu_, Jun 17 2024
%o A109470 (PARI) a(n) = sum(i=1, n, i + sqrtnint(i + sqrtnint(i, 3), 3)); \\ _Michel Marcus_, Jun 20 2024
%Y A109470 Cf. A000537, A007412, A048766, A064524, A086849.
%K A109470 easy,nonn
%O A109470 1,1
%A A109470 _Jonathan Vos Post_, Aug 28 2005