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: Thomas Garrison

Thomas Garrison's wiki page.

Thomas Garrison has authored 6 sequences.

A359487 a(n) is the smallest start of a run of 2 or more integers having a prime factor greater than n.

Original entry on oeis.org

2, 5, 10, 10, 13, 13, 22, 22, 22, 22, 37, 37, 37, 37, 37, 37, 37, 37, 46, 46, 46, 46, 58, 58, 58, 58, 58, 58, 61, 61, 73, 73, 73, 73, 73, 73, 82, 82, 82, 82, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157
Offset: 1

Author

Thomas Garrison, Jan 02 2023

Keywords

Comments

Each term is a prime or one less than a prime.
Each even term is twice an odd prime (except for a(1)=2).
Each prime term is of the form 2p-1 where p is prime.

Examples

			For n=5, a(5) = 13 since the two numbers 13 and 14=2*7 both have a prime factor > n.
		

Crossrefs

Cf. A006530 (gpf), A359488 (run lengths).
Cf. A327909.

Programs

  • PARI
    gpf(n) = vecmax(factor(n)[,1]); \\ A006530
    a(n) = my(k=2); while(!((gpf(k)>n) && (gpf(k+1)>n)), k++); k; \\ Michel Marcus, Jan 10 2023

Formula

Conjecture: a(n) ~ 2*n.

A359488 Run lengths of A359487.

Original entry on oeis.org

1, 1, 2, 2, 4, 8, 4, 6, 2, 6, 4, 12, 26, 4, 6, 8, 16, 18, 8, 18, 16, 6, 12, 8, 12, 18, 4, 6, 12, 20, 10, 12, 14, 24, 6, 22, 8, 12, 40, 12, 8, 4, 48, 8, 10, 38, 30, 16, 8, 6, 12, 22, 12, 6, 2, 22, 8, 28, 8, 16, 18, 48, 2, 18, 48, 34, 26, 16, 14, 30, 12, 4, 6
Offset: 1

Author

Thomas Garrison, Jan 02 2023

Keywords

Comments

Number of times each distinct number appears in A359487.

Crossrefs

Cf. A359487.

A355553 Number of ways to select 3 or more collinear points from an n X n grid.

Original entry on oeis.org

0, 0, 8, 54, 228, 708, 1980, 4890, 11528, 26004, 57384, 123786, 265596, 563664, 1192220, 2511474, 5279208, 11064216, 23156448, 48361110, 100859180, 209996772, 436635396, 906562842, 1879950384, 3893566872, 8054935784, 16645591974, 34363631412, 70872295524, 146036933100
Offset: 1

Author

Thomas Garrison, Jul 14 2022

Keywords

Examples

			a(4)=54: There are 4 horizontal lines of length 4 and within a line of 4 dots are 5 ways to select a line 3 or longer. There are 2 diagonal lines of length 4 and 4 vertical lines of length 4. Finally there are 4 diagonals of length 3 these are: ((1,2),(2,3),(3,4)), ((2,1),(3,2),(4,3)), ((1,3),(2,2),(3,1)), ((2,4),(3,3),(4,2)). In total we have 5*10+4=54.
    4 . . . .
    3 . . . .
    2 . . . .
    1 . . . .
      1 2 3 4
		

Crossrefs

Cf. A000982 (1 X n), 2*A000982 (2 X n), A355551 (3 X n), A355552 (4 X n).

Extensions

Corrected and extended by Lucas A. Brown, Nov 06 2022

A355552 Number of ways to select 3 or more collinear points from a 4 X n grid.

Original entry on oeis.org

5, 10, 23, 54, 117, 240, 497, 1006, 2027, 4074, 8169, 16356, 32741, 65506, 131039, 262110, 524253, 1048536, 2097113, 4194262, 8388563, 16777170, 33554385, 67108812, 134217677, 268435402, 536870855, 1073741766, 2147483589, 4294967232, 8589934529, 17179869118, 34359738299
Offset: 1

Author

Thomas Garrison, Jul 14 2022

Keywords

Crossrefs

Cf. A000982 (1 X n), 2*A000982 (2 X n), A355553 (n X n).

Formula

a(n) == H(n) + 3 * D4(n) + 2 * E(n), where
H(n) == 2^(n+2) - 4 - 2*n*(n+1),
D4(n) == floor((n^2 + 2) / 3), and
E(n) == floor((n^2 + 1) / 2).
a(n) ~ 2^(n+2).
G.f.: -x * (6x^4 + 3x^3 - 2x^2 + 5) / ( (x - 1)^2 * (2x^2 + x - 1) * (x^2 + x + 1) ). - Lucas A. Brown, Oct 22 2022

Extensions

Corrected and extended by Lucas A. Brown, Oct 20 2022

A355551 Number of ways to select 3 or more collinear points from a 3 X n grid.

Original entry on oeis.org

1, 2, 8, 23, 61, 144, 322, 689, 1439, 2954, 6004, 12123, 24385, 48932, 98054, 196325, 392899, 786078, 1572472, 3145295, 6290981, 12582392, 25165258, 50331033, 100662631, 201325874, 402652412, 805305539, 1610611849, 3221224524, 6442449934
Offset: 1

Author

Thomas Garrison, Jul 06 2022

Keywords

Examples

			a(5)=61: there are 3*(2^5 - 1 - binomial(6,2)) ways to select 3 or more points on a horizontal line, 5 ways on a vertical line, 3 ways on a diagonal line with slope 1, 3 ways on a diagonal line with slope -1, 1 way on a diagonal line with slope 1/2, and 1 way on a diagonal line with slope -1/2; 48 + 5 + 6 + 2 = 61.
		

