OFFSET
1,2
COMMENTS
A self dual binary linear code is either Type I (singly even) or Type II (doubly even). A self dual binary linear code can only be Type II if the length of the code (2n) is a multiple of 8. The total number self dual binary linear codes (including equivalent codes) is equal to the number of Type I self dual binary linear codes (including equivalent codes) when the length (2n) is not a multiple of 8. If the length is a multiple of 8 ( 2n =0 mod 8 ) then the total number of Type I codes is the number of type II codes subtracted from the total number of self dual codes of length 2n.
REFERENCES
W. Cary Huffman and Vera Pless, Fundamentals of Error Correcting Codes, 2003, Page 366.
F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier/North Holland, 1977.
LINKS
Nathan J. Russell, Table of n, a(n) for n = 1..49
G. Nebe, E. M. Rains and N. J. A. Sloane, Self-Dual Codes and Invariant Theory, Springer, Berlin, 2006.
P. Gaborit, Tables of Self-Dual Codes
FORMULA
From Nathan J. Russell, Mar 01 2016: (Start)
If 2n = 0 MOD 8 then a(n) = prod_(2^i+1, i=1,...,n-1) - prod_(2^i+1, i=0,...,n-2);
If 2n != 0 MOD 8 then a(n) = prod_(2^i+1, i=1,...,n-1).
If 2n != 0 MOD 8 then a(n) = A028362(n).
(End)
MATHEMATICA
Table[
If[Mod[2 n, 8] == 0,
Product[2^i + 1, {i, 1, n - 1}] - Product[2^i + 1, {i, 0, n - 2}] ,
Product[2^i + 1, {i, 1, n - 1}]],
{n, 1, 10}] (* Nathan J. Russell, Mar 01 2016 *)
PROG
(Python)
for n in range(1, 10):
product1 = 1
for i in range(1, n-1 + 1):
product1 *= (2**i+1)
if (2*n)%8 == 0:
product2 = 1
for i in range(n-2 + 1):
product2 *= (2**i+1)
print(product1 - product2)
else:
print(product1)
(PARI) a(n) = if (2*n%8==0, prod(i=1, n-1, 2^i+1)-prod(i=0, n-2, 2^i+1), prod(i=1, n-1, 2^i+1))
vector(20, n, a(n)) \\ Colin Barker, Feb 28 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Nathan J. Russell, Feb 27 2016
EXTENSIONS
a(20) corrected by Andrew Howroyd, Feb 22 2018
STATUS
approved