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.

A038521 Number of elements of GF(2^n) with trace 1 and subtrace 1.

Original entry on oeis.org

0, 0, 2, 1, 4, 10, 12, 36, 64, 120, 272, 496, 1024, 2080, 4032, 8256, 16384, 32640, 65792, 130816, 262144, 524800, 1047552, 2098176, 4194304, 8386560, 16781312, 33550336, 67108864, 134225920, 268419072, 536887296, 1073741824, 2147450880, 4295032832, 8589869056
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:=[0,0,2,1]; [m le 4 select I[m] else  2*Self(m-2) + 4*Self(m-3): m in [1..33]]; // Marius A. Burtea, Aug 02 2019
  • Maple
    A038521 := proc(n) local r,a,i ; if n mod 2 = 1 then r := 3 ; else r := 1 ; fi; a :=0 ; for i from r to n by 4 do a := a+binomial(n,i) ; od; a ; end: for n from 0 to 40 do printf("%d,",A038521(n)) ; od: # R. J. Mathar, Oct 20 2008
  • Mathematica
    LinearRecurrence[{0, 2, 4}, {0, 0, 2, 1}, 33] (* Jean-François Alcover, May 08 2023 *)
  • PARI
    concat([0, 0], Vec(x*(2 + x) / ((1 - 2*x)*(1 + 2*x + 2*x^2)) + O(x^35))) \\ Colin Barker, Aug 02 2019
    

Formula

a(n) = C(n, r+0) + C(n, r+4) + C(n, r+8) + ... where r = 3 if n odd, r = 1 if n even.
a(n) = (2^(n-1) - A108520(n-1))/2 if n > 0. - R. J. Mathar, Jan 29 2008
From Colin Barker, Aug 02 2019: (Start)
G.f.: x^2*(2 + x) / ((1 - 2*x)*(1 + 2*x + 2*x^2)).
a(n) = ((-1-i)^(n-2) + (-1+i)^(n-2) + 2^(n-1)) / 2 = 2*A176739(n-2) + A176739(n-3).
a(n) = 2*a(n-2) + 4*a(n-3) for n>3.
(End)

Extensions

Values duplicated A038520 and were replaced by R. J. Mathar, Oct 20 2008
Missing a(0) = 0 inserted by Andrey Zabolotskiy, Nov 12 2024