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.

A191697 a(n) = r1^n + r2^n + r3^n where r1, r2, r3 are the three roots of x^3 - 2*x - 2 = 0.

Original entry on oeis.org

0, 4, 6, 8, 20, 28, 56, 96, 168, 304, 528, 944, 1664, 2944, 5216, 9216, 16320, 28864, 51072, 90368, 159872, 282880, 500480, 885504, 1566720, 2771968, 4904448, 8677376, 15352832, 27163648, 48060416, 85032960, 150448128, 266186752, 470962176, 833269760
Offset: 1

Views

Author

N. J. A. Sloane, Jun 19 2011

Keywords

Comments

Definition 1.1 defines F_3^n as a Boolean function and definition 1.3 defines the Fourier transform of a Boolean function. - Michael Somos, Aug 04 2012

Examples

			G.f. = 4*x^2 + 6*x^3 + 8*x^4 + 20*x^5 + 28*x^6 + 56*x^7 + 96*x^8 + 168*x^9 + ...
		

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(2*x^2*(2+3*x)/(1-2*x^2-2*x^3))); // G. C. Greubel, Aug 13 2018
    
  • Magma
    I:=[0,4,6]; [n le 3 select I[n] else 2*Self(n-2)+2*Self(n-3): n in [1..50]]; // Vincenzo Librandi, Aug 14 2018
  • Mathematica
    Rest[CoefficientList[Series[2*x^2*(2+3*x)/(1-2*x^2-2*x^3), {x, 0, 50}], x]] (* G. C. Greubel, Aug 13 2018 *)
    LinearRecurrence[{0, 2, 2}, {0, 4, 6}, 40] (* Vincenzo Librandi, Aug 14 2018 *)
  • PARI
    {a(n) = if( n<1, 0, polsym( x^3 - 2*x - 2, n)[n + 1])}; /* Michael Somos, Aug 04 2012 */
    
  • PARI
    {a(n) = if( n<1, 0, sum( x=0, 2^n-1, (-1)^sum( i=0, n-1, bittest(x, i) * bittest(x, (i+1)%n) * bittest(x, (i+2)%n))))}; /* Michael Somos, Aug 04 2012 */
    

Formula

a(n) = hat{F_3^n}(0), the Fourier transform evaluated at 0 of the Boolean function F_3^n defined by F_3^n(x_0, ..., x_{n-1}) = Sum_{ 0Michael Somos, Aug 04 2012
From Michael Somos, Aug 04 2012: (Start)
G.f.: 2 * x^2 * (2 + 3*x) / (1 - 2*x^2 - 2*x^3).
a(n + 3) = 2*a(n + 1) + 2*a(n). (End)
a(n) = 4*A052907(n) +6*A052907(n-1). - R. J. Mathar, Aug 10 2012