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!)
A089640 Enumeration of partial sums of 1 + [1,2] + [2,3] + [1,2] + [2,3] + ... 1
1, 1, 1, 1, 3, 4, 4, 6, 11, 15, 18, 27, 43, 59, 78, 115, 172, 239, 330, 480, 698, 980, 1379, 1988, 2856, 4037, 5726, 8211, 11737, 16656, 23700, 33885, 48341, 68749, 97941, 139811, 199316, 283780, 404442, 576879, 822223, 1171318, 1669543, 2380423 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
FORMULA
a(n) = Sum_{k=0..n} C(k, n - floor((3*k + 2)/2)), where C(n, k) is the usual binomial coefficient. - John W. Layman, Jan 06 2004 [corrected by Peter Luschny, Jan 13 2023]
Conjectures from Chai Wah Wu, Jan 13 2023: (Start)
a(n) = a(n-3) + 2*a(n-4) + a(n-5) for n > 5.
G.f.: x*(-x^2 - x - 1)/(x^5 + 2*x^4 + x^3 - 1). (End)
EXAMPLE
a(6)=4 because we have 6 = 1+1+2+2 = 1+2+3 = 1+2+2+1 = 1+1+3+1.
MAPLE
a := n -> add(binomial(k, n - floor((3*k + 2)/2)), k = 0...n);
seq(a(n), n = 1..44); # Peter Luschny, Jan 13 2023
PROG
(PARI) { n=15; v=vector(n); for (i=1, n, v[i]=vector(2^(i-1))); v[1][1]=1; for (i=2, n, k=length(v[i-1]); for (j=1, k, v[i][j]=v[i-1][j]+i%2+1; v[i][j+k]=v[i-1][j]+i%2+2)); c=vector(n); for (i=1, n, for (j=1, 2^(i-1), if (v[i][j]<=n, c[v[i][j]]++))); c }
(PARI) a(n)=sum(k=0, n, binomial(k, n-3*k\2-1)) \\ Ruud H.G. van Tol, Jan 14 2023
(Python)
from sympy import binomial
def A089640(n): return sum(binomial(k, n-1-(3*k>>1)) for k in range(n+1)) # Chai Wah Wu, Jan 14 2023
CROSSREFS
Sequence in context: A280448 A100692 A360724 * A086659 A265887 A345264
KEYWORD
nonn
AUTHOR
Jon Perry, Jan 01 2004
EXTENSIONS
Corrected and extended by John W. Layman, Jan 06 2004
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 14:32 EDT 2024. Contains 371960 sequences. (Running on oeis4.)