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-6 of 6 results.

A100073 Number of representations of n as the difference of two positive squares.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 2, 0, 1, 2, 1, 0, 2, 1, 1, 0, 1, 2, 2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 1, 1, 3, 0, 1, 3, 1, 0, 2, 1, 1, 0, 2, 2, 2, 0, 1, 2, 1, 0, 3, 2, 2, 0, 1, 1, 2, 0, 1, 3, 1, 0, 3, 1, 2, 0, 1, 3, 2, 0, 1, 2, 2, 0, 2, 2, 1, 0, 2, 1, 2, 0, 2, 4, 1, 0, 3, 1, 1, 0, 1, 2, 4
Offset: 1

Views

Author

T. D. Noe, Nov 02 2004

Keywords

Comments

Note that for odd n, a(n) = 1 iff n is a prime, or a prime squared.
A decomposition n = a^2 - b^2 = (a-b)(a+b) = d*(n/d) is given for each divisor d less than (as to exclude b = 0) but having the same parity as n/d. For even n this implies that d and n/d must be even, i.e., 4 | n. This leads to the given formula, a(n) = floor(numdiv(n)/2) for odd n, floor(numdiv(n/4)/2) for n = 4k, 0 else. - M. F. Hasler, Jul 10 2018
a(n) is the number of self-conjugate partitions of n into parts of 2 different sizes, i.e., the order of the set of partitions obtained by the intersection of the partitions in A000700 and A002133. See A270060. - R. J. Mathar, Jun 15 2022

Examples

			a(15) = 2 because 15 = 16 - 1 = 64 - 49.
		

Crossrefs

Cf. A056924 (number of divisors of n that are less than sqrt(n)), A016825 (numbers not the difference of two squares), A034178 (number of representations of n as the difference of two squares).

Programs

  • Maple
    A100073:= proc(n)
      if n::odd then floor(numtheory:-tau(n)/2)
      elif (n/2)::odd then 0
      else floor(numtheory:-tau(n/4)/2)
      fi
    end proc:
    map(A100073, [$1..200]); # Robert Israel, Jul 10 2018
  • Mathematica
    nn=150; a=Table[0, {nn}]; Do[y=x-1; While[d=x^2-y^2; d<=nn&&y>0, a[[d]]++; y-- ], {x, 1+nn/2}]; a
  • PARI
    a(n) = if (n % 2, ceil((numdiv(n)-1)/2), if (!(n%4),  ceil((numdiv(n/4)-1)/2), 0)); \\ Michel Marcus, Mar 07 2016
    
  • PARI
    A100073(n)=if(bittest(n,0),numdiv(n)\2,!bittest(n,1),numdiv(n\4)\2) \\ or shorter: a(n)=if(n%4!=2,numdiv(n\4^!(n%2))\2) \\ - M. F. Hasler, Jul 10 2018

Formula

a(n) = A056924(n) for odd n, a(n) = A056924(n/4) if 4|n, otherwise a(n) = 0.

A028247 Number of T-frame polyominoes with n cells.

Original entry on oeis.org

0, 0, 0, 1, 2, 6, 10, 19, 28, 44, 60, 86, 110, 146, 182, 233, 278, 343, 403, 490, 557, 664, 749, 879, 978, 1132, 1237, 1435, 1551, 1771, 1905, 2168, 2296, 2608, 2758, 3101, 3256, 3655, 3798, 4274, 4419, 4936, 5087, 5670, 5809, 6472, 6602, 7339, 7462, 8271
Offset: 1

Views

Author

Anne Fontaine (fonta(AT)hvcc.edu), Hudson Valley Community College, Troy NY 12180

Keywords

Comments

