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!)
A099254 Self-convolution of A010892. The g.f. is 1/(Alexander polynomial of granny knot). 24
1, 2, 1, -2, -4, -2, 3, 6, 3, -4, -8, -4, 5, 10, 5, -6, -12, -6, 7, 14, 7, -8, -16, -8, 9, 18, 9, -10, -20, -10, 11, 22, 11, -12, -24, -12, 13, 26, 13, -14, -28, -14, 15, 30, 15, -16, -32, -16, 17, 34, 17, -18, -36, -18, 19, 38, 19, -20, -40, -20, 21, 42, 21 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
A granny knot sequence.
INVERTi transform of A077855: (1, 3, 6, 11, 20, 36, 64, 133, ...). - Gary W. Adamson, Jan 13 2017
LINKS
FORMULA
G.f.: 1/(1 - 2*x + 3*x^2 - 2*x^3 + x^4) = 1/(1 - x + x^2)^2.
a(n) = 4*sqrt(3)*sin(Pi*n/3 + Pi/3)/9 + 2*(n + 1)*sin(Pi*n/3 + Pi/6)/3.
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k,k)*(n-k+1)*(-1)^k. - Paul Barry, Nov 12 2004
a(n) = 2*cos(2*Pi*(n + 2)/3)*(floor(n/3) + 1)*(-1)^(n+1). - Tani Akinari, Jul 01 2013
a(n) = (1/54)*(18*(n + 2)*(-1)^floor(n/3) + (3*n + 11)*(-1)^floor((n + 1)/3) - 9*(n + 1)*(-1)^floor((n + 2)/3) - 2*(3*n + 8)*(-1)^floor((n + 4)/3)). - John M. Campbell, Dec 23 2016
From A.H.M. Smeets, Sep 13 2018: (Start)
a(n) = 2*a(n-1) - 3*a(n-2) + 2*a(n-3) - a(n-4) for n >= 4.
a(3*k) = a(3*k+2) = (-1)^k*(k + 1) for k >= 0.
a(3*k+1) = -(-1)^k*2*(k + 1) for k >= 0. (End)
MAPLE
A099254 := proc(n)
option remember ;
if n <= 3 then
op(n+1, [1, 2, 1, -2]) ;
else
2*procname(n-1)-3*procname(n-2)+2*procname(n-3)-procname(n-4) ;
end if;
end proc:
seq(A099254(n), n=0..80) ; # R. J. Mathar, Jul 08 2022
MATHEMATICA
LinearRecurrence[{2, -3, 2, -1}, {1, 2, 1, -2}, 100] (* Jean-François Alcover, Sep 21 2022 *)
PROG
(Python)
a0, a1, a2, a3, n = -2, 1, 2, 1, 3
print(0, a3)
print(1, a2)
print(2, a1)
print(3, a0)
while n < 20000:
a0, a1, a2, a3, n = 2*a0-3*a1+2*a2-a3, a0, a1, a2, n+1
print(n, a0) # A.H.M. Smeets, Sep 13 2018
(Python)
def A099254(n):
a, b = divmod(n, 3)
return (1+(b&1))*(-a-1 if a&1 else a+1) # Chai Wah Wu, Jan 31 2023
CROSSREFS
Row sums of array A128502.
Cf. A077855, A076118 (first differences).
Sequence in context: A119538 A068309 A099470 * A186731 A180108 A300417
KEYWORD
sign,easy
AUTHOR
Paul Barry, Oct 08 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 19 14:10 EDT 2024. Contains 371792 sequences. (Running on oeis4.)