login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A213041 Number of (w,x,y) with all terms in {0..n} and 2|w-x| = max(w,x,y)-min(w,x,y). 2
1, 2, 7, 12, 21, 30, 43, 56, 73, 90, 111, 132, 157, 182, 211, 240, 273, 306, 343, 380, 421, 462, 507, 552, 601, 650, 703, 756, 813, 870, 931, 992, 1057, 1122, 1191, 1260, 1333, 1406, 1483, 1560, 1641, 1722, 1807, 1892, 1981, 2070, 2163, 2256 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

See A212959 for a guide to related sequences.

LINKS

Table of n, a(n) for n=0..47.

Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).

FORMULA

a(n) = 2*a(n-1)-2*a(n-3)+a(n-4) for n>3.

G.f.: (1 + 3*x^2)/((1 - x)^3 * (1 + x)).

a(n) = (n+1)^2 - 2*A004526(n-1) - 2. - Wesley Ivan Hurt, Jul 15 2013

a(n) = A002620(n+2) + 3*A002620(n). - R. J. Mathar, Jul 15 2013

a(n)+a(n+1) = A058331(n+1). - R. J. Mathar, Jul 15 2013

a(n) = n*(n+1)+(1+(-1)^n)/2. - Wesley Ivan Hurt, May 06 2016

E.g.f.: x*(x + 2)*exp(x) + cosh(x). - Ilya Gutkovskiy, May 06 2016

MATHEMATICA

t = Compile[{{n, _Integer}}, Module[{s = 0},

(Do[If[Max[w, x, y] - Min[w, x, y] == 2 Abs[w - x],

s = s + 1],

{w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];

m = Map[t[#] &, Range[0, 45]]   (* A213041 *)

PROG

(PARI) Vec((1+3*x^2)/((1-x)^3*(1+x)) + O(x^99)) \\ Altug Alkan, May 06 2016

CROSSREFS

Cf. A002620, A004526, A058331, A212959, A168277 (first differences).

Sequence in context: A023669 A137401 A119713 * A135541 A288656 A180804

Adjacent sequences:  A213038 A213039 A213040 * A213042 A213043 A213044

KEYWORD

nonn,easy

AUTHOR

Clark Kimberling, Jun 10 2012

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified December 13 17:30 EST 2017. Contains 295959 sequences.