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

A116732 a(n) = a(n-1) + a(n-2) + a(n-3) - a(n-4) with a(0) = a(1) = a(2) = 0, a(3) = 1.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 4, 6, 11, 19, 32, 56, 96, 165, 285, 490, 844, 1454, 2503, 4311, 7424, 12784, 22016, 37913, 65289, 112434, 193620, 333430, 574195, 988811, 1702816, 2932392, 5049824, 8696221, 14975621, 25789274, 44411292, 76479966, 131704911, 226806895
Offset: 0

Views

Author

R. K. Guy, Mar 23 2008

Keywords

Comments

This sequence is an example of a "symmetric" quartic recurrence and has some expected divisibility properties.
a(n-3) counts partially ordered partitions of (n-3) into parts 1,2,3 where only the order of the adjacent 1's and 3's are unimportant (see example). - David Neil McGrath, Jul 25 2015

Examples

			Partially ordered partitions of (n-3) into parts 1,2,3 where only the order of adjacent 1's and 3's are unimportant. E.g., a(n-3)=a(6)=19. These are (33),(321),(312),(231),(123),(132),(3111),(2211),(1122),(1221),(2112),(2121),(1212),(21111),(12111),(11211),(11121),(11112),(111111). - _David Neil McGrath_, Jul 25 2015
G.f. = x^3 + x^4 + 2*x^5 + 4*x^6 + 6*x^7 + 11*x^8 + 19*x^9 + 32*x^10 + ... - _Michael Somos_, Jul 25 2025
		

Crossrefs

Close to A000786 (& A048239), A115992, A115993. Cf. A116201.

Programs

  • Mathematica
    LinearRecurrence[{1, 1, 1, -1}, {0, 0, 0, 1}, 40] (* Vladimir Joseph Stephan Orlovsky, Feb 02 2012 *)
    CoefficientList[Series[x^3/(1-x-x^2-x^3+x^4),{x,0,40}],x] (* Harvey P. Dale, Mar 25 2018 *)
  • PARI
    v=[0,0,0,1];for(i=1,40,v=concat(v,v[#v]+v[#v-1]+v[#v-2]-v[#v-3]));v \\ Derek Orr, Aug 27 2015
    
  • PARI
    {a(n) = if(n<0, -a(2-n), polcoeff(x^3/(1 - x - x^2 - x^3 + x^4 + x*O(x^n)), n))} /* Michael Somos, Jul 25 2025 */

Formula

G.f.: x^3/(x^4 - x^3 - x^2 - x + 1).
a(n) = -a(2-n) for all n in Z. - Michael Somos, Jul 25 2025

Extensions

More terms from Max Alekseyev, Mar 23 2008
Name clarified by Michael Somos, Jul 25 2025

A068940 Maximum number of chess queens that can be placed on a 3-dimensional chessboard of order n so that no two queens attack each other.

Original entry on oeis.org

1, 1, 4, 7, 13, 21, 32, 48, 67, 91, 121, 133, 169
Offset: 1

Views

Author

Al Zimmermann, Mar 08 2002

Keywords

Crossrefs

A115993 Size |S| of the largest subset S of {0,1}^n whose measure m(S) is <= 2^n, where m is the additive measure defined on each element x of S by m({x}) = 2^k(x), where k(x) is the number of non-null coordinates of x.

Original entry on oeis.org

1, 1, 2, 4, 6, 11, 19, 32, 52, 89, 158, 262, 426, 725, 1287, 2154, 3498, 5931, 10485, 17940, 28965, 48813, 85775, 150923, 241735, 404082, 704598, 1275594, 2031915, 3363953, 5812312, 10438620, 17194101, 28160524, 48156310, 85702564
Offset: 0

Views

Author

Frederic van der Plancke (fplancke(AT)hotmail.com), Feb 10 2006

Keywords

Comments

This is an upper bound to sequence A115992; I do not know whether the two sequences are equal. The proof goes by projecting a queen (see definition of A115992), i.e. an element q of {0,1,2}^n, to the element p(q) of {0,1}^n obtained by substituting 0 for 2. Let also D(q) = { q' in {0,2}^n | if q_i <> 1 then q'_i = q_i }; then |D(q)| = m(p(q)). Two queens q and q' attack each other if and only if either p(q)=p(q') or D(q) and D(q') meet. Conclusion left to the reader.

Examples

			a(4)=6=|S| with S containing (0,0,0,0) (of measure 1), plus the 4 permutations of (1,0,0,0) (each of measure 2), plus (1,1,0,0) (of measure 4). Total measure of S is 1+4*2+4=13, while {0,1}^4 itself has measure 16 and all remaining elements of {0,1} have measure >= 4 so none of them can complete S.
		

Crossrefs

Cf. A115992 (of which this is an easier upper bound).

Programs

  • Python
    def q3ub(n):
        sum = 0;
        vlm = 2**n; # 2 to the n-th power
        combi = 1; # combinatorial coefficient (n k)
        for k in range(n+1): # for k := 0 to n
            c = min(combi, vlm);
            sum = sum + c;
            vlm = vlm - c;
            vlm = vlm // 2; # integer division, result is truncated
            combi = (combi * (n-k)) // (k+1) # division is exact
        #end for k
        return sum
Showing 1-3 of 3 results.