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: Joel Brennan

Joel Brennan's wiki page.

Joel Brennan has authored 7 sequences.

A359505 a(1)=2, a(2)=3, and for n >= 3, a(n) is calculated by considering in ascending order all products P of (distinct) terms from {a(1..n-1)} until finding one where P-1 has a prime factor not in {a(1..n-1)}, in which case a(n) is the smallest such prime factor.

Original entry on oeis.org

2, 3, 5, 7, 13, 29, 17, 11, 19, 37, 41, 23, 73, 43, 47, 31, 61, 101, 109, 113, 59, 137, 71, 173, 181, 97, 193, 67, 53, 79, 157, 107, 229, 127, 257, 281, 149, 151, 103, 313, 317, 163, 167, 83, 353, 89, 373, 389, 197, 131, 199, 397, 401, 409, 139, 277, 433, 223
Offset: 1

Author

Joel Brennan, Jan 24 2023

Keywords

Comments

A new prime is always found since at worst P can be the product of all primes {a(1..n-1)} and then P-1 certainly has a prime factor not among a(1..n-1).
Taking products P in ascending order generally results in smaller quantities to consider than always taking the product of all primes as done in A084598.
Conjecture: P-1 has at most one prime factor not already in the sequence, so the requirement of taking "the smallest such" is unnecessary (verified up to n=10000).

Examples

			For n=3, the primes so far are 2 and 3 but products P=2 or P=3 have P-1 = 1 or 2 which have no new prime factor. Product P = 2*3 = 6 has P-1 = 5 which is a new prime so a(3) = 5.
For n=4, the smallest product P with a new prime in P-1 is P = 3*5 = 15 for which P-1 = 14 and a(4) = 7 is its smallest new prime factor.
		

Crossrefs

A359504 a(n) is calculated by considering in ascending order all products P of zero or more terms from {a(1..n-1)} until finding one where P+1 has a prime factor not in {a(1..n-1)}, in which case a(n) is the smallest such prime factor.

Original entry on oeis.org

2, 3, 7, 5, 11, 23, 31, 17, 43, 47, 13, 67, 71, 79, 29, 59, 19, 103, 53, 107, 37, 131, 139, 73, 83, 167, 89, 179, 61, 41, 191, 101, 211, 109, 223, 239, 127, 263, 137, 283, 97, 151, 311, 331, 173, 347, 359, 367, 383, 193, 197, 419, 431, 439, 443, 149, 113, 227, 463
Offset: 1

Author

Joel Brennan, Jan 03 2023

Keywords

Comments

A new prime is always found since at worst P can be the product of all primes {a(1..n-1)} and per Euclid's proof of the infinitude of primes, P+1 then certainly has a prime factor not among a(1..n-1).
Taking products P in ascending order generally results in smaller quantities to consider than always taking the product of all primes as done in A000945, the Euclid-Mullin sequence.
Conjecture: P+1 has at most one prime factor not already in the sequence, so the requirement of taking "the smallest such" is unnecessary.

Examples

			For n=1, the sole product P is the empty product P=1, and P+1 = 2 is itself prime so a(1) = 2.
For n=3, the primes so far are 2,3 but products P=2 or P=3 have P+1 = 3 or 4 which have no new prime factor. Product P = 2*3 = 6 has P+1 = 7 which is a new prime so a(3) = 7.
For n=4, the smallest product P with a new prime in P+1 is P = 2*7 = 14 for which P+1 = 15 and a(4) = 5 is its smallest new prime factor.
		

Crossrefs

Extensions

More terms from Kevin Ryde, Jan 10 2023

A354974 Distance LQnR(n) (A334819) from n.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 5, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1
Offset: 3

Author

Joel Brennan, Jun 14 2022

Keywords

Comments

a(n) is the distance between n and the largest quadratic nonresidue modulo n: a(n) = n - A334819(n). So n - a(n) is the largest nonsquare modulo n.

Examples

			The nonsquares modulo 8 are 2, 3, 5, 6, and 7, so the distance of the largest quadratic nonresidue from 8 is a(8) = 1. The quadratic nonresidues modulo 17 are 3, 5, 6, 7, 10, 11, 12, and 14, so a(17) = 17 - 14 = 3.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := n - Max @ Complement[Range[n - 1], Mod[Range[n/2]^2, n]]; Array[a, 100, 3] (* Amiram Eldar, Jun 15 2022 *)
  • PARI
    a(n) = forstep(r = n - 1, 1, -1, if(!issquare(Mod(r, n)), return(n-r))) \\ Thomas Scheuerle, Jun 15 2022

