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: Caleb Stanford

Caleb Stanford's wiki page.

Caleb Stanford has authored 10 sequences.

A382803 Positive integers m such that phi(m) and phi(m+1) are both powers of 2.

Original entry on oeis.org

1, 2, 3, 4, 5, 15, 16, 255, 256, 65535, 65536, 4294967295
Offset: 1

Author

Caleb Stanford, Apr 05 2025

Keywords

Comments

Numbers m such that m and m+1 are in A003401
Each of m and m+1 must be a power of 2 times a product of Fermat primes.
Apart from term 5, odd terms are of the form 2^2^k - 1 for k in 0...5.
Even terms are exactly numbers of the form 2^2^k such that 2^2^k + 1 is a Fermat prime (A019434).
The sequence is thus infinite iff A019434 is infinite, i.e., iff there are infinitely many Fermat primes.

Examples

			16 is present because phi(16) = 8 and phi(17) = 16, both powers of two.
17 is not present because phi(17) = 16 but phi(18) = 6, not a power of two.
		

Crossrefs

A382519 Odd positive integers m such that phi(m) and phi(m+1) are both powers of 2.

Original entry on oeis.org

1, 3, 5, 15, 255, 65535, 4294967295
Offset: 1

Author

Caleb Stanford, Apr 05 2025

Keywords

Comments

Sequence is finite with only 7 values. With the exception of m = 5, the others are products of the first k Fermat primes; i.e., products of A019434 and matching the initial terms of A051179. With the exception of m = 5, sequence resembles A250405.

Examples

			5 is present because phi(5) = 4 and phi(6) = 2, both powers of two.
15 is present because phi(15) = 8 and phi(16) = 8, both powers of two.
17 is not present because phi(17) = 16 but phi(18) = 6, not a power of two.
		

Crossrefs

Subsequence of A382803.

Formula

a(n) = 2^2^k - 1 for k = 0, 1, 2, 3, 4, 5, equivalently the product of first k Fermat numbers, OR a(n) = 5. Sequence is finite because the next Fermat number, 4294967297 is composite.

A368809 Number of 4 X n binary arrays with a path of adjacent 1's from top row to bottom row using only left, right, and downward steps.

Original entry on oeis.org

1, 41, 1041, 22193, 433801, 8057625, 144762849, 2540882465, 43840779353, 746649798473, 12587443678705, 210491254232465, 3496816762316713, 57778098654714361, 950391251581267073, 15574198350636963201, 254405750326548970361, 4144508602760970898729, 67361936661916258817937
Offset: 1

Author

Caleb Stanford, Feb 05 2024

Keywords

Comments

Unlike A069362, does not allow upward steps.

Examples

			For example, here is one such 4 X 4 array:
    0001
    1111
    1010
    1100
The following 4 X 5 array is a non-example, as there is no path using only left, right, and downward steps:
    10000
    10111
    11101
    00001
		

Crossrefs

Row 4 of A369892.

Formula

G.f.: x*(1 + 5*x - 22*x^2 + 8*x^3)/((1 - 16*x)*(1 - 20*x + 93*x^2 - 154*x^3 + 72*x^4)). - Pontus von Brömssen, Feb 05 2025

Extensions

More terms from Pontus von Brömssen, Feb 05 2025

A369892 Array read by antidiagonals: T(m, n) is the number of m X n binary arrays with a path of adjacent 1's from top row to bottom row using only left, right, and downward steps.

Original entry on oeis.org

1, 3, 1, 7, 7, 1, 15, 37, 17, 1, 31, 175, 197, 41, 1, 63, 781, 1985, 1041, 99, 1, 127, 3367, 18621, 22193, 5503, 239, 1, 255, 14197, 167337, 433801, 247759, 29089, 577, 1, 511, 58975, 1461797, 8057625, 10056087, 2764991, 153769, 1393, 1, 1023, 242461, 12519345, 144762849, 384409519, 232777209, 30856705, 812849, 3363, 1
Offset: 1

Author

Caleb Stanford, Feb 05 2024

Keywords

Comments

Similar to A359576 but disallowing Up steps.
The sequences are initially similar but differ for 4 X 5 grids (433801 instead of 433809), 4 X 6 grids (8057625 instead of 8057905), and 5 X 5 grids (10056087 instead of 10056959)
Can be calculated by dynamic programming from 1 X n grids to m X n grids by keeping track of the number of grids with each of the 2^n patterns of reachable squares in the last row.
Each row and each column satisfies a linear recurrence with constant coefficients. - Pontus von Brömssen, Feb 05 2025

Examples

			For the 37 2 X 3 grids, see A359576.
The following 4 X 5 grid is a counterexample that is counted by A359576 but not by the present sequence:
    10000
    10111
    11101
    00001
