cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A319480 Number of ordered pairs (i,j) with 0 < i < j < prime(n)/2 such that R(i^2,prime(n)) > R(j^2,prime(n)), where R(k,p) (with p an odd prime and k an integer) denotes the unique integer r among 0,1,...,(p-1)/2 for which k is congruent to r or -r modulo p.

Original entry on oeis.org

0, 0, 1, 3, 7, 10, 14, 19, 41, 42, 74, 79, 85, 100, 154, 163, 207, 224, 245, 309, 318, 342, 449, 536, 590, 553, 581, 715, 738, 856, 912, 1085, 1037, 1324, 1229, 1477, 1442, 1491, 1785, 1730, 1952, 1986, 2240, 2316, 2191, 2474, 2748, 2836, 3176
Offset: 2

Views

Author

Zhi-Wei Sun, Sep 20 2018

Keywords

Comments

Conjecture: Let p be any odd prime and let N(p) be the number of ordered pairs (i,j) with 0 < i < j < p/2 and R(i^2,p) > R(j^2,p). Then N(p) == floor((p+1)/8) (mod 2).
See also A319311 for a similar conjecture.

Examples

			a(3) = 0 since prime(3) = 5 and R(1^2,5) = 1 = R(2^2,5).
a(4) = 1 since prime(4) = 7, R(1^2,7) = 1 < R(2^2,7) = 3, R(1^2,7) < R(3^2,7) = 2, and R(2^2,7) = 3 > R(3^2,7) = 2.
		

Crossrefs

Programs

  • Mathematica
    R[k_,p_]:=R[k,p]=Abs[Mod[k,p,-p/2]];
    t[p_]:=t[p]=Sum[Boole[R[i^2,p]>R[j^2,p]],{j,2,(p-1)/2},{i,1,j-1}]; Table[t[Prime[n]],{n,2,50}]