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!)
A026521 a(n) = T(n, n-1), T given by A026519. Also a(n) = number of integer strings s(0), ..., s(n), counted by T, such that s(n) = 1. 22
1, 1, 4, 6, 19, 33, 98, 180, 526, 990, 2887, 5502, 16073, 30863, 90386, 174456, 512128, 992304, 2918954, 5673140, 16716998, 32571858, 96119927, 187675644, 554524660, 1084649644, 3208254571, 6284986554, 18607536319, 36501029265 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
Veronika Irvine, Stephen Melczer, and Frank Ruskey, Vertically constrained Motzkin-like paths inspired by bobbin lace, arXiv:1804.08725 [math.CO], 2018.
FORMULA
a(n) = A026519(n, n-1).
a(n) = A026537(n+1)/2.
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[(n+1)/2], If[EvenQ[n], T[n-1, k-2] + T[n-1, k], T[n-1, k-1] + T[n-1, k-2] + T[n-1, k]]]]; (* T = A026519 *)
Table[T[n, n-1], {n, 40}] (* G. C. Greubel, Dec 19 2021 *)
PROG
(Sage)
@CachedFunction
def T(n, k): # T = A026552
if (k==0 or k==2*n): return 1
elif (k==1 or k==2*n-1): return (n+1)//2
elif (n%2==0): return T(n-1, k) + T(n-1, k-2)
else: return T(n-1, k) + T(n-1, k-1) + T(n-1, k-2)
[T(n, n-1) for n in (1..40)] # G. C. Greubel, Dec 19 2021
CROSSREFS
Cf. A026537.
Sequence in context: A024874 A095383 A116383 * A343677 A222379 A202618
KEYWORD
nonn
AUTHOR
STATUS
approved

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 April 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)