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!)
A026557 a(n) = T(n, n-4), T given by A026552. Also a(n) = number of integer strings s(0),...,s(n) counted by T, such that s(n)=4. 18
1, 3, 12, 28, 93, 201, 631, 1316, 4037, 8259, 25052, 50680, 152782, 306958, 921982, 1844304, 5526849, 11024331, 32987492, 65675764, 196323853, 390374193, 1166171943, 2316881892, 6918228187, 13737041045, 41007165500 (list; graph; refs; listen; history; text; internal format)
OFFSET
4,2
LINKS
FORMULA
a(n) = A026552(n, n-4).
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[(n+2)/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=A026552 *)
Table[T[n, n-4], {n, 4, 40}] (* G. C. Greubel, Dec 17 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+2)//2
elif (n%2==0): return T(n-1, k) + T(n-1, k-1) + T(n-1, k-2)
else: return T(n-1, k) + T(n-1, k-2)
[T(n, n-4) for n in (4..40)] # G. C. Greubel, Dec 17 2021
CROSSREFS
Sequence in context: A005995 A351643 A034503 * A124052 A215640 A104353
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 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)