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: Serguei Zolotov

Serguei Zolotov's wiki page.

Serguei Zolotov has authored 5 sequences.

A341339 Square array read by descending antidiagonals where the row n (n >= 2) and column k (k >= 1) contains the largest number not greater than 2^k that has exactly n divisors, or 0 if such a number does not exist.

Original entry on oeis.org

2, 3, 0, 7, 4, 0, 13, 4, 0, 0, 31, 9, 8, 0, 0, 61, 25, 15, 0, 0, 0, 127, 49, 27, 16, 0, 0, 0, 251, 121, 62, 16, 12, 0, 0, 0, 509, 169, 125, 16, 32, 0, 0, 0, 0, 1021, 361, 254, 81, 63, 0, 0, 0, 0, 0, 2039, 961, 511, 81, 124, 64, 30, 0, 0, 0, 0, 4093, 1849, 1018, 81, 245, 64, 56, 0, 0, 0, 0, 0
Offset: 2

Author

Serguei Zolotov, Apr 27 2021

Keywords

Comments

First row contains largest prime not greater than 2^k (where k is a column number starting with 1). Second row contains largest square of prime not greater than 2^k.
Diagonal of the square array contains sequential powers of 2 since 2^k has exactly k+1 divisors.

Examples

			Array begins:
     k = 1   2   3    4    5    6    7    8    9    10    11    12
-------------------------------------------------------------
n = 2  | 2,  3,  7,  13,  31,  61, 127, 251, 509, 1021, 2039, 4093, ...
n = 3  | 0,  4,  4,   9,  25,  49, 121, 169, 361,  961, 1849, 3721, ...
n = 4  | 0,  0,  8,  15,  27,  62, 125, 254, 511, 1018, 2047, 4087, ...
n = 5  | 0,  0,  0,  16,  16,  16,  81,  81,  81,  625,  625, 2401, ...
n = 6  | 0,  0,  0,  12,  32,  63, 124, 245, 508, 1017, 2043, 4084, ...
n = 7  | 0,  0,  0,   0,   0,  64,  64,  64,  64,  729,  729,  729, ...
n = 8  | 0,  0,  0,   0,  30,  56, 128, 255, 506, 1023, 2037, 4094, ...
n = 9  | 0,  0,  0,   0,   0,  36, 100, 256, 484,  676, 1521, 3844, ...
n = 10 | 0,  0,  0,   0,   0,  48, 112, 208, 512,  976, 2032, 4016, ...
n = 11 | 0,  0,  0,   0,   0,   0,   0,   0,   0, 1024, 1024, 1024, ...
n = 12 | 0,  0,  0,   0,   0,  60, 126, 234, 500, 1014, 2048, 4086, ...
n = 13 | 0,  0,  0,   0,   0,   0,   0,   0,   0,    0,    0, 4096, ...
...
		

Programs

  • Python
    import sympy
    # k = 1,2,3,...
    # n = 2,3,4,...
    def a(k, n):
        a = 2**k
        while a > 0 and sympy.divisor_count(a) != n:
            a = a - 1
        return a

A340458 Minimum length of the string over the alphabet of 3 or more symbols that has exactly n substring palindromes. Substrings are counted as distinct if they start at different offsets.

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 4, 5, 5, 4, 5, 6, 6, 7, 5, 6, 7, 7, 8, 8, 6, 7, 8, 8, 9, 9, 9, 7, 8, 9, 9, 10, 10, 10, 11, 8, 9, 10, 10, 11, 11, 11, 12, 12, 9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 10, 11, 12, 12, 13, 13, 13, 14, 14, 15, 14, 11, 12, 13, 13, 14, 14, 14, 15, 15, 16, 15, 16, 12, 13, 14, 14, 15, 15, 15, 16, 16, 17, 16, 17, 17
Offset: 1

Author

Serguei Zolotov, Feb 13 2021

Keywords

Comments

The uploaded Python script uses G. Manacher's algorithm to efficiently calculate the number of palindromes.

Examples

			The string AAA with length 3 has 6 palindromic substrings:
    A starting at offset 1,
    A starting at offset 2,
    A starting at offset 3,
   AA starting at offset 1,
   AA starting at offset 2,
  AAA starting at offset 1.
There is no shorter string with exactly 6 substring palindromes. So a(6) = 3.
		

Formula

a(k*(k+1)/2) = k, from a string of k identical symbols.

A325159 Denominators of convergents to Pi using best rational approximation whose denominator is between consecutive powers of 2: [2^n, 2^(n+1)-1], where n = 0, 1, 2, ...

