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.

User: Doron Zeilberger

Doron Zeilberger's wiki page.

Doron Zeilberger has authored 91 sequences. Here are the ten most recent ones:

A381508 Pisano period of Hexanacci numbers (A001592) mod n.

Original entry on oeis.org

1, 7, 728, 14, 208, 728, 342, 28, 2184, 1456, 354312, 728, 9520, 2394, 1456, 56, 709928, 2184, 5227320, 1456, 124488, 354312, 279840, 728, 1040, 9520, 6552, 2394, 243880, 1456, 71040, 112, 4606056, 4969496, 35568, 2184, 20362908, 5227320, 123760, 1456, 201840
Offset: 1

Author

Martin Guerra and Doron Zeilberger, Apr 24 2025

Keywords

Crossrefs

Programs

  • Maple
    # load programs from linked file:
    seq(Pis([[0$5, 1],[1$6]],n,400000), n=1..16);
  • Python
    from math import lcm
    from functools import lru_cache
    from sympy import factorint
    @lru_cache(maxsize=None)
    def A381508(n):
        if n == 1:
            return 1
        f = factorint(n).items()
        if len(f) > 1:
            return lcm(*(A381508(a**b) for a,b in f))
        else:
            k, x = 1, (0,0,0,0,1,1)
            while x != (0,0,0,0,0,1):
                k += 1
                x = x[1:]+(sum(x) % n,)
            return k # Chai Wah Wu, Apr 25 2025

Extensions

a(17)-a(41) from Alois P. Heinz, Apr 25 2025

A359126 A000168(n+1) - A000139(n).

Original entry on oeis.org

0, 8, 52, 372, 2894, 23966, 208086, 1874508, 17390158, 165248499, 1601857338, 15790898316, 157915304928, 1598927475749, 16365689821454, 169113248927772, 1762344520554606, 18504654979649615, 195620858324078190, 2080695883684277190, 22254407183551916850
Offset: 0

Author

N. J. A. Sloane, Dec 23 2022, following a suggestion from Doron Zeilberger

Keywords

Comments

Number of separable rooted planar maps with n+1 edges. - Noam Zeilberger, Dec 26 2022

Crossrefs

Programs

  • Maple
    a := n -> 2*(3^(n + 1)*(2*n + 2)!/(n + 3)! - (3*n)!/(2*n + 1)!)/(n + 1)!:
    seq(a(n), n = 0..20); # Peter Luschny, Dec 26 2022

Formula

a(n) ~ ((48^(n + 1) - 3^(3*n + 1/2)))/(2^(2*n + 1)*sqrt(Pi)*n^(5/2)). - Peter Luschny, Dec 26 2022
D-finite with recurrence -2*(389*n-1012)*(2*n+1)*(n+3)*(n+1)*a(n) +3*(14101*n^4-20062*n^3-56389*n^2+45022*n-6072)*a(n-1) +18*(-20677*n^4+100317*n^3-137223*n^2+14267*n+52524)*a(n-2) +108*(547*n-956)*(3*n-7)*(2*n-3)*(3*n-8)*a(n-3)=0. - R. J. Mathar, Jan 25 2023

A339634 Number of final Tic-Tac-Toe positions on a (2*n+1) X 3 board that result in a tie.

Original entry on oeis.org

3, 16, 30, 72, 178, 444, 1114, 2808, 7098, 17984, 45656, 116106, 295718, 754226, 1926060, 4924188, 12602416, 32284214, 82777240, 212415744, 545495716, 1401849594, 3604921774, 9275890122, 23881602058, 61518226734, 158548607640, 408814563524, 1054590179342
Offset: 0

Author

Doron Zeilberger, Taerim Kim, Karnaa Mistry, Weiji Zheng, Dec 10 2020

Keywords

Comments

The number of (2*n+1) X 3 0,1-matrices with 3*n+2 1's and 3*n+1 0's and no consecutive horizontal, vertical, nor diagonal triples of 111 or 000.

Examples

			For n = 0 it is a 3 X 1 matrix, and there are 3 arrangements of 2 1's and a single 0 such that there are no 3-streaks of 1's nor 0's in the matrix.
For n = 1 it is the classic 3 X 3 Tic-Tac-Toe board, having 1's as X's and 0's as O's.
		

Crossrefs

Bisection of A339631 (odd part).
Cf. A339633 (even part).

