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.

Showing 1-4 of 4 results.

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

A140650 Number of different ways of coloring an n X n grid of squares using two colors so that the resulting grid has just one line of symmetry.

Original entry on oeis.org

0, 3, 48, 600, 32256, 1177344, 268369920, 36506664960, 35184338534400, 18577347909255168, 73786976226118729728, 153476910691030086451200, 2475880078570197599844827136, 20440865928680162788862343512064, 1329227995784915854457062986570792960
Offset: 1

Views

Author

Anthony C Robin, Jul 09 2008

Keywords

Crossrefs

Programs

  • PARI
    s=[0]; for(n=1, 10, s=concat(s, [2^(2*n^2-1)*(2^n+1)-2^(n^2-1)*(2^n+1), 2^(2*n^2+3*n+1)-2^(n^2+2*n+1)])); s \\ Colin Barker, Mar 28 2014

Formula

a(2n) = 2^(2n^2-1)*(2^n+1)-2^(n^2-1)*(2^n+1).
a(2n+1) = 2^(2n^2+3n+1)-2^(n^2+2n+1). (corrected by Colin Barker, Mar 28 2014)

Extensions

More terms from Colin Barker, Mar 28 2014

A177793 Partial sums of A054247.

Original entry on oeis.org

1, 3, 9, 111, 8659, 4220403, 8594777715, 70377477369459, 2305913405481561715, 302233760834929839713907, 158456627262298939528655810163, 332307157402856267706609817833582195
Offset: 0

Views

Author

Jonathan Vos Post, May 13 2010

Keywords

Comments

Partial sums of number of n X n binary matrices under action of dihedral group of the square D_4. Can this ever be prime?

Examples

			a(4) = 1 + 2 + 6 + 102 + 8548 = 8659 = 7 * 1237.
		

Crossrefs

Programs

  • PARI
    A054247(n)={ local(a) ; if(n%2==0, a=2^(n^2)+2*2^(n^2/4)+3*2^(n^2/2)+2*2^((n^2+n)/2), a=2^(n^2)+2*2^((n^2+3)/4)+2^((n^2+1)/2)+4*2^((n^2+n)/2); ) ; return(a/8) ; }
    A177793(n)={ return(sum(i=0,n,A054247(i))) ; }
    { for(n=0,20, print1(A177793(n),",") ; ) ; } (End)

Formula

a(n) = SUM[i=0..n] A054247(i) = SUM[i=0..n] [(1/8)*(2^(i^2)+2*2^(i^2/4)+3*2^(i^2/2)+2*2^((i^2+i)/2)) if i is even and (1/8)*(2^(i^2)+2*2^((i^2+3)/4)+2^((i^2+1)/2)+4*2^((i^2+i)/2)) if i is odd].

Extensions

Extended by R. J. Mathar, May 28 2010

A140795 We consider how many ways there are of coloring a square grid, n X n, using just two colors, black & white say. If the resulting grid has rotational symmetry of order two only, then the number of different grids is given by this sequence. None of these counted are the images of any of the others under a reflection or a rotation of 90 degrees. If one wishes to count these as different, then each of these numbers can be multiplied by 4.

Original entry on oeis.org

0, 0, 2, 44, 1792, 64288, 8354304, 1073447424, 549738528768, 281474691514368, 576460717407862784, 1180591619583540985856, 9671406556633359531900928, 79228162514246041720191975424, 2596148429267404554864448650608640, 85070591730234614676028659138035712000
Offset: 1

Views

Author

Anthony C Robin, Jul 15 2008

Keywords

Crossrefs

Programs

  • PARI
    s=[0]; for(m=1, 15, s=concat(s, [(2^(2*m^2)-2^m^2*(2^m+2)+2^((m^2+m+2)/2))/4, 2^(2*m^2+2*m-1)-2^(m^2-1)*(2^(2*m+1)+2^m)+2^(m*(m+3)/2)])); s \\ Colin Barker, Mar 28 2014

Formula

a(2m+1) = 2^(2*m^2 + 2*m - 1) - 2^(m^2 - 1)*(2^(2*m + 1) + 2^m) + 2^(m*(m + 3)/2).
a(2m) = (2^(2*m^2) - 2^m^2*(2^m + 2) + 2^((m^2 + m + 2)/2))/4.

Extensions

More terms from Colin Barker, Mar 28 2014
Showing 1-4 of 4 results.