Crossrefs

Cf. A002662 (1 X n), 2*A002662 (2 X n), A355552 (4 X n), A355553 (n X n).

Programs

  • Mathematica
    LinearRecurrence[{4, -4, -2, 5, -2}, {1, 2, 8, 23, 61}, 50] (* Paolo Xausa, Oct 19 2024 *)
  • Python
    def a(n): return 3*((1<
    				

Formula

a(n) = 3*(2^n - 1 - n*(n+1)/2) + ceiling(n^2/2).
a(n) = A000982(n) + 3*A002662(n).
a(n) ~ 3*2^n.
From Stefano Spezia, Jul 10 2022: (Start)
G.f.: x*(1 - 2*x + 4*x^2 + x^3)/((1 - x)^3*(1 - x - 2*x^2)).
a(n) = (3*2^(n+2) - 4*n^2 - 6*n - 11 - (-1)^n)/4. (End)

A347825 Number of ways to cut a 2 X n rectangle into rectangles with integer sides up to symmetries of the rectangle.

Original entry on oeis.org

1, 2, 6, 17, 61, 220, 883, 3597, 15232, 65130, 282294, 1229729, 5384065, 23630332, 103922707, 457561989, 2016346540, 8890227762, 39212714934, 173001054449, 763388725141, 3368934926716, 14868728620387, 65626328874621, 289666423135048, 1278582804528090
Offset: 0

Author

Thomas Garrison, Jan 26 2022

Keywords

Comments

If all rotations and reflections are considered, a(2)=4 instead of 6.

Examples

			The a(2) = 6 ways to partition are:
  +-------+    +---+---+    +-------+
  |       |    |   |   |    |       |
  |       |    |   |   |    +-------+
  |       |    |   |   |    |       |
  +-------+    +---+---+    +-------+
.
  +---+---+    +-------+    +---+---+
  |   |   |    |       |    |   |   |
  |   +---+    +---+---+    +---+---+
  |   |   |    |   |   |    |   |   |
  +---+---+    +---+---+    +---+---+
		

Crossrefs

The 1 X n case is A005418.
Cf. A034999, A068911 (fully symmetric).

Programs

  • PARI
    \\ here c(n) is A034999(n)
    c(n) = polcoef((1-x)*(1-3*x)/(1-6*x+7*x^2) + O(x*x^n), n)
    a(n) = if(n==0, 1, (c(n) + 2*3^(n-1) + c((n+1)\2) + c((n+2)\2))/4) \\ Andrew Howroyd, Feb 08 2022
  • Python
    # By Soumil Mukherjee
    # Algebraic solutions to the number of ways to tile a 2 X n grid
    import sys
    # Total number of tilings
    # Counts different reflections and rotations as distinct
    counts = [1,2,8]
    def tilings(n):
        if (n < len(counts)): return counts[n]
        for i in range(len(counts), n+1):
            val = 6 * counts[i-1] - 7 * counts[i-2]
            counts.append(val)
        return counts[n]
    def getCounts(n):
      return counts[n]
    def horizontallySymmetric(i):
        if i == 0: return 1
        return 2 * (3 ** (i-1))
    def verticallySymmetric(i):
        if i == 0: return 1
        k = i//2
        if (i % 2 == 0):
            return counts[k+1] - counts[k]
        else:
            return counts[k+1]
    def rotationallySymmetric(i):
        if i == 0: return 1
        k = i//2
        if (i % 2 == 0):
            return 2 * counts[k]
        else:
            return counts[k+1]
    def perfectlySymmetric(i):
        if i == 0: return 1
        k = i//2
        if (i % 2 == 0):
            return 4 * (3 ** (k-1))
        else:
            return 2 * (3 ** k)
    def asymmetric(i):
        return (
            counts[i]
            - verticallySymmetric(i)
            - horizontallySymmetric(i)
            - rotationallySymmetric(i)
            + (2 * perfectlySymmetric(i))
        )
    def equivalenceClasses(i):
        tilings(i)
        return (
            (
              counts[i]
              + verticallySymmetric(i)
              + horizontallySymmetric(i)
              + rotationallySymmetric(i)
            )//4
            )
    

Formula

Define V(n) to be the set of tilings that are vertically symmetric.
Define H(n) to be the set of tilings that are horizontally symmetric.
Define R(n) to be the set of tilings that are rotationally symmetric.
a(n) = (c(n) + |V(n)| + |H(n)| + |R(n)|)/4 for n > 0, where:
c(n) = A034999(n),
|H(n)| = 2 * (3^n-1),
|V(n)| = c(n/2+1) - c(n/2) for even n; otherwise c(floor(n/2)+1),
|R(n)| = 2*c(n/2) for even n; otherwise c(floor(n/2)+1).
From Andrew Howroyd, Feb 08 2022: (Start)
a(n) = (c(n) + 2*3^(n-1) + c(floor((n+1)/2)) + c(floor((n+2)/2)))/4 for n > 0, where c(n) = A034999(n).
a(n) = 9*a(n-1) - 19*a(n-2) - 33*a(n-3) + 143*a(n-4) - 63*a(n-5) - 175*a(n-6) + 147*a(n-7) for n > 7.
G.f.: (1 - 7*x + 7*x^2 + 34*x^3 - 55*x^4 - 31*x^5 + 66*x^6 - 7*x^7)/((1 - 3*x)*(1 - 6*x + 7*x^2)*(1 - 6*x^2 + 7*x^4)).
(End)
a(n) ~ k*(3 + sqrt(2))^n, where k = (4 + sqrt(2))/56. - Stefano Spezia, Feb 17 2022