Programs

  • Maple
    # Maple program adapted from OddTTT3(N) in Project 5 of Doron Zeilberger's Combinatorics Class Fall 2020 (Rutgers University).
    A339634List:=proc(n) local f,i,t,x,N:
    f:=(4*t^17*x^11 + 4*t^16*x^11 + 8*t^16*x^10 + 12*t^15*x^10 + 6*t^15*x^9 + 8*t^14*x^10 + 8*t^14*x^9 + 8*t^13*x^9 - 2*t^13*x^8 + 6*t^12*x^9 - 16*t^12*x^8 - 2*t^11*x^8 - 26*t^11*x^7 - 26*t^10*x^7 - 19*t^10*x^6 - 38*t^9*x^6 - 7*t^9*x^5 - 19*t^8*x^6 - 13*t^8*x^5 - 13*t^7*x^5 - t^7*x^4 - 7*t^6*x^5 + 10*t^6*x^4 - t^5*x^4 + 16*t^5*x^3 + 16*t^4*x^3 + 9*t^4*x^2 + 18*t^3*x^2 + 9*t^2*x^2) / (t^12*x^8 + t^11*x^7 + t^10*x^7 + t^9*x^6 - 2*t^6*x^4 - t^5*x^3 - t^4*x^3 - t^3*x^2 + 1):
    N:=n-1:
    #Take the Taylor expansion up to x^(2*N+2)
    f:=taylor(f,x=0,2*N+3):
    #Extract the coefficients of x^(2*i+1)*t^(3*i+2)
    [3,seq(coeff(coeff(f,x,2*i+1),t,3*i+2),i=1..N)]:
    end:

Formula

a(n) = [x^(2*n+1)*t^ceiling(3*(2*n+1)/2)] (4*t^17*x^11 + 4*t^16*x^11 + 8*t^16*x^10 + 12*t^15*x^10 + 6*t^15*x^9 + 8*t^14*x^10 + 8*t^14*x^9 + 8*t^13*x^9 - 2*t^13*x^8 + 6*t^12*x^9 - 16*t^12*x^8 - 2*t^11*x^8 - 26*t^11*x^7 - 26*t^10*x^7 - 19*t^10*x^6 - 38*t^9*x^6 - 7*t^9*x^5 - 19*t^8*x^6 - 13*t^8*x^5 - 13*t^7*x^5 - t^7*x^4 - 7*t^6*x^5 + 10*t^6*x^4 - t^5*x^4 + 16*t^5*x^3 + 16*t^4*x^3 + 9*t^4*x^2 + 18*t^3*x^2 + 9*t^2*x^2) / (t^12*x^8 + t^11*x^7 + t^10*x^7 + t^9*x^6 - 2*t^6*x^4 - t^5*x^3 - t^4*x^3 - t^3*x^2 + 1) for n >= 1.

A339633 Number of final Tic-Tac-Toe positions on a (2*n) X 3 board that resulted in a tie.

Original entry on oeis.org

1, 18, 28, 58, 140, 334, 824, 2038, 5084, 12730, 32004, 80694, 204004, 516902, 1312336, 3337682, 8502132, 21688182, 55395140, 141651742, 362601356, 929084578, 2382677360, 6115461118, 15707982020, 40375223374, 103846409504, 267258086338, 688201711116, 1773088924494
Offset: 0

Author

Doron Zeilberger, Taerim Kim, Karnaa Mistry, Weiji Zheng, Dec 10 2020

Keywords

Comments

The number of (2*n) X 3 0,1 matrices with 3*n 1's and 3*n 0's and no consecutive horizontal, vertical, nor diagonal triples of 111 or 000.

Examples

			For n = 1 it is a 3 X 2 matrix, and so there are 18 ways to have three 1's and three 0's such that there are no 3-streaks of 1's nor 0's in the matrix.
		

References

  • Doron Zeilberger, Math 454, Section 02 (Combinatorics) Fall 2020 (Rutgers University).

Crossrefs

Bisection of A339631 (even part).
Cf. A339634 (odd part).

Programs

  • Maple
    # Maple program adapted from EvenTTT3(N) in Project 5 of Doron Zeilberger's Combinatorics Class Fall 2020 (Rutgers University).
    A339633List:=proc(n) local f,i,t,x,N:
    f:=(4*t^17*x^11 + 4*t^16*x^11 + 8*t^16*x^10 + 12*t^15*x^10 + 6*t^15*x^9 + 8*t^14*x^10 + 8*t^14*x^9 + 8*t^13*x^9 - 2*t^13*x^8 + 6*t^12*x^9 - 16*t^12*x^8 - 2*t^11*x^8 - 26*t^11*x^7 - 26*t^10*x^7 - 19*t^10*x^6 - 38*t^9*x^6 - 7*t^9*x^5 - 19*t^8*x^6 - 13*t^8*x^5 - 13*t^7*x^5 - t^7*x^4 - 7*t^6*x^5 + 10*t^6*x^4 - t^5*x^4 + 16*t^5*x^3 + 16*t^4*x^3 + 9*t^4*x^2 + 18*t^3*x^2 + 9*t^2*x^2) / (t^12*x^8 + t^11*x^7 + t^10*x^7 + t^9*x^6 - 2*t^6*x^4 - t^5*x^3 - t^4*x^3 - t^3*x^2 + 1):
    N:=n-1:
    #Take the Taylor expansion up to x^(2*N+2)
    f:=taylor(f,x=0,2*N+3):
    #Extract the coefficients of x^(2*i)*t^(3*i)
    [1,seq(coeff(coeff(f,x,2*i),t,3*i),i=1..N)]:
    end:

