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: Onno M. Cain

Onno M. Cain's wiki page.

Onno M. Cain has authored 5 sequences.

A330007 Base-24 integers whose substrings are primes (written in base 10).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 53, 59, 61, 67, 71, 79, 83, 89, 127, 131, 137, 139, 173, 179, 181, 191, 269, 271, 277, 281, 283, 317, 331, 419, 421, 431, 461, 463, 467, 479, 557, 563, 569, 571, 1279, 1283, 1289, 1291, 1423, 1429, 1433, 1483, 1613, 1619, 1709, 1721, 1723, 1901, 1907, 1997, 1999, 2011, 3061, 3163, 3299
Offset: 1

Author

Onno M. Cain, Nov 26 2019

Keywords

Comments

The largest such number is a(103)=266003, which is written (19|5|19|11)_24 in base 24.
We might call these numbers "substrimes" (= substring-primes) since the term (1) is concise, (2) is pronounceable, and (3) keeps these numbers distinct in communication from different but similar sequences (see Crossrefs).

Examples

			a(64) = 3299 = (5|17|11)_24 is in the sequence because 5, 17, 11, (5|17)_24=137, (17|11)=419, and 3299 itself are all prime.
		

Crossrefs

Programs

  • Mathematica
    With[{b = 24}, Select[Range[b^4], Function[{s, n}, AllTrue[Flatten@ Array[FromDigits[#, b] & /@ Partition[s, #, 1] &, n], PrimeQ]] @@ {#, Length@ #} &@ IntegerDigits[#, b] &]] (* Michael De Vlieger, Dec 15 2019 *)
  • Python
    # see Cain link

A329526 Number of 1's required to build n using +, -, *, ^ and factorial.

Original entry on oeis.org

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

Author

Onno M. Cain, Nov 15 2019

Keywords

Comments

A number n may be written from the digits of its binary representation using the 5 aforementioned operations whenever a(n) <= floor(log_2(n))+1.

Examples

			a(117) = 7 since 117 = ((1+1+1)!-1)!-1-1-1 is the representation of 117 with the operations +,-,*,^ and factorial requiring the fewest 1's.
		

Crossrefs

Programs

  • Python
    import math
    delta_bound = 10
    limit = 8*2**delta_bound
    log_limit = math.log(limit)
    def factorial(n):
      if n <= 1: return 1
      return n * factorial(n-1)
    def condensings(a, b):
      result = []
      # Addition
      if a+b < limit: result.append(a+b)
      # Subtraction
      if a > b: result.append(a-b)
      # Multiplication
      if a*b < limit: result.append(a*b)
      # Division
      if a % b == 0: result.append(a//b)
      # Exponentiation
      if b*math.log(a) < log_limit: result.append(a**b)
      for n in result:
        if 2 < n < 10:
          fac = factorial(n)
          if fac < limit: result.append(fac)
      return result
    # Create delta bound.
    # "delta(n) = k" means k 1's are required to build up
    # n from the operations in the 'condensings' function.
    delta = dict()
    delta[1] = 1
    # Create inverse map.
    delta_inv = {i:[] for i in range(1, delta_bound)}
    for a in delta: delta_inv[delta[a]].append(a)
    # Calculate delta.
    for D in range(2, delta_bound):
      for A in range(1, D):
        B = D - A
        for a in delta_inv[A]:
          for b in delta_inv[B]:
            for c in condensings(a, b):
              if c >= limit: continue
              if c not in delta:
                delta[c] = D
                delta_inv[D].append(c)
    a = 1
    while a < limit:
      if not a in delta: break
      print(a, delta[a])
      a += 1

A325480 a(n) is the largest integer m such that the product of n consecutive integers starting at m is divisible by at most n primes.

Original entry on oeis.org

16, 24, 24, 45, 48, 49, 120, 120, 125, 189, 240, 240, 350, 350, 350, 350, 374, 494, 494, 714, 714, 714, 714, 825, 832, 1078, 1078, 1078, 1078, 1425, 1440, 1440, 1856, 2175, 2175, 2175, 2175, 2175, 2175, 2175, 2870, 2870, 2870, 2871, 2880, 2880, 2880, 3219
Offset: 3

Author

Onno M. Cain, Sep 06 2019

Keywords

Comments

Each term is only conjectured and has been verified up to 10^6.
Note a(2) is undefined if there are infinitely many Mersenne primes.

Examples

			For example, a(3) = 16 because 16 * 17 * 18 = 2^5 * 3^2 * 17 admits only three prime divisors (2, 3, and 17) and appears to be the largest product of three consecutive integers with the property.
		

Programs

  • SageMath
    for r in range(3, 100):
      history = []
      M = 0
      for n in range(1, 100000):
        primes = {p for p, _ in factor(n)}
        history.append(primes)
        history = history[-r:]
        total = set()
        for s in history: total |= s
        # Skip if too many primes.
        if len(total) > r: continue
        if n > M: M = n
      print(r, M-r+1)

A309230 Positions of records in A033178.

Original entry on oeis.org

2, 5, 13, 25, 37, 41, 61, 85, 113, 181, 361, 421, 433, 613, 793, 1009, 1121, 1261, 2053, 2161, 3421, 4001, 5441, 6481, 7141, 7561, 8033, 9361
Offset: 1

Author

Onno M. Cain, Jul 16 2019

Keywords

Comments

Terms appear to have relatively few prime factors compared to their neighbors. a(28)=9361=11*23*37 is the first term with 3 factors.

Crossrefs

A308838 Orders of Parker finite fields of odd characteristic.

Original entry on oeis.org

3, 5, 7, 9, 11, 13, 17, 19, 23, 25, 27, 31, 43, 47, 67, 243
Offset: 1

Author

Onno M. Cain, Jun 27 2019

Keywords

Comments

A field or ring is called "Parker" if no 3 X 3 magic square of 9 distinct squared elements can be formed. Conjecture: the sequence is complete.
Example: the fact that p=31 is listed is taken to mean one cannot construct a 3 X 3 magic square of distinct squared elements of the finite field of order 31.
Cain shows that each of the entries on the list corresponds to a Parker field and claims to have checked computationally that no other primes p < 1000 are on the list.
Labruna shows at least there are infinitely many primes not on the list.
The next term, if it exists, must be > 7500. - G. C. Greubel, Aug 16 2019

Examples

			Example: The prime p=29 does not appear in the sequence because one can in fact construct a 3 X 3 magic square of distinct squares over the finite field of order 29.
Construction:
   9^2 | 11^2 |  1^2
   6^2 |  0^2 | 14^2
  12^2 | 16^2 |  8^2
The square is valid evaluated mod 29 (example independently discovered by Woll and Cain). That is to say the entries of each row, column, and the two main diagonals sum to a multiple of 29.
Example: The fields corresponding to p^n = 3, 5, 7, 9, 11, and 13 are all Parker because each contains at most 7 distinct squared entries and cannot therefore provide the 9 distinct squares required for a magic square.
		

Crossrefs

Programs

  • Sage
    def msos_search(F, single=False):
        squares = {x^2 for x in F}
        MSOS = []
        E = 0
        for A, I in Subsets(squares, 2):
            if A + I != 2*E: continue
            C, G = 1, -1
            B = 3*E - A - C
            D = 3*E - A - G
            F = 3*E - C - I
            H = 3*E - G - I
            if len(squares & {B,D,F,H}) < 4: continue
            if len({A,B,C,D,E,F,G,H,I}) < 9: continue
            if single: return [A,B,C,D,E,F,G,H,I]
            MSOS.append([A,B,C,D,E,F,G,H,I])
        E = 1
        sequences = []
        for A, I in Subsets(squares, 2):
            if A + I != 2*E: continue
            for C, G in sequences:
                B = 3*E - A - C
                D = 3*E - A - G
                F = 3*E - C - I
                H = 3*E - G - I
                if len(squares & {B,D,F,H}) < 4: continue
                if len({A,B,C,D,E,F,G,H,I}) < 9: continue
                if single: return [A,B,C,D,E,F,G,H,I]
                MSOS.append([A,B,C,D,E,F,G,H,I])
            sequences.append((A,I))
        return MSOS
    for q in range(3, 500, 2):
        if len(factor(q)) > 1: continue
        print(q, msos_search(GF(q), single=True))