Notice that there is a path of 1s from the top to the bottom, but only via the upward step detour in the third column. There are 8 such 4 X 5 grids, formed from the above by reflection and by toggling the first row, second column and last row, second to last column.
Table starts:
    1      3        7         15          31          63         127 ...
    1      7       37        175         781        3367       14197 ...
    1     17      197       1985       18621      167337     1461797 ...
    1     41     1041      22193      433801     8057625   144762849 ...
    1     99     5503     247759    10056087   384409519   ...
    1    239    29089    2764991   232777209   ...
    1    577   153769   30856705   ...
    1   1393   812849   ...
    1   3363   ...
    1   ...
    ...
		

Crossrefs

First 4 rows are A000225, A005061, A069361, A368809.
First 4 columns are A000012, A001333, A069378, A069379.
Cf. A359576 (up steps allowed).

A362014 Number of distinct lines passing through exactly two points in a triangular grid of side n.

Original entry on oeis.org

0, 0, 3, 6, 18, 39, 81, 141, 237, 369, 561, 801, 1119, 1521, 2043, 2667, 3429, 4329, 5415, 6675, 8163, 9879, 11877, 14127, 16695, 19593, 22881, 26523, 30591, 35085, 40089, 45591, 51681, 58359, 65715, 73701, 82389, 91791, 102015, 113007, 124875
Offset: 0

Author

Caleb Stanford, Apr 03 2023

Keywords

References

  • Samuel Dittmer, Hiram Golze, Grant Molnar, and Caleb Stanford, Puzzle and Proof: A Decade of Problems from the Utah Math Olympiad, CRC Press, 2025, p. 34.

Crossrefs

Cf. A234248, A244504 (lines which contain 2 or more points), A050534 (total number of pairs of points). Both are upper bounds.

Formula

a(n) = A244504(n) - A234248(n). - Andrew Howroyd, Apr 03 2023

A340318 Minimum size of a partial order that contains all partial orders of size n.

Original entry on oeis.org

0, 1, 3, 5, 8, 11, 16
Offset: 0

Author

Caleb Stanford, Jan 04 2021

Keywords

Comments

a(n) is the minimum number of elements in a poset P such that every poset of size n is isomorphic to a subset of P, where the subset inherits the order from P.
Elementary bounds are a(n) >= 2n-1 because it must contain a chain and an antichain, and a(n) <= 2^n-1 because every partial order embeds into the powerset partial order on n elements. It is shown in the MathOverflow link that a(n) has no polynomial upper bound. This is in particular derived from binomial(a(n),n) >= A000112(n).
a(4) = 8 verified using a computer-assisted proof with a SAT solver.
a(5) = 11 proven on MathOverflow.
a(6) = 16 and 16 <= a(7) <= 25 proven on MathOverflow. - Jukka Kohonen, Jan 15 2021

Examples

			a(2) = 3 because there are 2 nonisomorphic posets on two elements, and both embed into the poset of three elements {a, b, c} with ordering a < b (and other pairs are incomparable).
a(3) = 5 because all posets on three elements can be embedded into {a, b, c, d, e} with ordering a < d, b < c < d, and b < e.
		

Crossrefs

Programs

  • Sage
    # Find an u-poset that contains all n-posets as induced posets.
    def find_universal_poset(n,u):
        PP = list(Posets(n))
        for U in Posets(u):
            ok = True
            for P in PP:
                if not U.has_isomorphic_subposet(P):
                    ok = False
                    break
            if ok:
                return U
        return None

Extensions

a(6) from Jukka Kohonen, Jan 15 2021

A328261 Number of labeled prime graphs on n nodes, i.e., graphs with no nontrivial modules when calculating the modular decomposition.

Original entry on oeis.org

0, 0, 0, 12, 192, 10800, 970080, 161310240, 49564247040, 28687709433600, 31808433385290240
Offset: 1

Author

Caleb Stanford, Oct 09 2019

Keywords

Comments

A module in a (simple, undirected) graph is a subset S of vertices that are "externally indistinguishable" in the following sense: for all v_1, v_2 in S and v outside of S, v either has an edge to both v1 or v2, or it has an edge to neither of them. a(n) is the number of graphs where the only such modules S are the empty set, the singleton vertices, and the entire set of vertices.
The proportion of all graphs which are prime (a(n) / 2^(n choose 2)) appears to tend to 1 as n approaches infinity.

Examples

			a(3) = 0 because there are no prime graphs on 3 vertices. a(4) = 12 because the only prime graph on 4 vertices is a line (path graph P_4), and there are 12 possible labelings of the path graph.
		

Crossrefs

Cf. A006125.

Extensions

a(9)-a(11) (computed with tinygraph) from Falk Hüffner, Oct 11 2019

A260509 Number of graphs on labeled vertices {x, y, 1, 2, ..., n}, such that there is a partition of the vertices into V_1 and V_2 with x in V_1, y in V_2, every v in V_1 adjacent to an even number of vertices in V_2, and every v in V_2 adjacent to an even number of vertices in V_1.

Original entry on oeis.org

1, 3, 23, 351, 11119, 703887, 89872847, 22945886799, 11740984910671, 12014755220129103, 24602393557227030863, 100754627840184914661711, 825349838279823049359417679, 13521969078301639826644261077327, 443083578482642171171990600910324047, 29037623349739387300519333731237743018319
Offset: 0

