[seqfan] Re: A071961: Can we characterize zeroes?

Alonso Del Arte alonso.delarte at gmail.com
Wed Sep 2 20:40:55 CEST 2020


Thank you very much for pointing that out, Peter. Wolfram Alpha gives 156
for 169. But don't blame Scala for that mistake, nor even blame my 2019
self for my implementation of symbolKronecker(). Blame me yesterday for
forgetting about fixed width integers. For the class number calculations,
the bytes get sign-extended as needed. But here, I needed to mind the  −128
to 127 range.

scala> (1 to
168).map(calculators.NumberTheoreticFunctionsCalculator.symbolKronecker(169,
_))
res0: IndexedSeq[Byte] = Vector(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1)

scala> res0.sum
res1: Byte = -100

scala> res0.map(_.toInt)
res2: IndexedSeq[Int] = Vector(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1)

scala> res2.sum
res3: Int = 156

This led me to think that maybe an erroneous term (other than the initial
1) obscured results for the zeroes, but that doesn't seem to be the case.
I'll have to cross-check with Mathematica.

scala> def kronSum(n: Int): Int = (1 to n -
1).map(calculators.NumberTheoreticFunctionsCalculator.symbolKronecker(n, _))
.map(_.toInt).sum
kronSum: (n: Int)Int

scala> kronSum(169)
res4: Int = 156

scala> (1 to 100).filter(kronSum(_) == 0)
res5: IndexedSeq[Int] = Vector(1, 3, 5, 8, 12, 13, 17, 18, 20, 21, 24, 27,
28, 29, 32, 33, 37, 40, 41, 43, 44, 45, 48, 52, 53, 56, 57, 60, 61, 65, 68,
69, 72, 73, 76, 77, 80, 84, 85, 88, 89, 92, 93, 96, 97)

On Wed, Sep 2, 2020 at 3:06 AM Peter Luschny <peter.luschny at gmail.com>
wrote:

> > scala> (1 to 1000).filter(kronSum(_) < 0)
> > res4: IndexedSeq[Int] = Vector(67, 99, 115, 147, 163, 169, 187, 256, 267,
>
> Did you notice A071958? For example 169 is missing there.
> Numbers n such that sum( i=1, n, K(n,i) ) < 0 where K(x,y) is the
> Kronecker symbol (x/y).
>
> Peter
>
> --
> 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