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-10 of 13 results. Next

A001984 Erroneous version of A045535.

Original entry on oeis.org

7, 23, 71, 311, 479, 1559, 5711, 10559, 18191, 31391, 307271, 366791, 366791, 2155919
Offset: 1

Views

Author

Keywords

A002223 Smallest prime p of form p = 8k-1 such that first n primes (p_1=2, ..., p_n) are quadratic residues mod p.

Original entry on oeis.org

7, 23, 71, 311, 479, 1559, 5711, 10559, 18191, 31391, 366791, 366791, 366791, 4080359, 12537719, 30706079, 36415991, 82636319, 120293879, 120293879, 131486759, 131486759, 2929911599, 2929911599, 7979490791, 33857579279
Offset: 1

Views

Author

Keywords

Examples

			12^2 = 2 mod 71, 28^2 = 3 mod 71, 17^2 = 5 mod 71.
		

References

  • N. D. Bronson and D. A. Buell, Congruential sieves on FPGA computers, pp. 547-551 of Mathematics of Computation 1943-1993 (Vancouver, 1993), Proc. Symp. Appl. Math., Vol. 48, Amer. Math. Soc. 1994.
  • D. H. Lehmer, E. Lehmer and D. Shanks, Integer sequences having prescribed quadratic character, Math. Comp., 24 (1970), 433-451.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. E. Western and J. C. P. Miller, Tables of Indices and Primitive Roots. Royal Society Mathematical Tables, Vol. 9, Cambridge Univ. Press, 1968, p. XV.

Crossrefs

