# Parity of p(p+1)/2 for nth prime p

Richard Guy rkg at cpsc.ucalgary.ca
Fri Sep 10 20:36:49 CEST 2004

```Equivalence of last two is noted at each place.

As for the first,  p(p+1)/2 is even or odd
according as p = -1 or 1 mod 4, and  p = 2n-1
is such a prime according as  n  is even or odd
respectively.

It is also known, at least to some algebraic
number theorists, that the period length of
the c.f.e. of root p is even or odd according
as p = -1 or 1 --- connected with solvability
of the Bhaskara equation  x^2 - py^2 = -1.

Proof of middle one left to the reader.   R.

On Fri, 10 Sep 2004, Richard Guy wrote:

> Where angels fear to tread ...
>
> Surely this must be the Law of Small Numbers?
>
> I only checked a few values --- how far has
> it been checked?  More terms are easily
> calculated by almost anyone but me.  Perhaps
> someone has already gone far enough ... ?
>
> [just a faint chance that A034933 = A082749
> mod 2  is true ?]   R.
>
> On Fri, 10 Sep 2004, JEREMY GARDINER wrote:
>
>>
>> The following sequences (allowing offset of first term)
>> all appear to have the same parity:
>>
>> A034953 Triangular numbers with prime indices
>> A054269 Length of period of continued fraction for
>> sqrt(p), p prime
>> A082749 Difference between the sum of next prime(n)
>> natural numbers and the sum of next n primes
>> A006254 Numbers n such that 2n-1 is prime
>> A067076 2n+3 is a prime
>>
>> Jeremy Gardiner
>>
>

```