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: Ben Branman

Ben Branman's wiki page.

Ben Branman has authored 49 sequences. Here are the ten most recent ones:

A297622 Triangle read by rows: a(n,k) is the number of k X n matrices which are the first k rows of an alternating sign matrix of size n.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 7, 7, 1, 4, 16, 42, 42, 1, 5, 30, 149, 429, 429, 1, 6, 50, 406, 2394, 7436, 7436, 1, 7, 77, 938, 9698, 65910, 218348, 218348, 1, 8, 112, 1932, 31920, 403572, 3096496, 10850216, 10850216, 1, 9, 156, 3654, 90576, 1931325, 29020904, 247587252, 911835460, 911835460
Offset: 0

Author

Ben Branman, Jan 01 2018

Keywords

Comments

Comments: An alternating sign matrix of size n is an n X n matrix of 0's, 1's and -1's such that (a) the sum of each row and column is 1; (b) the nonzero entries in each row and column alternate in sign. If k < n, we relax the condition on the columns slightly, and require that
(a) If a column is not all zeros, the first nonzero entry is 1;
(b) The nonzero entries in each column alternate in sign.
The second reference gives a sequence of partially ordered sets Phi_n such that the alternating sign matrices of size n are in bijection with the maximal chains of Phi_n. This sequence gives the number of saturated chains in Phi_n which begin at the root vertex and end at any vertex of height k.

Examples

			a(3,3)=7 because there are seven alternating sign matrices of size 3.  Six of these are the permutation matrices, and the seventh is the matrix ((0,1,0),(1,-1,1),(0,1,0)).
a(n,0)=1 because there is only one possible n X 0 matrix: the empty matrix.
a(4,4)=42 because there are 42 4 X 4 alternating sign matrices.  If we look only at the first two rows in each of the 42 4 X 4 alternating sign matrices, we get 16 distinct 2 X 4 matrices, and so a(4,2)=16.  The 16 2 X 4 matrices are
  {{0,  0,  0,  1}, {0,  0,  1,  0}},
  {{0,  0,  0,  1}, {0,  1,  0,  0}},
  {{0,  0,  0,  1}, {1,  0,  0,  0}},
  {{0,  0,  1,  0}, {0,  0,  0,  1}},
  {{0,  0,  1,  0}, {0,  1,  0,  0}},
  {{0,  0,  1,  0}, {1,  0,  0,  0}},
  {{0,  1,  0,  0}, {0,  0,  0,  1}},
  {{0,  1,  0,  0}, {0,  0,  1,  0}},
  {{0,  1,  0,  0}, {1,  0,  0,  0}},
  {{1,  0,  0,  0}, {0,  0,  0,  1}},
  {{1,  0,  0,  0}, {0,  0,  1,  0}},
  {{1,  0,  0,  0}, {0,  1,  0,  0}},
  {{0,  0,  1,  0}, {0,  1, -1,  1}},
  {{0,  0,  1,  0}, {1,  0, -1,  1}},
  {{0,  1,  0,  0}, {1, -1,  0,  1}},
  {{0,  1,  0,  0}, {1, -1,  1,  0}}.
Triangle begins:
=============================================================================================
n\k|  0  1   2    3      4       5         6          7           8            9           10
---|-----------------------------------------------------------------------------------------
_0 |  1
_1 |  1  1
_2 |  1  2   2
_3 |  1  3   7    7
_4 |  1  4  16   42     42
_5 |  1  5  30  149    429     429
_6 |  1  6  50  406   2394    7436      7436
_7 |  1  7  77  938   9698   65910    218348     218348
_8 |  1  8 112 1932  31920  403572   3096496   10850216    10850216
_9 |  1  9 156 3654  90576 1931325  29020904  247587252   911835460    911835460
10 |  1 10 210 6468 229680 7722110 205140540 3586953760 33631201864 129534272700 129534272700
  ...
		

References

  • D. M. Bressoud, Proofs and Confirmations, Camb. Univ. Press, 1999

Crossrefs

Cf. A005130.

