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.

A211520 Number of ordered triples (w,x,y) with all terms in {1,...,n} and w + 4y = 2x.

Original entry on oeis.org

0, 0, 0, 1, 2, 3, 5, 7, 10, 12, 16, 19, 24, 27, 33, 37, 44, 48, 56, 61, 70, 75, 85, 91, 102, 108, 120, 127, 140, 147, 161, 169, 184, 192, 208, 217, 234, 243, 261, 271, 290, 300, 320, 331, 352, 363, 385, 397, 420, 432, 456, 469, 494, 507, 533, 547, 574
Offset: 0

Views

Author

Clark Kimberling, Apr 14 2012

Keywords

Comments

For a guide to related sequences, see A211422.

Crossrefs

Programs

  • Haskell
    a211520 n = a211520_list !! n
    a211520_list = 0 : 0 : 0 : scanl1 (+) a178804_list
    -- Reinhard Zumkeller, Nov 15 2014
    
  • Maple
    seq(floor((n-1)^2/4)-floor((n-1)/4)*floor((n+1)/4), n=0..60); # Ridouane Oudra, Nov 21 2024
  • Mathematica
    t[n_] := t[n] = Flatten[Table[w - 2 x + 4 y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 70}]  (* this sequence *)
    FindLinearRecurrence[t]
    LinearRecurrence[{1,1,-1,1,-1,-1,1},{0,0,0,1,2,3,5},57] (* Ray Chandler, Aug 02 2015 *)
  • PARI
    { my(x='x+O('x^66)); concat([0,0,0],Vec( x^3*(1+x+x^3) / ( (1-x)^3*(1+x)^2*(1+x^2) ) ) ) } \\ Joerg Arndt, Apr 02 2017

Formula

a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) - a(n-6) + a(n-7).
a(n) - a(n-1) = A178804(n-2). - Reinhard Zumkeller, Nov 15 2014
a(n) = (6*n^2-10*n+3+(2*n-7)*(-1)^n-4*(-1)^((2*n-3-(-1)^n)/4))/32. - Luce ETIENNE, Dec 31 2015
a(n) = Sum_{k=1..floor(n/2)} floor((n-k)/2). - Wesley Ivan Hurt, Apr 01 2017
G.f.: x^3 * (1+x+x^3) / ( (1-x)^3*(1+x)^2*(1+x^2) ). - Joerg Arndt, Apr 02 2017
a(n)+a(n-1) = A282513(n-2). - R. J. Mathar, Jun 23 2021
a(n) = floor((n-1)^2/4) - floor((n-1)/4)*floor((n+1)/4). - Ridouane Oudra, Nov 21 2024