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.

A199909 T(n,k)=Number of -k..k arrays x(0..n-1) of n elements with zero sum, and adjacent elements not equal modulo three (with -1 modulo 3 = 2).

Original entry on oeis.org

1, 1, 2, 1, 4, 6, 1, 4, 12, 8, 1, 6, 24, 24, 14, 1, 8, 42, 72, 82, 32, 1, 8, 60, 152, 256, 232, 56, 1, 10, 84, 256, 804, 1312, 654, 100, 1, 12, 114, 448, 1836, 5016, 5206, 2044, 204, 1, 12, 144, 680, 3196, 12872, 24864, 21208, 6096, 388, 1, 14, 180, 952, 6064, 29864, 77874
Offset: 1

Views

Author

R. H. Hardin Nov 11 2011

Keywords

Comments

Table starts
...1.....1......1.......1........1.........1.........1..........1..........1
...2.....4......4.......6........8.........8........10.........12.........12
...6....12.....24......42.......60........84.......114........144........180
...8....24.....72.....152......256.......448.......680........952.......1384
..14....82....256.....804.....1836......3196......6064......10276......14846
..32...232...1312....5016....12872.....29864.....62776.....114768.....200520
..56...654...5206...24864....77874....216530....518560....1071202....2114394
.100..2044..21208..139148...547604...1699268...4854740...11588992...24551100
.204..6096..97668..814776..3784512..14546928..47329800..125461824..306360336
.388.18564.422052.4509164.25525476.116482068.436295060.1308549932.3582143596

Examples

			Some solutions for n=7 k=6
.-6...-3....4...-6...-3....4....4...-6....4....3....0....3...-6...-6....0....4
.-4....2....2...-4...-4....3...-1...-1....5....2....4....4....4....5...-1...-6
..4...-5....0...-3...-3....1....0....3...-5....4....0...-3...-6...-3...-5....4
.-4....6...-1....5....2...-6...-2....1...-4....0...-2...-1....1....1....0...-1
..6....5....0....4....3....5...-6...-1...-6...-4...-4...-5...-1...-4...-2....0
.-2...-6....1....6....5...-3....2....6....2...-3....6....5....6....1....6...-4
..6....1...-6...-2....0...-4....3...-2....4...-2...-4...-3....2....6....2....3
		

Crossrefs

Column 1 is A199697
Row 2 is A063200(n+2)

Formula

Empirical for rows:
T(1,k)=1
T(2,k)=a(k-1)+a(k-3)-a(k-4)
T(3,k)=2*a(k-1)-a(k-2)+a(k-3)-2*a(k-4)+a(k-5)
T(4,k)=a(k-1)+3*a(k-3)-3*a(k-4)-3*a(k-6)+3*a(k-7)+a(k-9)-a(k-10)
T(5,k)=a(k-1)+4*a(k-3)-4*a(k-4)-6*a(k-6)+6*a(k-7)+4*a(k-9)-4*a(k-10)-a(k-12)+a(k-13)
T(6,k)=2*a(k-1)-a(k-2)+4*a(k-3)-8*a(k-4)+4*a(k-5)-6*a(k-6)+12*a(k-7)-6*a(k-8)+4*a(k-9)-8*a(k-10)+4*a(k-11)-a(k-12)+2*a(k-13)-a(k-14)
T(7,k)=a(k-1)+6*a(k-3)-6*a(k-4)-15*a(k-6)+15*a(k-7)+20*a(k-9)-20*a(k-10)-15*a(k-12)+15*a(k-13)+6*a(k-15)-6*a(k-16)-a(k-18)+a(k-19)

A063224 Dimension of the space of weight 2n cuspidal newforms for Gamma_0( 60 ).

Original entry on oeis.org

0, 2, 4, 4, 6, 8, 8, 10, 12, 12, 14, 16, 16, 18, 20, 20, 22, 24, 24, 26, 28, 28, 30, 32, 32, 34, 36, 36, 38, 40, 40, 42, 44, 44, 46, 48, 48, 50, 52, 52, 54, 56, 56, 58, 60, 60, 62, 64, 64, 66
Offset: 1

Views

Author

N. J. A. Sloane, Jul 10 2001

Keywords

Comments

Essentially the same as A063200, A273308.
Also the total domination number of the n X n bishop graph for n > 2. (Differs at the term a(2) since the 2 X 2 bishop graph has total domination number of 4.) - Eric W. Weisstein, Sep 10 2021

Crossrefs

