[seqfan] Re: -5 is not a prime

Alonso Del Arte alonso.delarte at gmail.com
Sun Jan 3 21:45:29 CET 2021


> It'd be nice to have specific examples to consider.

Any time subtraction is involved, such that small positive primes can occur
along with negative primes. For example, A038877, and its complement,
A045367, both of which are correct, as far as I can tell.

Is 5 prime in ℤ[√6]? That would seem to be the case, since *x*² − 6*y*² = 5
has no solution in integers. But then what do we make of the fact that (1
−  √6)(7 + 2 √6) = −5 − 5√6, yet 5 divides neither 1  −  √6 nor 7 + 2√6?

There are definitely mistakes in my Java package, and there probably are
also mistakes in programs like Mathematica, but this is not one of them.

scala> val ring = new algebraics.quadratics.RealQuadraticRing(6)
ring: algebraics.quadratics.RealQuadraticRing = Z[sqrt(6)]

scala> (-100 to
100).filter(calculators.NumberTheoreticFunctionsCalculator.isPrime)
res0: IndexedSeq[Int] = Vector(-97, -89, -83, -79, -73, -71, -67, -61, -59,
-53, -47, -43, -41, -37, -31, -29, -23, -19, -17, -13, -11, -7, -5, -3, -2,
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71,
73, 79, 83, 89, 97)

scala> res0.map(new algebraics.quadratics.RealQuadraticInteger(_, 0, ring))
res1: IndexedSeq[algebraics.quadratics.RealQuadraticInteger] = Vector(-97,
-89, -83, -79, -73, -71, -67, -61, -59, -53, -47, -43, -41, -37, -31, -29,
-23, -19, -17, -13, -11, -7, -5, -3, -2, 2, 3, 5, 7, 11, 13, 17, 19, 23,
29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97)

scala> res1.filter(calculators.NumberTheoreticFunctionsCalculator.isPrime)
res2: IndexedSeq[algebraics.quadratics.RealQuadraticInteger] = Vector(-89,
-83, -79, -61, -59, -41, -37, -31, -17, -13, -11, -7, 7, 11, 13, 17, 31,
37, 41, 59, 61, 79, 83, 89)

scala> val five = new algebraics.quadratics.RealQuadraticInteger(5, 0, ring)
five: algebraics.quadratics.RealQuadraticInteger = 5

scala> calculators.NumberTheoreticFunctionsCalculator.primeFactors(five)
res4: java.util.List[algebraics.AlgebraicInteger] = [-1, 1 - sqrt(6), 1 +
sqrt(6)]

...

scala> res14 divides five
res16: algebraics.quadratics.QuadraticInteger = -1 - sqrt(6)

scala> res9 divides five
algebraics.NotDivisibleException: 7 + 2sqrt(6) is not divisible by 5
  at
algebraics.quadratics.QuadraticInteger.divides(QuadraticInteger.java:1114)
  ... 28 elided

scala> res13 divides five
algebraics.NotDivisibleException: 1 - sqrt(6) is not divisible by 5
  at
algebraics.quadratics.QuadraticInteger.divides(QuadraticInteger.java:1114)
  ... 28 elided

On Sun, Jan 3, 2021 at 2:39 PM Marc LeBrun <mlb at well.com> wrote:

> > (it has led people to make mistakes in sequences)
>
> It's certainly critical to avoid errors, so I am most curious what sorts
> of mistakes these have been?
>
>  I can imagine several possibilities (eg inconsistent values, buggy code,
> etc).  It'd be nice to have specific examples to consider.
>
> Perhaps that could suggest what might be the best course of action, from
> the perspective of what's best for the OEIS?
>
>
> Rather than arguing definitions, it might be easier to simply adopt an
> editorial policy that if a technically nuanced interpretation of the word
> prime is material, that it would be a kindness to somehow mention that
> explicitly in the packaging?
>
>
> Happy 43 * 47!
>
> Warning! Prime ingredients may include eggs, milk, wheat, tree nuts, red
> dye #2, phenylalanine and values other than counting numbers greater than
> one.
>
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>


-- 
Alonso del Arte
Author at SmashWords.com
<https://www.smashwords.com/profile/view/AlonsoDelarte>
Musician at ReverbNation.com <http://www.reverbnation.com/alonsodelarte>



More information about the SeqFan mailing list