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.

A201053 Nearest cube.

Original entry on oeis.org

0, 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 28 2011

Keywords

Comments

a(n) = if n-A048763(n) < A048762(n)-n then A048762(n) else A048763(n);
apart from 0, k^3 occurs 3*n^2+1 times, cf. A056107.

Crossrefs

Cf. A061023, A074989, A053187 (nearest square), A000578.

Programs

  • Haskell
    a201053 n = a201053_list !! n
    a201053_list = 0 : concatMap (\x -> replicate (a056107 x) (x ^ 3)) [1..]
    
  • Maple
    seq(k^3 $ (3*k^2+1), k=0..10); # Robert Israel, Jan 03 2017
  • Mathematica
    Module[{nn=70,c},c=Range[0,Ceiling[Surd[nn,3]]]^3;Flatten[Array[ Nearest[ c,#]&,nn,0]]] (* Harvey P. Dale, May 27 2014 *)
  • Python
    from sympy import integer_nthroot
    def A201053(n):
        a = integer_nthroot(n,3)[0]
        return a**3 if 2*n < a**3+(a+1)**3 else (a+1)**3 # Chai Wah Wu, Mar 31 2021

Formula

G.f.: (1-x)^(-1)*Sum_{k>=0} (3*k^2+3*k+1)*x^((k+1)*(k^2+k/2+1)). - Robert Israel, Jan 03 2017
Sum_{n>=1} 1/a(n)^2 = Pi^4/30 + Pi^6/945. - Amiram Eldar, Aug 15 2022