Original entry on oeis.org

1, 2, 7, 14, 21, 57, 113, 226, 339, 565, 1130, 2147, 4181, 8249, 32763, 33215, 99532, 199064, 364913, 995207, 1725033, 3450066, 5175099, 15160384, 25510582, 52746197, 131002976, 209259755, 340262731, 811528438, 1963319607, 3926639214, 6701487259, 13402974518, 20104461777
Offset: 0

Author

Serguei Zolotov, Apr 04 2019

Keywords

Examples

			The convergents are 3/1, 6/2, 22/7, 44/14, 66/21, 179/57, 355/113, 710/226, 1065/339, 1775/565, 3550/1130, 6745/2147, 13135/4181, 25915/8249, 102928/32763, ... = A325158/A325159.
		

Crossrefs

Cf. A325158 (numerators), A002485.

A325158 Numerators of convergents to Pi using best rational approximation whose denominator is between consecutive powers of 2: [2^n, 2^(n+1)-1], where n = 0, 1, 2, ...

Original entry on oeis.org

3, 6, 22, 44, 66, 179, 355, 710, 1065, 1775, 3550, 6745, 13135, 25915, 102928, 104348, 312689, 625378, 1146408, 3126535, 5419351, 10838702, 16258053, 47627751, 80143857, 165707065, 411557987, 657408909, 1068966896, 2549491779, 6167950454, 12335900908, 21053343141, 42106686282
Offset: 0

Author

Serguei Zolotov, Apr 04 2019

Keywords

Examples

			The convergents are 3/1, 6/2, 22/7, 44/14, 66/21, 179/57, 355/113, 710/226, 1065/339, 1775/565, 3550/1130, 6745/2147, 13135/4181, 25915/8249, 102928/32763, ... = A325158/A325159.
		

Crossrefs

Cf. A325159 (denominators), A002485.

A306727 Square array A(n,k), n >= 0, k >= 0, read by antidiagonals: A(n,k) is the number of partitions of 3*n into powers of 3 less than or equal to 3^k.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 3, 4, 1, 1, 2, 3, 5, 5, 1, 1, 2, 3, 5, 7, 6, 1, 1, 2, 3, 5, 7, 9, 7, 1, 1, 2, 3, 5, 7, 9, 12, 8, 1, 1, 2, 3, 5, 7, 9, 12, 15, 9, 1, 1, 2, 3, 5, 7, 9, 12, 15, 18, 10, 1, 1, 2, 3, 5, 7, 9, 12, 15, 18, 22, 11, 1, 1, 2, 3, 5, 7, 9, 12, 15, 18, 23, 26, 12, 1
Offset: 0

Author

Serguei Zolotov, Mar 06 2019

Keywords

Comments

Column sequences converge to A005704.

Examples

			A(3,3) = 5, because there are 5 partitions of 3*3=9 into powers of 3 less than or equal to 3^3=9: [9], [3,3,3], [3,3,1,1,1], [3,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,1].
Square array A(n,k) begins:
  1, 1, 1, 1, 1, 1,  ...
  1, 2, 2, 2, 2, 2,  ...
  1, 3, 3, 3, 3, 3,  ...
  1, 4, 5, 5, 5, 5,  ...
  1, 5, 7, 7, 7, 7,  ...
  1, 6, 9, 9, 9, 9,  ...
		

Crossrefs

Main diagonal gives A005704.
A181322 gives array for base p=2.

Programs

  • Mathematica
    nmax = 12;
    f[k_] := f[k] = 1/(1-x) 1/Product[1-x^(3^j), {j, 0, k-1}] + O[x]^(nmax+1) // CoefficientList[#, x]&;
    A[n_, k_] := f[k][[n+1]];
    Table[A[n-k, k], {n, 0, nmax}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Nov 20 2019 *)
  • Python
    def aseq(p, x, k):
        # generic algorithm for any p - power base, p=3 for this sequence
        if x < 0:
            return 0
        if x < p:
            return 1
        # coefficients
        arr = [0]*(x+1)
        arr[0] = 1
        m = p**k
        while m > 0:
            for i in range(m, x+1, m):
                arr[i] += arr[i-m]
            m //= p
        return arr[x]
    def A(n, k):
        p = 3
        return aseq(p, p*n, k)
    # A(n, k), 5 = A(3, 3) = aseq(3, 3*3, 3)
    # Serguei Zolotov, Mar 13 2019

Formula

G.f. of column k: 1/(1-x) * 1/Product_{j=0..k-1} (1 - x^(3^j)).