[seqfan] Re: A174695 keyword sign

David Radcliffe dradcliffe at gmail.com
Sat May 4 06:59:52 CEST 2019


It seems to me that the first negative value of A174695(n) occurs when
n=23338590791, which is one less than the value reported elsewhere.
(The nth prime is 608981813017.)

Here is my Python 3 code. The calculation took about three hours.

import primesieve

def search(n_max, needle):
    it = primesieve.Iterator()
    p = it.next_prime()
    p = it.next_prime()
    n = 2
    a = 0
    while p < n_max and a != needle:
        p = it.next_prime()
        n += 1
        a += (1 if p % 6 == 5 else -1)
    print('A174685(%d) = %d' % (n, a))
    print('  Prime(%d) = %d' % (n, p))

search(10**12, -1)


On Fri, May 3, 2019 at 7:48 AM David Seal <david.j.seal at gwynmop.com> wrote:

> Fairly minor, but according to that comment A174695(n) = A112632(n)-1, and
> A112632 says it first goes negative at n=23338590792. So going as far as
> n=23338590791 will be enough to find a negative value of A174695, but one
> might only need to go considerably less far if A112632 first visits 0 long
> before it first visits -1.
>
> On 03 May 2019 at 01:39 israel at math.ubc.ca wrote:
> >
> >
> > Did you not notice the comment by M. F. Hasler?  You need to go more
> than a
> > little further, to somewhere around 608981813029.
> >
> >
> >
> > On May 2 2019, David Rabahy wrote:
> >
> > >Per http://oeis.org/wiki/Keywords, the keyword "sign" is described as
> > >"Sequence contains negative numbers."  Does A174695, in fact, contain
> any
> > >negative numbers?  I've checked through the first 100,000 primes and it
> > >doesn't go negative in that range; perhaps I need to go a little
> further?
> > >
> > >
> > >--
> > >Seqfan Mailing list - http://list.seqfan.eu/
> > >
> > >
> >
> > --
> > Seqfan Mailing list - http://list.seqfan.eu/
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>



More information about the SeqFan mailing list