OFFSET
0,2
COMMENTS
The line is never horizontal, but slopes down: For any n >= 0, a(n) is the sum of all C(m,p) where (m,p) are the integer points of the line going through (2,0) and (3+n,3+n). It does not matter whether the triangle is written with left-aligned or centered lines. - M. F. Hasler, Oct 12 2018
It might have been more natural to start with a horizontal line for n=0 (which would have prefixed a 3 to the sequence), or even, to start with the line going through (0,0), resulting in (2, 1, 3, 1, 4, ...). - M. F. Hasler, Oct 13 2018
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..10000
N. J. A. Sloane, Illustration of initial terms
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
FORMULA
For all n >= 0: a(2n) = 1, a(2n+1) = n + 4.
G.f.: ( 1+4*x-x^2-3*x^3 ) / ( (x-1)^2*(1+x)^2 ). - R. J. Mathar, Oct 15 2018
MATHEMATICA
Riffle[Range[4, 50], 1, {1, -2, 2}] (* Paolo Xausa, Sep 21 2024 *)
PROG
(PARI) a(n, k=2)=sum(i=1, n+=1, if((n+k)*i%n==0, binomial(k+i, i*(n+k)/n))) \\ For illustration. - M. F. Hasler, Oct 13 2018
(PARI) A019303(n)=if(bittest(n, 0), n\2+4, 1) \\ M. F. Hasler, Oct 13 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from David W. Wilson
STATUS
approved