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.

A211519 Number of ordered triples (w,x,y) with all terms in {1,...,n} and w=2x-3y.

Original entry on oeis.org

0, 1, 2, 3, 6, 8, 11, 15, 19, 23, 29, 34, 40, 47, 54, 61, 70, 78, 87, 97, 107, 117, 129, 140, 152, 165, 178, 191, 206, 220, 235, 251, 267, 283, 301, 318, 336, 355, 374, 393, 414, 434, 455, 477, 499, 521, 545, 568, 592, 617, 642, 667, 694, 720, 747, 775
Offset: 1

Views

Author

Clark Kimberling, Apr 14 2012

Keywords

Comments

For a guide to related sequences, see A211422.

Examples

			For n = 4, 1 = 2*2-3*1, 2 = 2*4-3*2 and 3 = 2*3-3*1, so (1,2,1), (2,4,2) and (3,3,1) are solutions and a(4) = 3. - _Bernard Schott_, Jan 27 2020
		

Crossrefs

Cf. A211422.

Programs

  • Magma
    [ #[:w, x, y in [1..n]|w eq 2*x-3*y]: n in [1..56]]; // Marius A. Burtea, Jan 26 2020
    
  • Magma
    R:=PowerSeriesRing(Integers(), 56); [0] cat Coefficients(R!(x^2*(1+x+x^3) / ((1-x)^3*(1+x)*(1+x+x^2)))); // Marius A. Burtea, Jan 26 2020
  • Mathematica
    t[n_] := t[n] = Flatten[Table[w - 2 x + 3 y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 1, 80}]  (* A211519 *)
    FindLinearRecurrence[t]
    LinearRecurrence[{1,1,0,-1,-1,1},{0,1,2,3,6,8},56] (* Ray Chandler, Aug 02 2015 *)
  • PARI
    concat(0, Vec(x*(1 + x + x^3) / ((1 - x)^3*(1 + x)*(1 + x + x^2)) + O(x^60))) \\ Colin Barker, Dec 02 2017
    
  • PARI
    a(n)=(n-1)^2\4 + (n+1)\3 \\ Charles R Greathouse IV, Jun 12 2020
    

Formula

a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6).
G.f.: x^2*(1 + x + x^3) / ((1 - x)^3*(1 + x)*(1 + x + x^2)). - Colin Barker, Dec 02 2017
a(n) = floor(((n-1)^2)/4) + floor((n-2)/3) + 1. - Ridouane Oudra, Jun 12 2020
a(n) = A001399(n-2)+A001399(n-3)+A001399(n-5). - R. J. Mathar, Jun 23 2021~

Extensions

Name and offset corrected by Pontus von Brömssen, Jan 26 2020