login
A019303
"Pascal sweep" for k=2: draw a horizontal line through the 1 at C(k,0) in Pascal's triangle; rotate this line and record the sum of the numbers on it (excluding the initial 1).
1
1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1, 12, 1, 13, 1, 14, 1, 15, 1, 16, 1, 17, 1, 18, 1, 19, 1, 20, 1, 21, 1, 22, 1, 23, 1, 24, 1, 25, 1, 26, 1, 27, 1, 28, 1, 29, 1, 30, 1, 31, 1, 32, 1, 33, 1, 34, 1, 35, 1, 36, 1, 37, 1, 38, 1, 39, 1, 40, 1, 41, 1, 42, 1, 43, 1, 44, 1, 45, 1, 46, 1
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
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
Sequence in context: A046785 A060044 A323413 * A339967 A357311 A373364
KEYWORD
nonn,easy
EXTENSIONS
More terms from David W. Wilson
STATUS
approved