Programs

  • Mathematica
    2 Floor[2 Range[20]/3] (* Eric W. Weisstein, Sep 10 2021 *)
    LinearRecurrence[{1, 0, 1, -1}, {0, 2, 4, 4}, 2] (* Eric W. Weisstein, Sep 10 2021 *)
    Table[2/3 (2 n - 1 + ChebyshevU[n, -1/2]), {n, 50}] (* Eric W. Weisstein, Sep 10 2021 *)
    Table[2/9 (-9 + 6 (n + 1) + 2 Sqrt[3] Sin[2 (n + 1) Pi/3]), {n, 20}] (* Eric W. Weisstein, Sep 10 2021 *)
    CoefficientList[Series[(2 x (1 + x))/((-1 + x)^2 (1 + x + x^2)), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 10 2021 *)
  • PARI
    x='x+O('x^99); concat(0, Vec(2*x^2*(1+x)/((1+x+x^2)*(x-1)^2))) \\ Altug Alkan, Apr 04 2016
    
  • Python
    def A063224(n): return n-1+sum(divmod(n-1,3)) # Chai Wah Wu, Jan 29 2023

Formula

a(n) = 2 * A004523(n), n > 0. - Wesley Ivan Hurt, Sep 17 2013
G.f.: 2*x^2*(1+x) / ( (1+x+x^2)*(x-1)^2 ). - R. J. Mathar, Jul 15 2015
a(n) = (n-1) + floor((n-1)/3) + ((n-1) mod 3). - Bruno Berselli, Apr 04 2016
a(n) = 2*floor(2*n/3). - Eric W. Weisstein, Sep 10 2021
a(n) = a(n-1)+a(n-3)-a(n-4) for n > 4. - Eric W. Weisstein, Sep 10 2021
a(n) = 2/3*(ChebyshevU(n,-1/2)+2*n-1). - Eric W. Weisstein, Sep 10 2021
a(n) = 2/9*(6*(n+1) - 9 + 2*sqrt(3)*sin(2*(n + 1)*Pi/3)). - Eric W. Weisstein, Sep 10 2021

A273308 Maximum population of a 2 X n still life in Conway's Game of Life.

Original entry on oeis.org

0, 4, 4, 6, 8, 8, 10, 12, 12, 14, 16, 16, 18, 20, 20, 22, 24, 24, 26, 28, 28, 30, 32, 32, 34, 36, 36, 38, 40, 40, 42, 44, 44, 46, 48, 48, 50, 52, 52, 54, 56, 56, 58, 60, 60, 62, 64, 64, 66, 68, 68, 70, 72, 72, 74, 76, 76, 78, 80, 80, 82, 84, 84, 86, 88, 88
Offset: 1

Views

Author

Nathaniel Johnston, May 19 2016

Keywords

Comments

Although the Chu et al. reference does not discuss this problem explicitly, the same methods in that paper can be used to prove the formula for this sequence.

Examples

			a(2) = 4 because the largest number of alive cells in a 2 X 2 still life is 4, which is attained by the block.
a(4) = 6 because the largest number of alive cells in a 2 X 4 still life is 6, which is attained by the snake.
		

Crossrefs

Programs

  • Maple
    seq(4*floor((n+1)*(1/3))+2*floor((1/2)*(`mod`(n+1, 3))), n = 2 .. 110);
  • Mathematica
    LinearRecurrence[{1,0,1,-1},{0,4,4,6,8},70] (* Harvey P. Dale, Apr 19 2023 *)
  • PARI
    concat(0, Vec(2*x^2*(2+x^2-x^3)/((1-x)^2*(1+x+x^2)) + O(x^50))) \\ Colin Barker, May 24 2016
    
  • Python
    def A273308(n): return n+sum(divmod(n,3)) if n > 1 else 0 # Chai Wah Wu, Jan 29 2023

Formula

For n >= 1, a(3*n) = a(3*n-1) = 4*n and a(3*n+1) = 4*n+2.
From Colin Barker, May 24 2016: (Start)
a(n) = a(n-1)+a(n-3)-a(n-4) for n>5.
G.f.: 2*x^2*(2+x^2-x^3) / ((1-x)^2*(1+x+x^2)). (End)
a(n) = A063224(n+1) = A063200(n+1) for n>1. - R. J. Mathar, May 27 2016

A063198 Dimension of the space of weight 2n cuspidal newforms for Gamma_0( 10 ).

Original entry on oeis.org

