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.

Previous Showing 11-11 of 11 results.

A306493 a(n) is the least number such that the n-th prime is the least coprime quadratic nonresidue modulo a(n).

Original entry on oeis.org

3, 4, 6, 22, 118, 479, 262, 3622, 5878, 18191, 24022, 132982, 296278, 366791, 1289738, 4539478, 6924458, 13620602, 32290442, 175244281, 86060762, 326769242, 131486759, 84286438, 937435558
Offset: 1

Views

Author

Jianing Song, Feb 19 2019

Keywords

Comments

Different from A000229 because here the non-coprime quadratic nonresidues are ignored. For example, a(2) = 4 because although 2 is a quadratic nonresidue modulo 4, it is not coprime to 4.

Examples

			For k = 118 we have: 2 is not coprime to 118, 11^2 == 3 (mod 118), 51^2 == 5 (mod 118), 19^2 == 7 (mod 118) and 11 is a quadratic nonresidue modulo 118. For all k < 118, at least one of 2, 3, 5, 7 is coprime quadratic nonresidue modulo k, so a(5) = 118.
		

Crossrefs

Cf. A000229.

Programs

  • PARI
    b(p,k) = gcd(p,k)==1&&!issquare(Mod(p,k))
    a(n) = my(k=1); while(sum(i=1,n-1,b(prime(i),k))!=0 || !b(prime(n),k), k++); k

Extensions

a(17)-a(23) from Daniel Suteu, Feb 24 2019
a(24)-a(25) from Jinyuan Wang, Mar 08 2019
Previous Showing 11-11 of 11 results.