Formula

a(n) = [x^(2*n)*t^(3*n)] (4*t^17*x^11 + 4*t^16*x^11 + 8*t^16*x^10 + 12*t^15*x^10 + 6*t^15*x^9 + 8*t^14*x^10 + 8*t^14*x^9 + 8*t^13*x^9 - 2*t^13*x^8 + 6*t^12*x^9 - 16*t^12*x^8 - 2*t^11*x^8 - 26*t^11*x^7 - 26*t^10*x^7 - 19*t^10*x^6 - 38*t^9*x^6 - 7*t^9*x^5 - 19*t^8*x^6 - 13*t^8*x^5 - 13*t^7*x^5 - t^7*x^4 - 7*t^6*x^5 + 10*t^6*x^4 - t^5*x^4 + 16*t^5*x^3 + 16*t^4*x^3 + 9*t^4*x^2 + 18*t^3*x^2 + 9*t^2*x^2) / (t^12*x^8 + t^11*x^7 + t^10*x^7 + t^9*x^6 - 2*t^6*x^4 - t^5*x^3 - t^4*x^3 - t^3*x^2 + 1) for n >= 1.

A339631 Number of 3 X n matrices with 3*n/2 1's (if n is even) or (3*n+1)/2 1's (if n is odd) that do not have a horizontal nor vertical nor diagonal 3-streak of 1's.

Original entry on oeis.org

1, 3, 18, 16, 28, 30, 58, 72, 140, 178, 334, 444, 824, 1114, 2038, 2808, 5084, 7098, 12730, 17984, 32004, 45656, 80694, 116106, 204004, 295718, 516902, 754226, 1312336, 1926060, 3337682, 4924188, 8502132, 12602416, 21688182, 32284214, 55395140, 82777240, 141651742, 212415744
Offset: 0

Author

Doron Zeilberger, Taerim Kim, Karnaa Mistry, Weiji Zheng, Dec 10 2020

Keywords

Comments

Provided by D. Zeilberger's Maple package (ComboProject5.txt) for Combinatorics Fall 2020 at Rutgers University (see links). Generated using alternating procedures EvenTTT3() and OddTTT3() from this Maple package.

Examples

			For n = 1 it is a 3 X 1 matrix, and there is no way to have a 3-streak of 1's or 0's since there must be 2 1's and 1 0, so there are three matrices [110],[011],[101].
For n = 3 it is the classic Tic-Tac-Toe board, with 1's being X's and 0's being O's.
		

References

  • Doron Zeilberger, Math 454, Section 02 (Combinatorics) Fall 2020 (Rutgers University).

Crossrefs

Bisections give: A339633 (even part), A339634 (odd part).

Programs

  • Julia
    using Nemo
    function A339631List(prec)
        R, t = PolynomialRing(ZZ, "t")
        S, x = PowerSeriesRing(R, prec+1, "x")
        num = (4*t^17*x^11 + 4*t^16*x^11 + 8*t^16*x^10 + 12*t^15*x^10 + 6*t^15*x^9 + 8*t^14*x^10 + 8*t^14*x^9 + 8*t^13*x^9 - 2*t^13*x^8 + 6*t^12*x^9 - 16*t^12*x^8 - 2*t^11*x^8 - 26*t^11*x^7 - 26*t^10*x^7 - 19*t^10*x^6 - 38*t^9*x^6 - 7*t^9*x^5 - 19*t^8*x^6 - 13*t^8*x^5 - 13*t^7*x^5 - t^7*x^4 - 7*t^6*x^5 + 10*t^6*x^4 - t^5*x^4 + 16*t^5*x^3 + 16*t^4*x^3 + 9*t^4*x^2 + 18*t^3*x^2 + 9*t^2*x^2)
        den = (t^12*x^8 + t^11*x^7 + t^10*x^7 + t^9*x^6 - 2*t^6*x^4 - t^5*x^3 - t^4*x^3 - t^3*x^2 + 1)
        ser = divexact(num, den)
        C = [coeff(coeff(ser, n), div(3*n, 2)) for n in 0:prec]
        C[1] = 1; C[2] = 3
        return C
    end
    A339631List(39) |> println # Peter Luschny, Dec 19 2020

Formula