0, 1, 3, 1, 3, 5, 3, 5, 7, 5, 7, 9, 7, 9, 11, 9, 11, 13, 11, 13, 15, 13, 15, 17, 15, 17, 19, 17, 19, 21, 19, 21, 23, 21, 23, 25, 23, 25, 27, 25, 27, 29, 27, 29, 31, 29, 31, 33, 31, 33
Offset: 1

Views

Author

N. J. A. Sloane, Jul 10 2001

Keywords

Comments

The dimension of weight n is apparently given by 0, 0, 2, 1, 0, 3, 2, 1, 4,... etc as in A063942. - R. J. Mathar, Jul 14 2015

Crossrefs

Cf. A063942.

Programs

  • Maple
    s0star := proc(n)
        local pf,a,p,e ;
        if n = 1 then
            1;
        else
            a :=1 ;
            for pf in ifactors(n)[2] do
                p := op(1,pf) ;
                e := op(2,pf) ;
                if e =1 then
                    a := a*(1-1/p) ;
                elif e = 2 then
                    a := a*(1-1/p-1/p^2) ;
                else
                    a := a*(1-1/p)*(1-1/p^2) ;
                end if;
            end do:
            a ;
        end if;
    end proc:
    nuInfstar := proc(n)
        local pf,a,p,e ;
        if n = 1 then
            1;
        else
            a :=1 ;
            for pf in ifactors(n)[2] do
                p := op(1,pf) ;
                e := op(2,pf) ;
                if type(e,'odd') then
                    return 0;
                elif e = 2 then
                    a := a*(p-2) ;
                else
                    a := a*(p-1)^2*p^(e/2-2) ;
                end if;
            end do:
            a ;
        end if;
    end proc:
    nu2star := proc(n)
        local pf,a,p,e ;
        if n = 1 then
            1;
        else
            a :=1 ;
            for pf in ifactors(n)[2] do
                p := op(1,pf) ;
                e := op(2,pf) ;
                if p = 2 then
                    if e =1 or e =2  then
                        a := -a ;
                    elif e =3 then
                        ;
                    else
                        return 0 ;
                    end if;
                elif modp(p,4) = 1 then
                    if e = 2 then
                        a := -a ;
                    else
                        return 0;
                    end if;
                else
                    if e = 1 then
                        a := -2*a ;
                    elif e = 2 then
                        ;
                    else
                        return 0;
                    end if;
                end if;
            end do:
            a ;
        end if;
    end proc:
    nu3star := proc(n)
        local pf,a ;
        if n = 1 then
            1;
        else
            a :=1 ;
            for pf in ifactors(n)[2] do
                p := op(1,pf) ;
                e := op(2,pf) ;
                if p = 3 then
                    if e =1 or e =2  then
                        a := -a ;
                    elif e =3 then
                        ;
                    else
                        return 0 ;
                    end if;
                elif modp(p,3) = 1 then
                    if e = 2 then
                        a := -a ;
                    else
                        return 0;
                    end if;
                else
                    if e = 1 then
                        a := -2*a ;
                    elif e = 2 then
                        ;
                    else
                        return 0;
                    end if;
                end if;
            end do:
            a ;
        end if;
    end proc:
    c2 := proc(k)
        1/4+floor(k/4)-k/4 ;
    end proc:
    c3 := proc(k)
        1/3+floor(k/3)-k/3 ;
    end proc:
    g0star := proc(k,N)
        local a;
        a := (k-1)/12*N*s0star(N) -nuInfstar(N)/2 +c2(k)*nu2star(N)+c3(k)*nu3star(N) ;
        if k/2 = 1 then
            a := a+numtheory[mobius](N) ;
        end if;
        a;
    end proc:
    A063198 := proc(n)
        g0star(2*n,10) ;
    end proc:
    A063199 := proc(n)
        g0star(2*n,11) ;
    end proc:
    A063200 := proc(n)
        g0star(2*n,15) ;
    end proc:
    A063201 := proc(n)
        g0star(2*n,18) ;
    end proc:
    A063205 := proc(n)
        g0star(2*n,29) ;
    end proc: # R. J. Mathar, Jul 19 2024

Formula

G.f.: x^2*(1+2*x-2*x^2+x^3) / ( (1+x+x^2)*(x-1)^2 ). - R. J. Mathar, Jul 15 2015
For n>1, a(n) = (6*n-3+12*cos(2*n*Pi/3)-4*sqrt(3)*sin(2*n*Pi/3))/9. - Wesley Ivan Hurt, Sep 30 2017
Showing 1-4 of 4 results.