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.

Showing 1-4 of 4 results.

A260946 Least positive integer k < prime(n) such that i^2 + j^2 = k^2 for some 0 < i < j with i*j*k a primitive root modulo prime(n), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 0, 0, 10, 0, 15, 5, 5, 5, 0, 17, 5, 15, 5, 10, 10, 26, 10, 17, 5, 5, 5, 5, 5, 13, 15, 5, 10, 15, 15, 10, 13, 13, 5, 17, 5, 10, 5, 10, 10, 10, 25, 61, 10, 13, 17, 25, 5, 50, 15, 13, 17, 10, 15, 5, 5, 10, 17, 10, 26, 10, 10, 17, 5, 10, 5, 5, 5, 13
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 05 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 11. In other words, for any prime p > 31 there are a,b,c among 1,...,p-1 with a^2 + b^2 = c^2 such that a*b*c is a primitive root modulo p.

Examples

			 a(5) = 10 since 10^2 = 6^2 + 8^2, and 6*8*10 = 480 is a primitive root modulo prime(5) = 11.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    Dv[n_]:=Divisors[Prime[n]-1]
    Do[Do[If[SQ[k^2-j^2]==False, Goto[aa]];Do[If[Mod[(Sqrt[k^2-j^2]j*k)^(Part[Dv[n],t]),Prime[n]]==1,Goto[aa]];Continue,{t,1,Length[Dv[n]]-1}];Print[n," ",k];Goto[bb];Label[aa];Continue,{k,1,Prime[n]-1},{j,1,k-1}];Print[n," ",0];Label[bb];Continue,{n,1,70}]

A260960 Least positive integer k < prime(n) such that there are 0 < i < j with i^2 + j^2 = k^2 for which (i*j)/2 is a primitive root modulo prime(n), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 0, 0, 5, 5, 5, 17, 13, 17, 10, 10, 5, 13, 13, 25, 5, 5, 39, 25, 17, 5, 5, 5, 17, 29, 5, 5, 5, 5, 5, 5, 5, 34, 17, 5, 5, 26, 13, 13, 5, 10, 29, 13, 13, 5, 34, 5, 5, 5, 5, 25, 25, 5, 5, 13, 17, 5, 5, 10, 29, 13, 13, 61, 17, 13, 17, 17, 5, 13
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 06 2015

Keywords

Comments

Conjecture: a(n) > 0 for any n > 4. In other words, for any prime p > 7, there exists a right triangle whose three sides are among 1,...,p-1 and whose area is a primitive root modulo p.
We have verified this for primes p < 10^5.
We also conjecture that for any prime p > 31, there exists a right triangle whose three sides are among 1,...,p-1, and whose perimeter and area are quadratic residues modulo p.

Examples

			a(7) = 5 since 3^2 + 4^2 = 5^2, and (3*4)/2 = 6 is a primitive root modulo prime(7) = 17.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    Dv[n_]:=Divisors[Prime[n]-1]
    Do[Do[Do[If[SQ[k^2-j^2]==False, Goto[cc]];Do[If[Mod[(j*Sqrt[k^2-j^2]/2)^(Part[Dv[n],t]),Prime[n]]==1,Goto[cc]];Continue,{t,1,Length[Dv[n]]-1}];
    Print[n," ",k];Goto[aa];Label[cc];Continue,{j,1,k-1}];Label[dd];Continue,{k,1,Prime[n]-1}];Print[n," ",0];Label[aa];Continue,{n,1,70}]

A344620 Primes p such that there is no positive integer a with 2*a, a^2-1 and a^2+1 not only smaller than p but also quadratic residues modulo p.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 79, 89, 97, 101, 113, 151, 173, 281, 283, 313, 461, 739, 827
Offset: 1

Views

Author

Zhi-Wei Sun, May 24 2021

Keywords

Comments

No more terms below 10^10. For any prime p > 11, one of 1^1+1 = 2, 2^2+1 = 5 and 3^2+1 = 10 is a quadratic residue modulo p.
Conjecture: No term is greater than 827. In other words, for any prime p > 828, there is a Pythagorean triple (2*a, a^2-1, a^2+1) with 2*a, a^2-1 and a^2+1 in the set {0 < r < p: r is a quadratic residue modulo p}.
See also A344621 for a similar conjecture.

Examples

			a(5) = 13. The prime 11 is not a term since 2*2 = 4, 2^2-1 = 3 and 2^2+1 = 5 belong to the set {0 < r < 11: r is a quadratic residue modulo 11} = {1, 3, 4, 5, 9}.
		

Crossrefs

Programs

  • Mathematica
    tab={}; Do[p:=p=Prime[k]; Do[If[p>2&&JacobiSymbol[2a,p]==1&&JacobiSymbol[a^2-1,p]==1&&JacobiSymbol[a^2+1,p]==1,Goto[aa]],{a,1,Sqrt[p-2]}]; tab=Append[tab,p];Label[aa],{k,1,150}]; Print[tab]

A344621 Primes p such that there is no positive integer a with 2*a, a^2-1 and a^2+1 not only smaller than p but also quadratic nonresidues modulo p.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 19, 23, 31, 41, 43, 47, 67, 71, 73, 97, 101, 127, 151, 157, 167, 191, 199, 239, 257, 311, 313, 367, 409, 439, 479, 521, 587, 599, 739, 839, 887, 1031, 1063, 1151, 1319, 2351, 2999, 3119
Offset: 1

Views

Author

Zhi-Wei Sun, May 24 2021

Keywords

Comments

No more terms below 10^10.
Conjecture: No term is greater than 3119. In other words, for any prime p > 3120, there is a Pythagorean triple (2*a,a^2-1,a^2+1) with 2*a, a^2-1 and a^2+1 in the set {0 < r < p: r is a quadratic nonresidue modulo p}.
See also A344620 for a similar conjecture.

Examples

			a(5) = 13. The prime 11 is not a term since 2*3 = 6, 3^2-1 = 8 and 3^2+1 = 10 belong to the set {0 < r < 11: r is a quadratic nonresidue modulo 11} = {2, 6, 7, 8, 10}.
		

Crossrefs

Programs

  • Mathematica
    tab={};Do[p:=p=Prime[k];Do[If[JacobiSymbol[2a,p]==-1&&JacobiSymbol[a^2-1,p]==-1&&JacobiSymbol[a^2+1,p]==-1,Goto[aa]],{a,1,Sqrt[p-2]}];tab=Append[tab,p];Label[aa],{k,1,450}];Print[tab]
Showing 1-4 of 4 results.