A350876 a(n) is the number of nonisomorphic flexible left-right-alternative magmas with n elements. That is, a(n) is the number of nonisomorphic magmas with n elements which satisfy all of the identities x(yx) = (xy)x, (xx)y = x(xy), and x(yy) = (xy)y (for all x and y).

Original entry on oeis.org

1, 1, 5, 33, 675, 65066, 41160471
Offset: 0

Author

Joel Brennan, Jan 23 2022

Keywords

Comments

Compare A350873 and A350875, which are the numbers of flexible magmas with n elements and left-right-alternative magmas with n elements (up to isomorphism). The fact that a(n) < A350875(n) for n >= 3 means that left-right-alternativity for magmas (the identities (xx)y = x(xy) and x(yy) = (xy)y) does not imply flexibility (x(yx) = (xy)x). This is in contrast to the situation for non-associative rings, where this implication does hold (due to the additional additive structure).

Examples

			There are 10 nonisomorphic magmas with 2 elements, 5 of which are flexible and left-right-alternative, so a(2) = 5.
Similarly there are 3330 nonisomorphic magmas with 3 elements, 33 of which satisfy all of (xy)x = x(yx), (xx)y = x(xy), and x(yy) = (xy)y for all x and y, so a(3) = 33.
		

Crossrefs

Cf. A001329 (magmas), A350873 (flexible magmas), A350874 (left/right-alternative magmas), A350875 (left-right-alternative magmas).

Extensions

a(5)-a(6) from Andrew Howroyd, Jan 25 2022

A350874 a(n) is the number of nonisomorphic magmas with n elements which satisfy the identity (xx)y = x(xy) for all x and y (so-called left-alternative magmas).

Original entry on oeis.org

1, 1, 5, 97, 25311, 165974649
Offset: 0

Author

Joel Brennan, Jan 20 2022

Keywords

Comments

Equivalently (by symmetry), a(n) also equals the number of nonisomorphic right-alternative magmas with n elements (that is, magmas satisfying the identity x(yy) = (xy)y for all x and y).

Examples

			There are 10 non-isomorphic magmas with 2 elements, and 5 of these are left-alternative, so a(2) = 5.
		

Crossrefs

Cf. A001329 (magmas), A350875 (left-right-alternative magmas), A350876, A350873.

Extensions

a(5) from Andrew Howroyd, Jan 29 2022

A350875 a(n) is the number of nonisomorphic left-right-alternative magmas with n elements. That is, a(n) is the number of nonisomorphic magmas with n elements which satisfy the identities (xx)y = x(xy) and x(yy) = (xy)y for all x and y.

Original entry on oeis.org

1, 1, 5, 43, 2027, 1005972
Offset: 0

Author

Joel Brennan, Jan 20 2022

Keywords

Comments

Compare with A350876, whose terms are smaller (for n > 2) - this means that the left and right alternative identities (xx)y = x(xy) and x(yy) = (xy)y do not imply the flexible identity (xy)x = x(yx) for magmas. This is in contrast to the situation for non-associative rings, where left-right-alternativity implies flexibility (due to the additional additive structure).
a(n) = A350874(n) for n <= 2, i.e., a magma with (zero, one or) two elements which is left (resp., right) alternative is also right (resp., left) alternative.

Examples

			There are 10 nonisomorphic magmas with 2 elements, 5 of which are left-right-alternative, so a(2) = 5.
Similarly there are 3330 nonisomorphic magmas with 3 elements, 43 of which are left-right-alternative, so a(3) = 43.
		

Crossrefs

Cf. A001329 (magmas), A350874 (left/right-alternative magmas), A350876, A350873.

Extensions

a(5) from Andrew Howroyd, Jan 29 2022

A350873 a(n) is the number of non-isomorphic flexible magmas with n elements (i.e., number of magmas with n elements which satisfy the identity (xy)x = x(yx) for all x and y).

Original entry on oeis.org

1, 1, 6, 191, 72148
Offset: 0

Author

Joel Brennan, Jan 20 2022

Keywords

Examples

			There are 10 non-isomorphic magmas with 2 elements, and 6 of these are flexible magmas, so a(2) = 6.
		

Crossrefs

Cf. A001329 (magmas), A027851.