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!)
A026541 a(n) = T(n,n-4), T given by A026536. Also a(n) = number of integer strings s(0), ..., s(n), counted by T, such that s(n) = 4. 2
1, 2, 9, 19, 65, 136, 430, 886, 2721, 5538, 16793, 33887, 102102, 204856, 615024, 1229280, 3682545, 7341786, 21963161, 43712603, 130648089, 259726104, 775797750, 1541084142, 4601346295, 9135694750, 27270124455, 54125522793 (list; graph; refs; listen; history; text; internal format)
OFFSET
4,2
LINKS
FORMULA
a(n) = A026536(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], If[EvenQ[n], T[n-1, k-2] +T[n-1, k-1] +T[n-1, k], T[n-1, k-2] +T[n-1, k]] ]];
Table[T[n, n-4], {n, 4, 45}] (* G. C. Greubel, Apr 11 2022 *)
PROG
(SageMath)
@CachedFunction
def T(n, k): # A026536
if k < 0 or n < 0: return 0
elif k == 0 or k == 2*n: return 1
elif k == 1 or k == 2*n-1: return n//2
elif n % 2 == 1: return T(n-1, k-2) + T(n-1, k)
return T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)
def A026541(n): return T(n, n-4)
[A026541(n) for n in (4..45)] # G. C. Greubel, Apr 11 2022
CROSSREFS
Cf. A026536.
Sequence in context: A135207 A274853 A264670 * A038249 A116014 A090939
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 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)