Programs

  • Mathematica
    np[] := While[p = NextPrime[p]; Mod[p, 8] != 7]; p = 2; A002223 = {}; pp = {2}; np[]; While[ Length[A002223] < 26, If[Union[ JacobiSymbol[#, p] &[pp]] === {1}, AppendTo[pp, NextPrime[Last[pp]]]; Print[p]; AppendTo[A002223, p], np[]]]; A002223 (* Jean-François Alcover, Sep 09 2011 *)

Extensions

The Bronson-Buell reference gives terms through 227.
More terms from Don Reble, Sep 19 2001

A002189 Pseudo-squares: a(n) = the least nonsquare positive integer which is 1 mod 8 and is a (nonzero) quadratic residue modulo the first n odd primes.

Original entry on oeis.org

17, 73, 241, 1009, 2641, 8089, 18001, 53881, 87481, 117049, 515761, 1083289, 3206641, 3818929, 9257329, 22000801, 48473881, 48473881, 175244281, 427733329, 427733329, 898716289, 2805544681, 2805544681, 2805544681
Offset: 0

Views

Author

Keywords

Comments

To save the reader's time, note that the 1965 article by Atkin does not appear to be related to this sequence. - N. J. A. Sloane, May 10 2025

Examples

			a(0) = 17 since 1 + 8*0 and 1 + 8*1 are squares, 17 = 1 + 8*2 is not and the quadratic residue condition is satisfied vacuosly. - _Michael Somos_, Nov 24 2018
		

References

  • A. O. L. Atkin, On pseudo-squares, Proc. London Math. Soc., 14A (1965), 22-27.(See comment above)
  • Michael A. Bender, R Chowdhury, A Conway, The I/O Complexity of Computing Prime Tables, In: Kranakis E., Navarro G., Chávez E. (eds) LATIN 2016: Theoretical Informatics. LATIN 2016. Lecture Notes in Computer Science, vol 9644. Springer, Berlin, Heidelberg. See Footnote 9.
  • D. H. Lehmer, A sieve problem on "pseudo-squares", Math. Tables Other Aids Comp., 8 (1954), 241-242.
  • D. H. Lehmer, E. Lehmer and D. Shanks, Integer sequences having prescribed quadratic character, Math. Comp., 24 (1970), 433-451.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence in two entries, N2175 and N2326.).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • H. C. Williams and Jeffrey Shallit, Factoring integers before computers, pp. 481-531 of Mathematics of Computation 1943-1993 (Vancouver, 1993), Proc. Symp. Appl. Math., Vol. 48, Amer. Math. Soc. 1994.
  • Kjell Wooding and H. C. Williams, "Doubly-focused enumeration of pseudosquares and pseudocubes". Proceedings of the 7th International Algorithmic Number Theory Symposium (ANTS VII, 2006).

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = (pp = Prime[ Range[2, n+1]]; k = If[ n == 0, 9, a[n-1] - 8]; While[ True, k += 8; If[ ! IntegerQ[ Sqrt[k]] && If[ Scan[ If[ ! (JacobiSymbol[k, #] == 1 ), Return[ False]] & , pp], , False, True], Break[]]]; k); Table[ Print[ an = a[n]]; an, {n, 0, 24}] (* Jean-François Alcover, Sep 30 2011 *)
    a[ n_] := If[ n < 0, 0, Module[{k = If[ n == 0, 9, a[n - 1] - 8]}, While[ True, If[! IntegerQ[Sqrt[k += 8]] && Do[ If[ JacobiSymbol[k, Prime[i]] != 1, Return @ 0], {i, 2, n + 1}] =!= 0, Return @ k]]]]; (* Michael Somos, Nov 24 2018 *)
  • PARI
    a(n)=n=prime(n+1);for(s=4,1e9,forstep(k=(s^2+7)>>3<<3+1, s^2+2*s, 8, forprime(p=3, n, if(kronecker(k,p)<1,next(2)));return(k))) \\ Charles R Greathouse IV, Mar 29 2012

Extensions

The PSAM reference gives a table through p = 223 (the b-file here has many more terms).
More terms from Don Reble, Nov 14 2006
Additional references from Charles R Greathouse IV, Oct 13 2008

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

Original entry on oeis.org

3, 7, 23, 71, 311, 479, 1559, 5711, 10559, 18191, 31391, 422231, 701399, 366791, 3818929, 9257329, 22000801, 36415991, 48473881, 175244281, 120293879, 427733329, 131486759, 3389934071, 2929911599, 7979490791, 36504256799, 23616331489, 89206899239, 121560956039
Offset: 1

Views

Author

Keywords

Comments

Note that a(n) is always a prime q > prime(n).
For n > 1, a(n) = prime(k), where k is the smallest number such that A053760(k) = prime(n).
One could make a case for setting a(1) = 2, but a(1) = 3 seems more in keeping with the spirit of the sequence.
a(n) is the smallest odd prime q such that prime(n)^((q-1)/2) == -1 (mod q) and b^((q-1)/2) == 1 (mod q) for every natural base b < prime(n). - Thomas Ordowski, May 02 2019

Examples

			a(2) = 7 because the second prime is 3 and 3 is the least quadratic nonresidue modulo 7, 14, 17, 31, 34, ... and 7 is the least of these.
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A020649, A025021, A053760, A307809. For records see A133435.
Differs from A002223, A045535 at 12th term.

Programs

  • Mathematica
    leastNonRes[p_] := For[q = 2, True, q = NextPrime[q], If[JacobiSymbol[q, p] != 1, Return[q]]]; a[1] = 3; a[n_] := For[pn = Prime[n]; k = 1, True, k++, an = Prime[k]; If[pn == leastNonRes[an], Print[n, " ", an];  Return[an]]]; Array[a, 20] (* Jean-François Alcover, Nov 28 2015 *)

Extensions

Definition corrected by Melvin J. Knight (MELVIN.KNIGHT(AT)ITT.COM), Dec 08 2006
Name edited by Thomas Ordowski, May 02 2019

A147971 Indices of the records in the sequence of smallest positive quadratic nonresidues (A053760).

Original entry on oeis.org

1, 4, 9, 20, 64, 92, 246, 752, 1289, 2084, 3383, 31284, 271259, 618525, 1389315, 2228197, 2914847, 6857528, 7457772, 141236709, 366883983, 1034128714, 3690981956, 4965932454, 7863515482, 19824941433, 195348751601, 292557888940, 2296552237422
Offset: 1

Views

Author

Max Alekseyev, Nov 18 2008

Keywords

Comments

The corresponding primes are listed in A147970.

Crossrefs

Formula

Positive integer n is in this sequence iff A053760(k) < A053760(n) for every k

Extensions

a(20)-a(29) from Charles R Greathouse IV, Apr 06 2012

A062241 Smallest integer >= 2 that is not the sum of 2 positive integers whose prime factors are all <= p(n), the n-th prime.

Original entry on oeis.org

3, 7, 23, 71, 311, 479, 1559, 5711, 10559, 18191, 31391, 118271, 366791, 366791, 2155919, 2155919, 2155919, 6077111, 6077111, 98538359, 120293879, 131486759, 131486759, 508095719, 2570169839, 2570169839, 2570169839, 2570169839, 2570169839, 2570169839
Offset: 0

Author

Richard C. Schroeppel, Jun 27 2001

Keywords

Comments

Here we are taking 1 to be the zeroth prime.
a(30) > 2570169839. - Donovan Johnson, Aug 31 2010

Examples

			a(1): 2=1+1, 3=1+2, 4=2+2, 5=1+4, 6=2+4, but 7 cannot be written as the sum of two positive integers whose prime factors are all <= 2, so a(1) = 7. a(2): 7=3+4, 8=4+4, 9=1+8, ..., 22=4+18, but 23 cannot be so written, so a(2) = 23.
		

References

Crossrefs

So far it agrees with A045535. Is this a coincidence or a theorem?

Extensions

More terms from Jud McCranie, Nov 01 2001
a(23)-a(29) from Donovan Johnson, Aug 31 2010

A147969 Smallest prime p modulo which numbers 1,2,...,n are quadratic residues.

Original entry on oeis.org

2, 7, 23, 23, 71, 71, 311, 311, 311, 311, 479, 479, 1559, 1559, 1559, 1559, 5711, 5711, 10559, 10559, 10559, 10559, 18191, 18191, 18191, 18191, 18191, 18191, 31391, 31391, 366791, 366791, 366791, 366791, 366791, 366791, 366791, 366791, 366791
Offset: 1

Author

Max Alekseyev, Nov 18 2008

Keywords

Comments

The same primes without repetitions are listed in A147970.

Programs

  • PARI
    a(n)=forprime(p=2,default(primelimit),forprime(i=2,n, if(kronecker(i,p)<1,next(2)));return(p)) \\ Charles R Greathouse IV, Apr 06 2012

A147970 Primes corresponding to the records in the sequence of smallest positive quadratic nonresidues (A053760).

Original entry on oeis.org

2, 7, 23, 71, 311, 479, 1559, 5711, 10559, 18191, 31391, 366791, 3818929, 9257329, 22000801, 36415991, 48473881, 120293879, 131486759, 2929911599, 7979490791, 23616331489, 89206899239, 121560956039, 196265095009, 513928659191, 5528920734431, 8402847753431, 70864718555231
Offset: 1

Author

Max Alekseyev, Nov 18 2008

Keywords

Formula

Prime p=A000040(n) is in this sequence iff A053760(k) < A053760(n) for every kA000040(A147971(n))

Extensions

a(20)-a(29) from Charles R Greathouse IV, Apr 06 2012

A147972 Smallest prime p modulo which the first n primes are nonzero quadratic residues.

Original entry on oeis.org

7, 23, 71, 311, 479, 1559, 5711, 10559, 18191, 31391, 366791, 366791, 366791, 3818929, 9257329, 22000801, 36415991, 48473881, 120293879, 120293879, 131486759, 131486759, 2929911599, 2929911599, 7979490791, 23616331489, 23616331489, 89206899239, 121560956039, 196265095009, 196265095009, 513928659191, 5528920734431, 8402847753431, 8402847753431, 8402847753431, 70864718555231
Offset: 1

Author

Max Alekseyev, Nov 18 2008

Keywords

Comments

The same primes without repetitions are listed in A147970.
a(n) <= min{A002223(n), A002224(n)}. What is the smallest n for which this inequality is strict?
By definition, a(n) == 1, 7 (mod 8), so a(n) = min{A002223(n), A002224(n)}. - Jianing Song, Feb 18 2019

Crossrefs

Smallest prime p such that each of the first n primes has q q-th roots mod p: this sequence (q=2), A002225 (q=3), A002226 (q=5), A002227 (q=7), A002228 (q=11), A060363 (q=13), A060364 (q=17).

Programs

  • Mathematica
    (*version 7.0*)m=1;P=7;Lst={p};While[m<25,m++;S=Prime[Range[m]];While[MemberQ[JacobiSymbol[S,p],-1],p=NextPrime[p]];Lst=Append[Lst,P]];Lst (* Emmanuel Vantieghem, Jan 31 2012 *)
  • PARI
    t=2;forprime(p=2,1e9,forprime(q=2,t,if(kronecker(q,p)<1,next(2)));print1(p", ");t=nextprime(t+1);p--) \\ Charles R Greathouse IV, Jan 31 2012

Formula

a(n) >= min{A002189(n-1), A045535(n-1)}. - Jianing Song, Feb 18 2019

Extensions

a(23)-a(25) from Emmanuel Vantieghem, Jan 31 2012
a(26)-a(37) from Max Alekseyev, Aug 21 2015

A112084 Column 2 of A112070.

Original entry on oeis.org

5, 9, 25, 71, 311, 479, 1559, 5711, 10559, 18191, 31391, 118271, 701399, 366791, 2704679, 2954591, 2155919, 13845841, 6077111, 25411681, 28398241
Offset: 1

Author

Antti Karttunen, Aug 28 2005

Keywords

Comments

Note the subsequence equal to the portion of A045535 / A062241 and also the non-monotone drops present, like the one from a(13)=701399 to a(14)=366791.
An independent recomputation with another software, e.g. Mathematica, would be welcome.

Crossrefs

Row 2 of A112071. a(n) = A005408(A112083(n)).
Showing 1-10 of 13 results. Next