Author

Caleb Stanford, Jul 27 2015

Keywords

Comments

a(n) is also the number of graphs on vertices {x, y, 1, 2, ..., n} that can be sorted to the discrete graph by a series of gcdr and even-gcdr moves.
Asymptotically, a(n) is a third of the total number of graphs, i.e., lim_{n->infinity} a(n) / 2^(binomial(n+2, 2)) = 1/3.

Examples

			a(2) = 23 because there are 23 graphs on {x, y, 1, 2} that admit a vertex partition separating x and y, such that each vertex in one half of the partition is adjacent to an even number of vertices in the other half. For instance, the graph with four edges (x,y), (x,1), (y,2), (1,2) admits the partition {{x,2},{y,1}}.
		

Crossrefs

Cf. A260506 (counts the special case where the graph in question is required to be the overlap graph of some signed permutation).
Cf. A006125 (the total number of graphs on n labeled vertices).

Programs

  • PARI
    a(n) = sum(k=0, n, prod(i=1, k, 2^(i+1))*prod(i=k+1, n, 1 - 2^i)); \\ Michel Marcus, Sep 11 2015
  • Python
    # a_1(n) and a_2(n) both count the same sequence, in two different ways.
    def a_1(n) :
        # Output the number of 2-rooted graphs in (a) with n+2 vertices
        if n == 0 :
            return 1
        else :
            return 2**((n*n + 3*n) // 2) - (2**n - 1) * a_1(n-1)
    def a_2(n) :
        # Output the number of 2-rooted graphs in (a) with n+2 vertices
        # Formula: \sum_{k=0}^n (\prod_{i=1}^k 2^{i+1}) (\prod_{i=k+1}^n (1 - 2^i))
        curr_sum = 0
        for k in range(0,n+1) :
            curr_prod = 1
            for i in range(1,k+1) :
                curr_prod *= (2**(i+1))
            for i in range(k+1,n+1) :
                curr_prod *= (1 - (2**i))
            curr_sum += curr_prod
        return curr_sum
    

Formula

a(n) + (2^n - 1)*a(n-1) = 2^(binomial(n+2, 2) - 1) = 2^(n^3 + 3n).
a(n) = Sum_{k=0..n} (Product_{i=1..k} 2^(i+1))*(Product_{i=k+1..n} (1 - 2^i)).
Exponential generating function A(x) satisfies A(0) = 1 and A'(x) + 2A(2x) - A(x) = 4F(8x). Here F(x) is the exponential generating function counting the graphs on n labeled vertices, and satisfies F(0) = 1 and F'(x) = F(2x).

A260511 Number of signed permutations of length n that are sortable to the identity permutation by some sequence of cdr (context-directed reversal) moves.

Original entry on oeis.org

1, 3, 15, 120, 1227, 15188
Offset: 1

Author

Caleb Stanford, Jul 27 2015

Keywords

Examples

			a(2) = 3 because [1,2], [-1,2], and [1,-2] are sortable to the identity [1,2] using only context-directed reversal moves.
		

Crossrefs

A249165 gives the number of unsigned permutations sortable by context-directed swaps; this is the analog for signed permutations and context-directed reversals.
A260506 gives the number of signed permutations sortable by both cdr and cds moves together. This sequence is therefore always bounded by A260506.
A000165 counts the total number of signed permutations.

A260506 Number of signed permutations of length n that are sortable to the identity permutation by some sequence of cdr (context-directed reversal) and cds (context-directed swap) moves.

Original entry on oeis.org

1, 3, 18, 140, 1384, 16428, 228248
Offset: 1

Author

Caleb Stanford, Jul 27 2015

Keywords

Comments

a(n) is equivalently the number of signed permutations such that in the reality-desire graph of the permutation, 0 and n are in different cycles.
It is also the number of signed permutations such that the overlap of that permutation contains a partition into two vertex sets, V_1 and V_2, such that (i) vertices (0,1) and (n,n+1) are in different cycles, and (ii) every vertex in V_1 is adjacent to an even number of vertices in V_2, and every vertex in V_2 is adjacent to an even number of vertices in V_1.
It is expected (but not proven) asymptotically that a(n) is about one-third of all permutations, i.e., it is about (2^n * n!) / 3.

Examples

			a(2) = 3 because out of the 8 signed permutations of size 2, only [1,2], [1,-2], and [-1,2] are sortable. They each take one cdr move. Three other permutations, [-2,-1], [2,-1], and [-2,1] are not sortable to the identity [1,2] but instead sort to [-2,-1]. Finally, [2,1] and [-1,-2] sort to neither [1,2] nor [-2,-1].
		

Crossrefs

A249165 counts the special case of this property for unsigned permutations. Note that for unsigned permutations, there are no valid cdr moves, so sortability by cdr and cds is equivalent to sortability by cds only.
A000165 counts the total number of signed permutations.