cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A099254 Self-convolution of A010892. The g.f. is 1/(Alexander polynomial of granny knot).

This page as a plain text file.
%I A099254 #70 May 10 2025 03:13:32
%S A099254 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,
%T A099254 9,-10,-20,-10,11,22,11,-12,-24,-12,13,26,13,-14,-28,-14,15,30,15,-16,
%U A099254 -32,-16,17,34,17,-18,-36,-18,19,38,19,-20,-40,-20,21,42,21
%N A099254 Self-convolution of A010892. The g.f. is 1/(Alexander polynomial of granny knot).
%C A099254 A granny knot sequence.
%C A099254 INVERTi transform of A077855: (1, 3, 6, 11, 20, 36, 64, 133, ...). - _Gary W. Adamson_, Jan 13 2017
%H A099254 A.H.M. Smeets, <a href="/A099254/b099254.txt">Table of n, a(n) for n = 0..20000</a>
%H A099254 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,-3,2,-1).
%F A099254 G.f.: 1/(1 - 2*x + 3*x^2 - 2*x^3 + x^4) = 1/(1 - x + x^2)^2.
%F A099254 a(n) = 4*sqrt(3)*sin(Pi*n/3 + Pi/3)/9 + 2*(n + 1)*sin(Pi*n/3 + Pi/6)/3.
%F A099254 a(n) = Sum_{k=0..floor(n/2)} binomial(n-k,k)*(n-k+1)*(-1)^k. - _Paul Barry_, Nov 12 2004
%F A099254 a(n) = 2*cos(2*Pi*(n + 2)/3)*(floor(n/3) + 1)*(-1)^(n+1). - _Tani Akinari_, Jul 01 2013
%F A099254 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
%F A099254 From _A.H.M. Smeets_, Sep 13 2018: (Start)
%F A099254 a(n) = 2*a(n-1) - 3*a(n-2) + 2*a(n-3) - a(n-4) for n >= 4.
%F A099254 a(3*k) = a(3*k+2) = (-1)^k*(k + 1) for k >= 0.
%F A099254 a(3*k+1) = -(-1)^k*2*(k + 1) for k >= 0. (End)
%F A099254 Sum_{n>=0} 1/a(n) = 5*log(2)/2. - _Amiram Eldar_, May 10 2025
%p A099254 A099254 := proc(n)
%p A099254     option remember ;
%p A099254     if n <= 3 then
%p A099254         op(n+1,[1,2,1,-2]) ;
%p A099254     else
%p A099254         2*procname(n-1)-3*procname(n-2)+2*procname(n-3)-procname(n-4) ;
%p A099254     end if;
%p A099254 end proc:
%p A099254 seq(A099254(n),n=0..80) ; # _R. J. Mathar_, Jul 08 2022
%t A099254 LinearRecurrence[{2, -3, 2, -1}, {1, 2, 1, -2}, 100] (* _Jean-François Alcover_, Sep 21 2022 *)
%o A099254 (Python)
%o A099254 a0,a1,a2,a3,n = -2,1,2,1,3
%o A099254 print(0,a3)
%o A099254 print(1,a2)
%o A099254 print(2,a1)
%o A099254 print(3,a0)
%o A099254 while n < 20000:
%o A099254     a0,a1,a2,a3,n = 2*a0-3*a1+2*a2-a3,a0,a1,a2,n+1
%o A099254     print(n,a0) # _A.H.M. Smeets_, Sep 13 2018
%o A099254 (Python)
%o A099254 def A099254(n):
%o A099254     a, b = divmod(n,3)
%o A099254     return (1+(b&1))*(-a-1 if a&1 else a+1) # _Chai Wah Wu_, Jan 31 2023
%Y A099254 Row sums of array A128502.
%Y A099254 Cf. A077855, A076118 (first differences).
%K A099254 sign,easy
%O A099254 0,2
%A A099254 _Paul Barry_, Oct 08 2004