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.

A104767 a(n)=n for n <= 3, a(n) = 2a(n-1) - 2a(n-2) + 2a(n-3) for n >= 4.

This page as a plain text file.
%I A104767 #47 Nov 30 2021 15:14:12
%S A104767 0,1,2,3,4,6,10,16,24,36,56,88,136,208,320,496,768,1184,1824,2816,
%T A104767 4352,6720,10368,16000,24704,38144,58880,90880,140288,216576,334336,
%U A104767 516096,796672,1229824,1898496,2930688,4524032,6983680,10780672,16642048,25690112,39657472
%N A104767 a(n)=n for n <= 3, a(n) = 2a(n-1) - 2a(n-2) + 2a(n-3) for n >= 4.
%C A104767 Also a(n) for n > 0 is the number of terms in the expansion of (x - y) * (x - y) * (x^2 - y^2) * (x^3 - y^3) * ... * (x^F_n-1 - y^F_n-1), where F_n is the n-th Fibonacci number. In this definition one can take y=1. In other words the sequence gives the number of nonzero terms in the polynomial Product {k=1..n-1}, (1 - x^F_k). - _Robert G. Wilson v_, May 12 2013
%C A104767 Also a(n) for n > 0 is the number of terms in the expansion of Product_{k=2..n+1} (x^F_k - y^F_k) with coefficient +1 (same with -1). We can take y=1 and the Product_{k=2..n+1} (x^F_k - 1) has a(n) terms with coefficient +1 and same with -1. Note that no coefficient is greater than 1 in absolute value. - _Michael Somos_, May 17 2018
%H A104767 Muniru A Asiru, <a href="/A104767/b104767.txt">Table of n, a(n) for n = 0..1000</a>
%H A104767 Richard P. Stanley, <a href="https://arxiv.org/abs/2101.02131">Theorems and Conjectures on Some Rational Generating Functions</a>, arXiv:2101.02131 [math.CO], 2021.
%H A104767 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,2).
%F A104767 a(n) = n for n <= 4; for n >= 5, a(n) = 2a(n-4) + a(n-1).
%F A104767 G.f.: (x + x^3)/(-2*x^3 + 2*x^2 - 2*x + 1). a(n) = A077943(n-3) + A077943(n-1).
%e A104767 From _Michael Somos_, May 17 2018: (Start)
%e A104767 For n=3, (x - y) * (x - y) = x^2 - 2*x*y + y^2 has a(3) = 3 terms.
%e A104767 For n=4, (x - y) * (x - y) * (x^2 - y^2) = x^4 - 2*x^3*y + 2*x*y^3 - y^4 has a(4) = 4 terms.
%e A104767 for n=2, (x - y) * (x^2 - y^2) = x^3 - x^2*y - x*y^2 + y^3 has a(2) = 2 terms with + sign and also with - sign.
%e A104767 For n=3, (x - y) * (x^2 - y^2) * (x^3 - y^3) = x^6 - x^5*y - x^4*y^2 + x^2*y^4 + x*y^5 - y^6 has a(3) = 3 terms with + sign and also with - sign. (End)
%p A104767 f:=proc(n) option remember; if n <= 4 then RETURN(n); fi; 2*f(n-4)+f(n-1); end;
%t A104767 a[n_] := a[n] = If[n < 4, n, 2a[n - 1] - 2a[n - 2] + 2a[n - 3]]; Table[ a[n], {n, 0, 39}] (* _Robert G. Wilson v_ *)
%t A104767 Join[{0}, LinearRecurrence[{2, -2, 2}, {1, 2, 3}, 41]] (* _Robert G. Wilson v_, May 12 2013 *)
%t A104767 Join[{0}, LinearRecurrence[{1, 0, 0, 2}, {1, 2, 3, 4}, 41]] (* _Robert G. Wilson v_, May 12 2013 *)
%t A104767 a[n_] := Length@ ExpandAll@ Product[1 - x^Fibonacci[k], {k, n-1}]; a[1] = 1; (* _Robert G. Wilson v_, May 12 2013 *)
%t A104767 nxt[{a_,b_,c_}]:={b,c,2c-2b+2a}; Join[{0},NestList[nxt,{1,2,3},40][[All,1]]] (* _Harvey P. Dale_, Nov 30 2021 *)
%o A104767 (GAP) a:=[0,1,2,3,4];; for n in [5..50] do a[n]:=2*a[n-1]-2*a[n-2]+2*a[n-3]; od; a; # _Muniru A Asiru_, May 17 2018
%o A104767 (PARI) a=vector(100); a[1]=1;a[2]=2;a[3]=3; for(n=4, #a, a[n] = 2*a[n-1]-2*a[n-2]+2*a[n-3]); concat(0,a) \\ _Altug Alkan_, May 18 2018
%Y A104767 Cf. A093996.
%K A104767 nonn
%O A104767 0,3
%A A104767 _Don N. Page_, Oct 13 2005
%E A104767 More terms from _Robert G. Wilson v_, Oct 14 2005