A T-frame is a polyomino whose boundary word has the form x^a y^b x^c y^d x^-e y^-f x^g y^-h, where a, b, c, d, e, f, g, h are positive integers. The boundary word is determined by moving counterclockwise around the boundary of the polyomino. The symbols x and y represent unit steps to the right and up, respectively, while x^-1 and y^-1 represent steps to the left and down. - David Radcliffe, Jan 31 2023
Equivalently, polyominoes which are integral rectangles with integral notches cut from two adjacent corners; or right-angled octagons with integral sides, and as you traverse the perimeter counterclockwise you encounter turns in the order LLLLRLLR. - Allan C. Wechsler, from seqfans mailing list, Jan 31 2023.
For 2 <= n <= 28, a(2n) < a(2n+1); for 29 <= n <= 99, a(2n) > a(2n+1). - Don Reble from seqfans email, Jan 31 2023.

Examples

			The a(6) = 6 polyominoes are:
   OOO   OOO   OOOO   OOOO  OOOOO  OOOOO
    O     OO    O      OO    O       O
    O     O     O
    O
		

Crossrefs

Cf. A270060 (L frame), A360419 (U frame), A360420 (Z frame).

Programs

  • PARI
    B(k,x) = sum(j=1, k, x^j/(1-x^j))
    seq(n) = Vec(sum(k=2, n, (x^k/(1-x^k)) * (B(k-1, x + O(x^(1+n-k)))^2 + B(k-1, x^2 + O(x^(1+n-k))))/2, O(x*x^n)), -n) \\ Andrew Howroyd, Feb 08 2023

Formula

G.f.: Sum_{k>=2} (x^k/(1-x^k)) * (B(k-1, x)^2 + B(k-1, x^2))/2 where B(k,x) = Sum_{j=1..k} x^j/(1-x^j). - Andrew Howroyd, Feb 08 2023

Extensions

a(1)-a(3) and terms a(32) and beyond from Allan C. Wechsler and John Mason, Feb 03 2023

A360419 a(n) = the number of U-frame polyominoes with n cells, reduced for symmetry.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 5, 9, 16, 24, 37, 50, 71, 93, 121, 151, 192, 231, 285, 338, 398, 470, 548, 626, 723, 827, 924, 1056, 1175, 1314, 1454, 1629, 1763, 1985, 2138, 2356, 2540, 2820, 2976, 3305, 3491, 3834, 4039, 4441, 4613, 5103, 5291, 5775, 5999, 6572
Offset: 1

Views

Author

John Mason, Feb 06 2023

Keywords

Comments

A U-frame polyomino has a perimeter that forms a self-avoiding polygon such that as you traverse the perimeter counterclockwise you encounter turns in the order LLLLLLRR.

Examples

			a(5)=1 because of:
  OO
  O
  OO
The a(7) = 5 polyominoes are:
  O
  O     O O             O
  O O   O O   O OO   O  O   O   O
  OOO   OOO   OOOO   OOOO   OOOOO
		

Crossrefs

Programs

  • PARI
    B(n,k,x) = sum(j=k, n, x^j/(1 - x^j), O(x*x^n))
    seq(n) = Vec(sum(k=1, (n-2)\3, x^k*(B(n-k, k+1, x)^2 + B((n-k)\2, k+1, x^2))/(1-x^k), O(x*x^n))/2, -n) \\ Andrew Howroyd, Feb 07 2023

Formula

G.f.: Sum_{k>=1} (x^k/(1 - x^k)) * (B(k+1, x)^2 + B(k+1, x^2))/2 where B(k, x) = Sum_{j>=k} x^j/(1 - x^j). - Andrew Howroyd, Feb 07 2023

A360420 a(n) = the number of Z-frame polyominoes with n cells, reduced for symmetry.

Original entry on oeis.org

0, 0, 0, 1, 2, 6, 10, 19, 27, 43, 58, 85, 105, 143, 175, 226, 266, 334, 386, 475, 534, 641, 717, 854, 933, 1092, 1187, 1385, 1482, 1713, 1820, 2091, 2203, 2511, 2637, 2998, 3110, 3516, 3647, 4118, 4226, 4761, 4865, 5461, 5576, 6221, 6319, 7088, 7138, 7953
Offset: 1