a(n) = [x^n*t^ceiling(3*n/2)] (4*t^17*x^11 + 4*t^16*x^11 + 8*t^16*x^10 + 12*t^15*x^10 + 6*t^15*x^9 + 8*t^14*x^10 + 8*t^14*x^9 + 8*t^13*x^9 - 2*t^13*x^8 + 6*t^12*x^9 - 16*t^12*x^8 - 2*t^11*x^8 - 26*t^11*x^7 - 26*t^10*x^7 - 19*t^10*x^6 - 38*t^9*x^6 - 7*t^9*x^5 - 19*t^8*x^6 - 13*t^8*x^5 - 13*t^7*x^5 - t^7*x^4 - 7*t^6*x^5 + 10*t^6*x^4 - t^5*x^4 + 16*t^5*x^3 + 16*t^4*x^3 + 9*t^4*x^2 + 18*t^3*x^2 + 9*t^2*x^2) / (t^12*x^8 + t^11*x^7 + t^10*x^7 + t^9*x^6 - 2*t^6*x^4 - t^5*x^3 - t^4*x^3 - t^3*x^2 + 1) for n >= 2.

A317955 Apply the morphism 1 -> 12, 2 -> 13, 3 -> 14, 4 -> 1 n times to 1, and concatenate the resulting string.

Original entry on oeis.org

1, 12, 1213, 12131214, 121312141213121, 12131214121312112131214121312, 12131214121312112131214121312121312141213121121312141213
Offset: 1

Author

Keywords

Comments

a(n) is the concatenation a(n) = a(n-1).a(n-2).a(n-3).a(n-4) for n >= 5.

Crossrefs

A317954 Fixed point of the morphism 1 -> 12, 2 -> 13, 3 -> 14, 4 -> 1, starting from a(1) = 1.

Original entry on oeis.org

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

Author

Keywords

Crossrefs

Programs

  • Maple
    A:= [1]:
    for n from 1 while nops(A) < 1000 do
      A:= subs([1=(1,2),2=(1,3),3=(1,4),4=1],A)
    od:
    A; # Robert Israel, Aug 21 2018
  • Mathematica
    Nest[Flatten[#/.{0 -> {0, 1}, 1 -> {1, 2}, 2 -> {2, 0}}] &, {0}, 7] (* G. C. Greubel, Jan 02 2019 *)

A317191 Fill an n X n square array T(j,k), 1<=j<=n, 1=k<=n, by antidiagonals upwards in which each term is the least nonnegative integer satisfying the condition that no row, column, diagonal, or antidiagonal contains a repeated term; a(n) = T(n,n).

Original entry on oeis.org

0, 3, 5, 4, 1, 10, 7, 2, 6, 8, 15, 12, 19, 17, 22, 23, 12, 26, 11, 31, 32, 12, 35, 10, 37, 42, 40, 45, 33, 49, 18, 17, 20, 53, 16, 51, 59, 18, 59, 60, 58, 64, 69, 69, 38, 29, 74, 26, 68, 78, 80, 36, 30, 33, 41, 39, 32, 33, 92, 41, 38, 89, 32, 35
Offset: 1

Author

Keywords

Comments

This is the analog for an n X n board of the sequence A317190 (which is the main diagonal when we fill in the whole of the fourth quadrant in this way).

Examples

			For n=3 the array T is
0 2 1
1 3 4
2 0 5
so a(3) = T(3,3) = 5.
For n=6 the array T is
0 2 1 5 3 4
1 3 4 0 7 2
2 0 5 1 6 9
3 1 2 4 0 5
4 6 0 3 1 7
5 7 8 6 4 10
so a(6) = T(6,6) = 10. This is the first time this sequence differs from A317190.
		

Crossrefs

A316333 a(n) = A000085(4*n+3)/2^(n+2).

Original entry on oeis.org

1, 29, 2231, 323423, 75151585, 25451905333, 11799518538967, 7161375112402823, 5503252915369107329, 5217568316626716585485, 5977663757214838174587319, 8136442760259565566724537711, 12972630954295515566319694027489, 23938932303527622015634131021262757
Offset: 0

Author

N. J. A. Sloane, Jul 09 2018, following a suggestion from Doron Zeilberger

Keywords

Crossrefs

A316332 a(n) = A000085(4*n+2)/2^(n+1).

Original entry on oeis.org

1, 19, 1187, 149405, 31166057, 9670072483, 4163946939067, 2370770585582221, 1722046856020416785, 1552401874990891104371, 1699257737580930574489619, 2218555640616875773883091901, 3404174268230266459851637679353, 6062646848508401565245592651382915, 12398960005973049406349011215379703723
Offset: 0

Author

N. J. A. Sloane, Jul 09 2018, following a suggestion from Doron Zeilberger

Keywords

Crossrefs