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.

A054247 Number of n X n binary matrices under action of dihedral group of the square D_4.

Original entry on oeis.org

1, 2, 6, 102, 8548, 4211744, 8590557312, 70368882591744, 2305843028004192256, 302231454921524358152192, 158456325028538104598816096256, 332306998946229005407670289177772032, 2787593149816327892769293535238052808491008
Offset: 0

Views

Author

Vladeta Jovovic, May 04 2000

Keywords

Comments

Arises in the enumeration of "water patterns" in magic squares. [Knecht]

Examples

			There are 6 nonisomorphic 2 X 2 matrices under action of D_4:
[0 0] [0 0] [0 0] [0 1] [0 1] [1 1]
[0 0] [0 1] [1 1] [1 0] [1 1] [1 1].
		

Crossrefs

Column k=2 of A343097.

Programs

  • Mathematica
    f[n_]:=With[{n2=n^2},If[EvenQ[n],(2^n2+2(2^(n2/4))+3(2^(n2/2))+ 2(2^((n2+n)/2)))/8,(2^n2+2(2^((n2+3)/4))+2^((n2+1)/2)+ 4(2^((n2+n)/2)))/8]]; Array[f,15,0] (* Harvey P. Dale, Apr 14 2012 *)
  • PARI
    a(n)=(2^n^2+2^((n^2+7)\4)+if(n%2,2^((n^2+1)/2)+2^((n^2+n+4)/2),3*2^(n^2/2)+2^((n^2+n+2)/2)))/8 \\ Charles R Greathouse IV, May 27 2014
    
  • Python
    def a(n):
        return 2**(n**2-3)+2**((n**2-8)/4)+2**((n**2-6)/2)+2**((n**2-4)/2)+2**((n**2+n-4)/2) if n % 2 == 0 else 2**(n**2-3)+2**((n**2-5)/4)+2**((n**2-5)/2)+2**((n**2+n-2)//2) # Peter E. Francis, Apr 12 2020

Formula

a(n) = (1/8)*(2^(n^2)+2*2^(n^2/4)+3*2^(n^2/2)+2*2^((n^2+n)/2)) if n is even and a(n) = (1/8)*(2^(n^2)+2*2^((n^2+3)/4)+2^((n^2+1)/2)+4*2^((n^2+n)/2)) if n is odd.

Extensions

More terms from Harvey P. Dale, Apr 14 2012