Programs

  • Mathematica
    (* First we compute the Hasse diagram for Terwilliger's poset as a directed graph object. *)
    ToAlternatingSignList[list_] :=
    Module[{s = 1},
      Table[If[list[[k]] == 0, 0, (s = -s); -s], {k, 1, Length[list]}]]
    AllAlternatingSignRows[n_] :=
    AllAlternatingSignRows[
       n] = (ToAlternatingSignList /@
        Select[Table[IntegerDigits[q, 2, n], {q, 0, 2^n - 1}],
         OddQ[Total[#]] &])
    output[vertex_] :=
    Select[Table[
       vertex + li, {li, AllAlternatingSignRows[Length[vertex]]}],
      And[Min[#] >= 0, Max[#] <= 1] &]
    elist[vertex_] := ((vertex \[DirectedEdge] #) & /@ output[vertex])
    ASMPoset[n_] :=
    ASMPoset[n] =
      Graph[Flatten[
        Table[elist[IntegerDigits[k, 2, n]], {k, 0, 2^n - 1}]]]
    (*Now we compute the number of paths of length k starting at the root vertex.*)
    ASMPosetAdjacencyMatrix[n_] := Normal[AdjacencyMatrix[ASMPoset[n]]]
    Table[Total /@
      First /@ NestList[ASMPosetAdjacencyMatrix[n].# &,
        IdentityMatrix[2^n], n], {n, 1, 10}]

Formula

a(n,0) = 1;
a(n,1) = n;
a(n,n-1) = a(n,n) = A005130(n) = Product_{k=0..n-1} (3k+1)!/(n+k)!.

A208229 Consider Wolfram's universal 2-state 3-symbol Turing machine on a one-way-infinite tape with all but the first n cells initially blank and the head initially in state 1. a(n) is the maximum number of steps the Turing machine can make before halting.

Original entry on oeis.org

3, 3, 15, 19, 37, 51, 69, 97, 111, 161, 167, 241, 247, 327, 341, 435, 451, 547, 571, 665, 709, 801, 849
Offset: 0

Author

Ben Branman, Jan 10 2013

Keywords

Comments

The head starts in state 1 on the leftmost cell (cell 1.) The machine halts if the head moves to the left of the first cell. a(n) gives the maximum halting time for any of the 3^n initial configurations of the first n cells.
Because the rule (rule 596440) is universal, the halting problem is undecidable for arbitrary tapes. However, it is not known whether universal computation can be achieved with a finite number of nonzero starting cells. Thus, this function might be computable.
Since the head starts in state one, it will immediately move left and halt unless the first cell starts out with a 0.
For initial conditions with n<=11, the machine always halts (the Mathematica code given assumes that the machine halts for all finite configurations). Whether this remains true is an open question.

Examples

			For n=3, the initial tape 021000000... runs for 19 steps, before terminating in the state 22221200000... with the head one cell to the left of the tape. This is the longest running time without starting with nonzero symbols further to the right, so a(3)=19
		

References

  • Stephen Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 709, 1120.

Programs

  • Mathematica
    r = {{1, 2} -> {1, 1, -1}, {1, 1} -> {1, 2, -1}, {1, 0} -> {2, 1, 1}, {2, 2} -> {1, 0, 1}, {2, 1} -> {2, 2, 1}, {2, 0} -> {1, 2, -1}}; len[n_, k_] := Length[NestWhileList[TuringMachine[r, #] &, {{1,2}, {Prepend[IntegerDigits[k, 3, n], 3], 0}}, UnsameQ, All]] - 2; a[n_] := Max[Table[len[n, k], {k, 0, 3^(n - 1) - 1}]]; Join[{3},Table[a[n],{n,1,8}]]
  • Python
    # see Branicky link

Extensions

a(12)-a(14) from Robert G. Wilson v, Mar 22 2015
a(15)-a(22) from Michael S. Branicky, Jul 07 2025

A202177 Number of partitions p of n such that each part of p is prime and each part of the conjugate partition of p is also prime.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 1, 1, 2, 0, 2, 2, 2, 2, 3, 3, 0, 4, 2, 5, 2, 4, 3, 8, 2, 6, 4, 11, 0, 10, 4, 14, 2, 14, 4, 21, 2, 20, 5, 25, 0, 28, 6, 30, 2, 38, 5, 46, 0, 44, 4, 54, 0, 56, 6, 67, 2, 72, 4, 93, 2, 74, 7, 113, 0, 100, 8, 131, 0, 128
Offset: 1

Author

Ben Branman, Jan 09 2013

Keywords

Examples

			For n=17, there are three valid partitions: (7,7,3), its conjugate partition (3,3,3,2,2,2,2), and the self-conjugate partition (5,5,3,2,2).
Thus a(17)=3.
		

Crossrefs

Programs

  • Mathematica
    ConjugatePartition[l_List] :=
     Module[{i, r = Reverse[l], n = Length[l]},
      Table[n + 1 - Position[r, _?(# >= i &), Infinity, 1][[1, 1]], {i,
        l[[1]]}]];f[n_] := Select[Select[IntegerPartitions[n], And @@ (PrimeQ[#]) &],
      And @@ (PrimeQ[ConjugatePartition[#]]) &];a[n_] := Length[f[n]];Table[a[n],{n,1,40}]

A213012 Trajectory of 26 under the Reverse and Add! operation carried out in base 2.

Original entry on oeis.org

26, 37, 78, 135, 360, 405, 744, 837, 1488, 1581, 3024, 3213, 6048, 6237, 12192, 12573, 24384, 24765, 48960, 49725, 97920, 98685, 196224, 197757, 392448, 393981, 785664, 788733, 1571328, 1574397, 3144192, 3150333
Offset: 0

Author

Ben Branman, Jun 01 2012

Keywords

Comments

26 is the second-smallest number (after 22) whose base 2 trajectory does not contain a palindrome.
lim_{n -> infinity} a(n)/a(n-1) = 2 for n mod 2 = 0.
lim_{n -> infinity} a(n)/a(n-1) = 1 for n mod 2 = 1. - Branman
In 2001, Brockhaus proved that if the binary Reverse and Add trajectory of an integer contains an integer of one of four specific given forms, then the trajectory never reaches a palindrome. In the case of 26, that would be 3(2^(2k + 1) - 2^k), with k = 3 corresponding to 360. - Alonso del Arte, Jun 02 2012

Examples

			In binary, 26 is 11010.
a(1) = 37 because 11010 + 01011 = 100101, or 37.
a(2) = 78 because 100101 + 101001 = 1001110, or 78.
		

Crossrefs

Programs

  • Mathematica
    binRA[n_] := If[Reverse[IntegerDigits[n, 2]] == IntegerDigits[n, 2], n, FromDigits[Reverse[IntegerDigits[n, 2]], 2] + n]; NestList[binRA, 26, 100]

A212554 Products of supersingular primes (A002267).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 75, 76, 77, 78, 80, 81, 82, 84, 85, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100
Offset: 1

Author

Ben Branman, May 21 2012

Keywords

Comments

The initial 1 is included because it has no non-supersingular prime factors.
Many of the early terms divide the order of the monster simple group (see A174670). The first n such that a(n) does not belong to A174670 is a(204)=289.

References

  • J. H. Conway, R. T. Curtis, S. P. Norton, R. A. Parker and R. A. Wilson, ATLAS of Finite Groups. Oxford Univ. Press, 1985 [for best online version see https://oeis.org/wiki/Welcome#Links_to_Other_Sites].
  • J. H. Conway and S. P. Norton, Monstrous Moonshine, Bull. Lond. Math. Soc. 11 (1979) 308-339.
  • A. P. Ogg, Modular functions, in The Santa Cruz Conference on Finite Groups (Univ. California, Santa Cruz, Calif., 1979), pp. 521-532, Proc. Sympos. Pure Math., 37, Amer. Math. Soc., Providence, R.I., 1980.

Crossrefs

Cf. A002267, A174670, A108764 (products of exactly two supersingular primes).

Programs

  • Mathematica
    ps = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 41, 47, 59, 71}; fQ[n_] := Module[{p = Transpose[FactorInteger[n]][[1]]}, Complement[p, ps] == {}]; Join[{1}, Select[Range[2,1000], fQ]] (* T. D. Noe, May 21 2012 *)

Formula

log a(n) ~ k*n^(1/15). - Charles R Greathouse IV, Jul 18 2012

A182503 Engel expansion of the Dottie number, A003957.

Original entry on oeis.org

2, 3, 3, 4, 5, 15, 17, 66, 196, 233, 284, 375, 1613, 2131, 3574, 14122, 24171, 49097, 56871, 69361, 193406, 243145, 289951, 682749, 14501588, 21191773, 121635191, 810759781, 1292785381, 136110231377, 294401497761
Offset: 1

Author

Ben Branman, May 02 2012

Keywords

Comments

Dottie number = 1/2 + 1/2/3 + 1/2/3/3 + 1/2/3/3/4 + 1/2/3/3/4/5 + 1/2/3/3/4/5/15 +...

Crossrefs

Programs

  • Mathematica
    EngelExp[A_, n_] := Join[Array[1 &, Floor[A]], First@Transpose@NestList[{Ceiling[1/Expand[#[[1]] #[[2]] - 1]], Expand[#[[1]] #[[2]] - 1]} &, {Ceiling[1/(A - Floor[A])], A - Floor[A]}, n - 1]]; z = FindRoot[x == Cos[x], {x, 1}, WorkingPrecision -> 10000][[1, -1]]; EngelExp[z, 30]

A212113 Denominators of convergents to the Dottie number, A003957.

Original entry on oeis.org

1, 1, 3, 4, 19, 23, 939, 962, 9597, 39350, 88297, 127647, 2003002, 4133651, 51606814, 55740465, 1222156579, 1277897044, 22946406327, 1194491026048, 3606419484471, 4800910510519, 32411882547585
Offset: 0

Author

Ben Branman, May 01 2012

Keywords

Crossrefs

Programs

  • Mathematica
    z = FindRoot[Cos[x] == x, {x, 0, 1}, WorkingPrecision -> 10000][[1, -1]]; Denominator[Convergents[z, 100]]

A212112 Numerators of convergents to the Dottie number, A003957.

Original entry on oeis.org

0, 1, 2, 3, 14, 17, 694, 711, 7093, 29083, 65259, 94342, 1480389, 3055120, 38141829, 41196949, 903277758, 944474707, 16959347777, 882830559111, 2665451025110, 3548281584221, 23955140530436
Offset: 0

Author

Ben Branman, May 01 2012

Keywords

Crossrefs

Programs

  • Mathematica
    z = FindRoot[Cos[x] == x, {x, 0, 1}, WorkingPrecision -> 10000][[1, -1]]; Numerator[Convergents[z, 100]]

A182101 Random walk determined by the binary digits of the Dottie number, A003957.

Original entry on oeis.org

0, 1, 0, 1, 2, 3, 4, 3, 4, 3, 2, 3, 4, 3, 4, 3, 2, 3, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8, 7, 6, 5, 4, 3, 4, 5, 6, 7, 6, 5, 6, 7, 8, 7, 6, 5, 6, 5, 6, 7, 6, 7, 8, 7, 8, 9, 10, 9, 8, 9, 8, 9, 8, 9, 10, 9, 10, 9, 10
Offset: 0

Author

Ben Branman, Apr 11 2012

Keywords

Comments

Start at a(0)=0. Each 0 in the binary expansion corresponds to a step of -1, while a 1 corresponds to a step of +1.
Partial sums of the sequence 2*A121967(n)-1.
The first time a(n) is negative is n=93.

Examples

			a(5)=3, and the sixth bit of the Dottie number is 1, so a(6)=4.
On the other hand, the seventh bit of the Dottie number is 0, so a(7)=3.
		

Crossrefs

Cf. A003957, A121967, A166006 (analogous sequence for Pi).

Programs

  • Mathematica
    Accumulate[RealDigits[FindRoot[Cos[x] == x, {x, 0}, WorkingPrecision -> 1000][[1, -1]], 2][[1]] 2 - 1]

A209401 Number of noncommutative rings with n elements.

Original entry on oeis.org

0, 0, 0, 2, 0, 0, 0, 18, 2, 0, 0, 4, 0, 0, 0, 228, 0, 4, 0, 4, 0, 0, 0, 36, 2, 0, 23, 4, 0, 0, 0
Offset: 1

Author

Ben Branman, Mar 26 2012

Keywords

Comments

a(n)=0 if and only if n is squarefree.

Examples

			For n=8, there are 52 rings of order 8, 18 of which are noncommutative, so a(8)=18.
		

Crossrefs

Formula

a(n) = A027623(n) - A037289(n).