# [seqfan] Re: Close sequences again

Christopher Gribble chris.eveswell at virgin.net
Wed Oct 21 14:29:30 CEST 2009

```Thanks for that.  I had forgotten that the constraint n >= 3 was required.

Chris

-----Original Message-----
From: seqfan-bounces at list.seqfan.eu [mailto:seqfan-bounces at list.seqfan.eu]
On Behalf Of Michael Porter
Sent: 20 October 2009 20:04
To: Sequence Fanatics Discussion list
Subject: [seqfan] Re: Close sequences again

I was actually thinking of the first expression:

> (Sum of the quadratic non-residues of prime(n) - Sum of the quadratic
> residues of prime(n)) / prime(n)

n=1
prime(n)=2
sum of non-residues=0 (A)
sum of residues=1 (B)
(A-B) / prime(n) = -1/2

n=2

prime(n)=3

sum of non-residues=2 (A)

sum of residues=1 (B)

(A-B) / prime(n) = 1/3

- Michael

--- On Tue, 10/20/09, Christopher Gribble <chris.eveswell at virgin.net> wrote:

From: Christopher Gribble <chris.eveswell at virgin.net>
Subject: [seqfan] Re: Close sequences again
To: "'Sequence Fanatics Discussion list'" <seqfan at list.seqfan.eu>
Date: Tuesday, October 20, 2009, 2:50 AM

Michael,

Looks like my plain text table got garbled, so I'll try again:

n                                1
prime(n)                            2
floor(j^2/prime(n)), j=1                0
sum(floor(j^2/prime(n))), j=1:prime(n)-1)    (A)    0
floor((prime(n)-2)(prime(n)-1)/3)        (B)    0
A-B                                0

n                                2
prime(n)                            3
floor(j^2/prime(n)), j=1                0
floor(j^2/prime(n)), j=2                1
sum(floor(j^2/prime(n))), j=1:prime(n)-1)    (A)    1
floor((prime(n)-2)(prime(n)-1)/3)        (B)    0
A-B                                1

Chris

-----Original Message-----
From: seqfan-bounces at list.seqfan.eu [mailto:seqfan-bounces at list.seqfan.eu]
On Behalf Of Michael Porter
Sent: 20 October 2009 09:12
To: Sequence Fanatics Discussion list
Subject: [seqfan] Re: Close sequences again

> (Sum of the quadratic non-residues of prime(n) - Sum of the quadratic

> residues of prime(n)) / prime(n).  I discovered that this was equivalent
to

> (sum ( floor  (j^2 / prime(n))), j = 1:prime(n) - 1) - floor ((prime(n) -

> 2)(prime(n) - 1) / 3) and that this could be extended to the naturals.

That seems like a non-trivial result, so I'm glad to see you have already
added it to OEIS (A165951).  But for a(1) and a(2), prime(n)=2 and 3, the
expression evaluates to -1/2 and 1/3, right?

> A166128
> A166129
> A166130
> A166468

A166468 is the one we were discussing earlier, and if I read it correctly,
A166128 is just prime(n)-1 with a(1) set to 0, so a similar argument
applies.  I can't seem to get to A166129 and A166130.
- Michael

_______________________________________________

Seqfan Mailing list - http://list.seqfan.eu/

_______________________________________________

Seqfan Mailing list - http://list.seqfan.eu/

_______________________________________________

Seqfan Mailing list - http://list.seqfan.eu/

```