login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A211521 Number of ordered triples (w,x,y) with all terms in {1,...,n} and w + 2x = 4y. 3

%I #34 Sep 08 2022 08:46:02

%S 0,0,1,2,4,5,9,11,16,18,25,28,36,39,49,53,64,68,81,86,100,105,121,127,

%T 144,150,169,176,196,203,225,233,256,264,289,298,324,333,361,371,400,

%U 410,441,452,484,495,529,541,576,588,625,638,676,689,729,743

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

%C For a guide to related sequences, see A211422.

%C Also, number of ordered pairs (w,x) with both terms in {1,...,n} and w+2x divisible by 4. - _Pontus von Brömssen_, Jan 19 2020

%H Colin Barker, <a href="/A211521/b211521.txt">Table of n, a(n) for n = 0..999</a>

%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1,1,-1,-1,1).

%F a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) - a(n-6) + a(n-7).

%F a(n) = (2*n^2-n+1+(n-1)*(-1)^n+(-1)^((2*n+1-(-1)^n)/4)-(-1)^((6*n+1-(-1)^n)/4))/8. - _Luce ETIENNE_, Dec 31 2015

%F G.f.: x^2*(1 + x + x^2 + x^4) / ((1 - x)^3*(1 + x)^2*(1 + x^2)). - _Colin Barker_, Dec 02 2017

%t t[n_] := t[n] = Flatten[Table[w + 2 x - 4 y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]

%t c[n_] := Count[t[n], 0]

%t t = Table[c[n], {n, 0, 70}] (* A211521 *)

%t FindLinearRecurrence[t]

%t LinearRecurrence[{1,1,-1,1,-1,-1,1},{0,0,1,2,4,5,9},56] (* _Ray Chandler_, Aug 02 2015 *)

%o (PARI) concat(vector(2), Vec(x^2*(1 + x + x^2 + x^4) / ((1 - x)^3*(1 + x)^2*(1 + x^2)) + O(x^40))) \\ _Colin Barker_, Dec 02 2017

%o (Magma) a:=[0]; for n in [1..55] do m:=0; for i, j in [1..n] do if (i+2*j) mod 4 eq 0 then m:=m+1; end if; end for; Append(~a, m); end for; a; // _Marius A. Burtea_, Jan 19 2020

%o (Magma) R<x>:=PowerSeriesRing(Integers(), 57); [0,0] cat Coefficients(R!( x^3*(1 + x + x^2 + x^4) / ((1 - x)^3*(1 + x)^2*(1 + x^2)))); // _Marius A. Burtea_, Jan 19 2020

%Y Cf. A211422.

%K nonn,easy

%O 0,4

%A _Clark Kimberling_, Apr 14 2012

%E Offset corrected by _Pontus von Brömssen_, Jan 19 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 17:25 EDT 2024. Contains 371254 sequences. (Running on oeis4.)