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.

Showing 1-2 of 2 results.

A287335 Nonnegative numbers k such that 3*k + 2 is a cube.

Original entry on oeis.org

2, 41, 170, 443, 914, 1637, 2666, 4055, 5858, 8129, 10922, 14291, 18290, 22973, 28394, 34607, 41666, 49625, 58538, 68459, 79442, 91541, 104810, 119303, 135074, 152177, 170666, 190595, 212018, 234989, 259562, 285791, 313730, 343433, 374954, 408347, 443666, 480965
Offset: 1

Views

Author

Bruno Berselli, May 23 2017

Keywords

Comments

Corresponding cubes are listed in A016791.
Primes in the sequence: 2, 41, 443, 1637, 22973, 34607, 91541, 234989, ...

Crossrefs

Subsequence of A047292.
Cf. A244728: nonnegative k such that 3*k is a cube.
Cf. A121628: nonnegative k such that 3*k + 1 is a cube.

Programs

  • Magma
    [9*n^3-9*n^2+3*n-1: n in [1..40]];
  • Mathematica
    Table[9 n^3 - 9 n^2 + 3 n - 1, {n, 0, 40}]
    LinearRecurrence[{4,-6,4,-1},{2,41,170,443},40] (* Harvey P. Dale, Aug 28 2021 *)
  • Maxima
    makelist(9*n^3-9*n^2+3*n-1, n, 1, 40);
    
  • Python
    [9*n**3-9*n**2+3*n-1 for n in range(1,40)]
    
  • Sage
    [9*n^3-9*n^2+3*n-1 for n in (1..40)]
    

Formula

O.g.f.: x*(2 + 33*x + 18*x^2 + x^3)/(1 - x)^4.
E.g.f.: 1 - (1 - 3*x - 18*x^2 - 9*x^3)*exp(x).
a(n) = 9*n^3 - 9*n^2 + 3*n - 1.
a(n) = A131476(3*n-1) = A212069(3*n-1).

A173707 Partial sums of floor(n^3/3).

Original entry on oeis.org

0, 0, 2, 11, 32, 73, 145, 259, 429, 672, 1005, 1448, 2024, 2756, 3670, 4795, 6160, 7797, 9741, 12027, 14693, 17780, 21329, 25384, 29992, 35200, 41058, 47619, 54936, 63065, 72065, 81995, 92917, 104896, 117997, 132288, 147840, 164724, 183014, 202787, 224120, 247093, 271789, 298291, 326685, 357060, 389505, 424112, 460976, 500192, 541858
Offset: 0

Views

Author

Mircea Merca, Nov 25 2010

Keywords

Comments

Partial sums of A131476.

Examples

			a(4) = floor(1/3) + floor(8/3) + floor(27/3) + floor(64/3) = 32.
		

Crossrefs

Cf. A131476.

Programs

  • Magma
    [Floor((n^4+2*n^3+n^2-4*n)/12): n in [0..60]]; // Vincenzo Librandi, May 08 2011
    
  • Maple
    A061347 := proc(n) op(1+(n mod 3),[-2,1,1]) ; end proc:
    A173707 := proc(n) n^4/12+n^3/6+n^2/12-n/3-1/9 ; %+A061347(n+1)/9 ; end proc:
    # program replaced by a structured version by R. J. Mathar, Nov 26 2010
  • Mathematica
    Table[Sum[Floor[k^3/3],{k,0,n}],{n,0,60}] (* G. C. Greubel, Nov 23 2016 *)
    Accumulate[Table[Floor[n^3/3],{n,0,60}]] (* or *) LinearRecurrence[{4,-6,5,-5,6,-4,1},{0,0,2,11,32,73,145},60] (* Harvey P. Dale, May 29 2018 *)
  • PARI
    a(n)=(n^4+2*n^3+n^2-4*n)\12 \\ Charles R Greathouse IV, May 08 2011
    
  • Python
    def A173707(n): return n*(n*(n*(n + 2) + 1) - 4)//12 # Chai Wah Wu, Feb 02 2023
  • Sage
    [floor(n*(n^3 +2*n^2 +n -4)/12) for n in (0..60)] # G. C. Greubel, Jul 02 2019
    

Formula

a(n) = Sum_{k=0..n} floor(k^3/3).
a(n) = round((n^4 + 2*n^3 + n^2 - 4*n)/12).
a(n) = round((n^4 + 2*n^3 + n^2 - 4*n - 2)/12).
a(n) = floor((n^4 + 2*n^3 + n^2 - 4*n)/12).
a(n) = ceiling((n+1)*(n^3 + n^2 - 4)/12).
a(n) = a(n-3) + n^3 - 3*n^2 + 5*n - 4, n > 2.
From R. J. Mathar, Nov 26 2010: (Start)
G.f.: x^2*(2 + 3*x + x^3) / ( (1+x+x^2)*(1-x)^5 ).
a(n) = n^4/12 + n^3/6 + n^2/12 - n/3 - 1/9 + A061347(n+1)/9. (End)
Showing 1-2 of 2 results.