Views

Author

John Mason, Feb 06 2023

Keywords

Comments

A Z-frame polyomino has a perimeter that forms a self-avoiding polygon such that as you traverse the perimeter counterclockwise you encounter turns in the order LLLRLLLR.

Examples

			a(4)=1 because of:
  OO
 OO
		

Crossrefs

Programs

Formula

a(n) <= A028247(n). - Andrew Howroyd, Feb 08 2023

Extensions

Terms a(19) and beyond from Andrew Howroyd, Feb 08 2023

A067627 Triangle T(n,k) = number of conjugacy classes of partitions of n using only k types of piles, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 1, 1, 3, 2, 1, 6, 1, 3, 7, 2, 5, 9, 2, 1, 8, 11, 2, 1, 13, 14, 1, 3, 19, 15, 3, 5, 27, 19, 1, 11, 34, 22, 2, 1, 15, 49, 23, 2, 1, 27, 59, 28, 3, 3, 39, 78, 30, 1, 5, 60, 93, 34, 3, 11, 82, 118, 36, 1, 18, 115, 140, 41, 3, 1, 30, 155, 170, 42, 2, 1, 48
Offset: 1

Views

Author

Naohiro Nomoto, Feb 02 2002

Keywords

Comments

Lengths of rows are 1 1 2 2 2 3 3 3 3 4 4 4 4 4 ... (A003056).

Examples

			Triangle turned on its side begins:
1.1.1.2.1.2.1.2.2..2..1..3..1..2..2....etc A038548
....1.1.3.3.6.7.9.11.14.15.19.22.23....etc A270060
..........1.1.3.5..8.13.19.27.34.49....etc
...................1..1..3..5.11.15....etc
		

Crossrefs

Cf. A000700, A000701, A046682, A060177. Diagonals give A038548. row sums give A046682.

Programs

  • Maple
    compareL := proc(L1,L2)
        if nops(L1) < nops(L2) then
            -1 ;
        elif nops(L1) > nops(L2) then
            1;
        else
            for i from 1 to nops(L1) do
                if op(i,L1) > op(i,L2) then
                    return 1 ;
                elif op(i,L1) < op(i,L2) then
                    return -1 ;
                end if;
            end do:
            0 ;
        end if;
    end proc:
    A067627 := proc(n,k)
        local a,p,s,pc ;
        a := 0 ;
        for p in combinat[partition](n) do
            s := convert(p,set) ;
            if nops(s) = k then
                pc := combinat[conjpart](p) ;
                if compareL(p,pc) <= 0 then
                    a := a+1 ;
                end if;
            end if;
        end do:
        a ;
    end proc:
    for n from 1 to 30 do
    for k from A003056(n) to 1 by -1 do
        printf("%4d,",A067627(n,k)) ;
    end do:
    printf("\n") ;
    end do: # R. J. Mathar, May 08 2019

Extensions

More terms from R. J. Mathar, May 08 2019

A360421 a(n) = the number of X-frame polyominoes with n cells, reduced for symmetry.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 7, 20, 49, 109, 216, 414, 723, 1228, 1958, 3065, 4580, 6734
Offset: 1

Views

Author

John Mason, Feb 06 2023

Keywords

Comments

An X-frame polyomino has a perimeter that forms a self-avoiding polygon such that as you traverse the perimeter counterclockwise you encounter turns in the order LLRLLRLLRLLR.

Examples

			a(5) = 1 because of:
    O
   OOO
    O
The a(7) = 7 polyominoes are:
    O      O      O       O     O     O     O
   OOOOO  OOOOO  OOOOO  OOOOO  OOOO  OOOO  OOOO
    O       O       O     O     O      O    OO
                                O      O
		

Crossrefs

Showing 1-6 of 6 results.