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 16 results. Next

A017077 a(n) = 8*n + 1.

Original entry on oeis.org

1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97, 105, 113, 121, 129, 137, 145, 153, 161, 169, 177, 185, 193, 201, 209, 217, 225, 233, 241, 249, 257, 265, 273, 281, 289, 297, 305, 313, 321, 329, 337, 345, 353, 361, 369, 377, 385, 393, 401, 409, 417, 425, 433
Offset: 0

Views

Author

Keywords

Comments

Cf. A007519 (primes), subsequence of A047522.
a(n-1), n >= 1, gives the first column of the triangle A238475 related to the Collatz problem. - Wolfdieter Lang, Mar 12 2014
First differences of A054552. - Wesley Ivan Hurt, Jul 08 2014
An odd number is congruent to a perfect square modulo every power of 2 iff it is in this sequence. Sketch of proof: Suppose the modulus is 2^k with k at least three and note that the only odd quadratic residue (mod 8) is 1. By application of difference of squares and the fact that gcd(x-y,x+y)=2 we can show that for odd x,y, we have x^2 and y^2 congruent mod 2^k iff x is congruent to one of y, 2^(k-1)-y, 2^(k-1)+y, 2^k-y. Now when we "lift" to (mod 2^(k+1)) we see that the degeneracy between a^2 and (2^(k-1)-a)^2 "breaks" to give a^2 and a^2-2^ka+2^(2k-2). Since a is odd, the latter is congruent to a^2+2^k (mod 2^(k+1)). Hence we can form every binary number that ends with '001' by starting modulo 8 and "lifting" while adding digits as necessary. But this sequence is exactly the set of binary numbers ending in '001', so our claim is proved. - Rafay A. Ashary, Oct 23 2016
For n > 3, also the number of (not necessarily maximal) cliques in the n-antiprism graph. - Eric W. Weisstein, Nov 29 2017
Bisection of A016813. - L. Edson Jeffery, Apr 26 2022

Examples

			Illustration of initial terms:
.                                          o       o       o
.                          o     o     o     o     o     o
.              o   o   o     o   o   o         o   o   o
.      o o o     o o o         o o o             o o o
.  o   o o o   o o o o o   o o o o o o o   o o o o o o o o o
.      o o o     o o o         o o o             o o o
.              o   o   o     o   o   o         o   o   o
.                          o     o     o     o     o     o
.                                          o       o       o
--------------------------------------------------------------
.  1       9          17              25                  33
- _Bruno Berselli_, Feb 28 2014
		

Crossrefs

Cf. A002189 (subsequence), A004768, A007519, A010731 (first differences), A016813, A047522, A054552.
Column 1 of A093565. Column 5 of triangle A130154. Second leftmost column of triangle A281334.
Row 1 of the arrays A081582, A238475, A371095, and A371096.
Row 2 of A257852.
Apart from the initial term, row sums of triangle A278480.

Programs

Formula

G.f.: (1+7*x)/(1-x)^2.
a(n+1) = A004768(n). - R. J. Mathar, May 28 2008
a(n) = 2*a(n-1) - a(n-2). - Vincenzo Librandi, Mar 14 2014
E.g.f.: exp(x)*(1 + 8*x). - Stefano Spezia, May 13 2021
From Elmo R. Oliveira, Apr 10 2025: (Start)
a(n) = a(n-1) + 8 with a(0)=1.
a(n) = A016813(2*n). (End)

A045535 Least negative pseudosquare modulo the first n odd primes.

Original entry on oeis.org

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, 328878692999, 328878692999, 513928659191, 844276851239
Offset: 0

Views

Author

Keywords

Comments

a(n) is the smallest positive integer m such that m == 7 (mod 8) and for the first n odd primes p, -m is a (nonzero) quadratic residue mod p.

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.
  • 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

Programs

  • PARI
    {A045535 = (n,m=7)->until(!m+=8,for(i=2,n+1,m%prime(i)||next(2);issquare(Mod(-m,prime(i)))||next(2));return(m))} \\ Starting value (e.g., a(n-1); must be in 7+8Z) may be given as 2nd arg. - M. F. Hasler, Oct 24 2013

Extensions

The Bronson-Buell reference gives terms through 227. The Math. Comp. version is erroneous.
Edited by Don Reble, Nov 14 2006
Corrected link to OEIS index, following a remark by Don Reble. Values a(0..21) double-checked. - M. F. Hasler, Oct 24 2013
a(27)-a(28) from Jinyuan Wang, Mar 24 2020
More terms from Bert Dobbelaere, Feb 28 2021

A002224 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

17, 73, 241, 1009, 2689, 8089, 33049, 53881, 87481, 483289, 515761, 1083289, 3818929, 3818929, 9257329, 22000801, 48473881, 48473881, 175244281, 427733329, 427733329, 898716289, 8114538721, 9176747449, 23616331489, 23616331489, 23616331489, 196265095009, 196265095009, 196265095009, 196265095009, 2871842842801, 2871842842801, 2871842842801, 26437680473689
Offset: 1

Views

Author

Keywords

Examples

			32^2 = 2 mod 73, 21^2 = 3 mod 73.
		

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).
  • 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
    f[n_] := Block[{k = 2}, While[JacobiSymbol[n, Prime[k]] == 1, k++ ]; Prime[k]] (* Robert G. Wilson v *)
    np[] := While[p = NextPrime[p]; Mod[p, 8] != 1]; p = 2; A002224 = {}; pp = {2}; np[]; While[Length[A002224] < 25, If[Union[JacobiSymbol[#, p] &[pp]] === {1}, AppendTo[pp, NextPrime[Last[pp]]]; Print[p]; AppendTo[A002224, p], np[]]]; A002224 (* Jean-François Alcover, Sep 09 2011 *)
  • PARI
    a(n,startAt=17)=my(v=primes(n)); forprime(p=startAt,, if(p%8>1, next); for(i=1,n, if(kronecker(v[i],p)<1, next(2))); return(p)) \\ Charles R Greathouse IV, Jun 26 2017

Extensions

More terms from Don Reble, Sep 19 2001
More terms from Mike Oakes, Nov 28 2022

A001986 Let p be the n-th odd prime. Then a(n) is the least prime congruent to 3 modulo 8 such that Legendre(-a(n), q) = -1 for all odd primes q <= p.

Original entry on oeis.org

19, 43, 43, 67, 67, 163, 163, 163, 163, 163, 163, 222643, 1333963, 1333963, 2404147, 2404147, 20950603, 51599563, 51599563, 96295483, 96295483, 146161723, 1408126003, 3341091163, 3341091163, 3341091163, 52947440683, 52947440683, 52947440683, 193310265163
Offset: 1

Views

Author

Keywords

Comments

Numbers so far are all congruent to 19 mod 24. - Ralf Stephan, Jul 07 2003
All terms are congruent to 19 mod 24. - Jianing Song, Feb 17 2019
Also a(n) is the least prime r congruent to 3 mod 8 such that the first n odd primes are quadratic nonresidues modulo r. Note that r == 3 (mod 8) implies 2 is a quadratic nonresidue modulo r. See A001992 for the case where r == 5 (mod 8). - Jianing Song, Feb 19 2019

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. A001992 (the congruent to 5 mod 8 case), A094851, A094852, A094853.
See A094841, A094842, A094843, A094844 for the case where the terms are not restricted to the primes.

Programs

  • PARI
    isok(p, oddpn) = {forprime(q=3, oddpn, if (kronecker(-p, q) != -1, return (0));); return (1);}
    a(n) = {my(oddpn = prime(n+1)); forprime(p=3, , if ((p%8) == 3, if (isok(p, oddpn), return (p));););} \\ Michel Marcus, Oct 17 2017

Extensions

Revised by N. J. A. Sloane, Jun 14 2004
a(28)-a(30) from Jinyuan Wang, Apr 09 2020

A001992 Let p = n-th odd prime. Then a(n) = least prime congruent to 5 modulo 8 such that Legendre(a(n), q) = -1 for all odd primes q <= p.

Original entry on oeis.org

5, 53, 173, 173, 293, 2477, 9173, 9173, 61613, 74093, 74093, 74093, 170957, 360293, 679733, 2004917, 2004917, 69009533, 138473837, 237536213, 384479933, 883597853, 1728061733, 1728061733, 1728061733, 1728061733
Offset: 1

Views

Author

Keywords

Comments

All terms are congruent to 5 mod 24. - Jianing Song, Feb 17 2019
Also a(n) is the least prime r congruent to 5 mod 8 such that the first n odd primes are quadratic nonresidues modulo r. Note that r == 5 (mod 8) implies 2 is a quadratic nonresidue modulo r. See A001986 for the case where r == 3 (mod 8). - Jianing Song, Feb 19 2019

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. A001986 (the congruent to 3 mod 8 case), A001987, A094845, A094846.
See A094847, A094848, A094849, A094850 for the case where the terms are not restricted to the primes.

Programs

  • PARI
    isok(p, oddpn) = {forprime(q=3, oddpn, if (kronecker(p, q) != -1, return (0));); return (1);}
    a(n) = {my(oddpn = prime(n+1)); forprime(p=3, , if ((p%8) == 5, if (isok(p, oddpn), return (p));););} \\ Michel Marcus, Oct 17 2017

Extensions

Corrected and extended by N. J. A. Sloane, Jun 14 2004

A001987 Class numbers associated with terms of A001986.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 33, 79, 79, 107, 107, 311, 487, 487, 665, 665, 857, 2293, 3523, 3523, 3523, 13909, 13909, 13909, 26713, 29351, 29351, 59801, 70877, 70877, 70877, 70877, 296475, 296475, 296475, 296475, 3201195
Offset: 1

Views

Author

Keywords

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. A001986, A094846. See also A094842, A094851.

Extensions

Revised by N. J. A. Sloane, Jun 14 2004

A001988 Let p be the n-th odd prime. a(n) is the least prime congruent to 7 modulo 8 such that Legendre(-a(n), q) = -Legendre(-1, q) for all odd primes q <= p.

Original entry on oeis.org

7, 7, 127, 463, 463, 487, 1423, 33247, 73327, 118903, 118903, 118903, 454183, 773767, 773767, 773767, 773767, 86976583, 125325127, 132690343, 788667223, 788667223, 1280222287, 2430076903, 10703135983, 10703135983, 10703135983
Offset: 1

Views

Author

Keywords

Comments

Numbers so far are all congruent to 7 (mod 24). - Ralf Stephan, Jul 07 2003

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. A001990.

Programs

  • PARI
    isok(p, oddpn) = {forprime(q=3, oddpn, if (kronecker(p, q) != -kronecker(-1, q), return (0));); return (1);}
    a(n) = {oddpn = prime(n+1); forprime(p=3, , if ((p%8) == 7, if (isok(p, oddpn), return (p));););} \\ Michel Marcus, Oct 18 2017
    
  • Python
    from sympy import legendre_symbol as L, primerange, prime, nextprime
    def isok(p, oddpn):
        for q in primerange(3, oddpn + 1):
            if L(p, q)!=-L(-1, q): return 0
        return 1
    def a(n):
        oddpn=prime(n + 1)
        p=3
        while True:
            if p%8==7:
                if isok(p, oddpn): return p
            p=nextprime(p) # Indranil Ghosh, Oct 23 2017, after PARI code by Michel Marcus

Extensions

Better name and more terms from Sean A. Irvine, Mar 06 2013
Name and offset corrected by Michel Marcus, Oct 18 2017

A001990 Let p be the n-th odd prime. a(n) is the least prime congruent to 5 modulo 8 such that Legendre(-a(n), q) = -Legendre(-2, q) for all odd primes q <= p.

Original entry on oeis.org

5, 29, 29, 29, 29, 29, 29, 29, 23669, 23669, 23669, 23669, 23669, 23669, 1508789, 5025869, 9636461, 9636461, 9636461, 37989701, 37989701, 37989701, 37989701, 37989701, 240511301, 240511301
Offset: 1

Views

Author

Keywords

Comments

Numbers so far are all congruent to 5 (mod 24). - Ralf Stephan, Jul 07 2003

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. A001988.

Programs

  • PARI
    isok(p, oddpn) = {forprime(q=3, oddpn, if (kronecker(p, q) != -kronecker(-2, q), return (0));); return (1);}
    a(n) = {oddpn = prime(n+1); forprime(p=3, , if ((p%8) == 5, if (isok(p, oddpn), return (p));););} \\ Michel Marcus, Oct 18 2017

Extensions

Better name from Sean A. Irvine, Mar 06 2013
Name and offset corrected by Michel Marcus, Oct 18 2017

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

Views

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

A241482 Least fundamental discriminant D > 1 such that the first n primes p have (D/p) >= 0.

Original entry on oeis.org

8, 12, 24, 60, 60, 364, 984, 1596, 1596, 1596, 3705, 58444, 84396, 164620, 172236, 369105, 369105, 731676, 731676, 3442296, 3442296, 32169916, 32169916, 47973864, 47973864, 47973864, 313114620, 313114620, 313114620, 313114620, 13461106065, 27765196680, 40527839121, 55213498824, 55213498824, 381031123720
Offset: 1

Views

Author

Keywords

Comments

By the Chinese Remainder Theorem and Prime Number Theorem in arithmetic progressions, this sequence is infinite.
a(n) is the least fundamental discriminant D > 1 such that the first n primes either decompose or ramify in the real quadratic field with discriminant D. See A306218 for the imaginary quadratic field case. - Jianing Song, Feb 14 2019

Examples

			(364/2) = 0, (364/3) = 1, (364/5) = 1, (364/7) = 0, (364/11) = 1, (364/13) = 0, so 3, 5, 11 decompose in Q[sqrt(91)] and 2, 7, 13 ramify in Q[sqrt(-231)]. For other fundamental discriminants 1 < D < 364, at least one of 2, 3, 5, 7, 11, 13 is inert in the imaginary quadratic field with discriminant D, so a(6) = 364. - _Jianing Song_, Feb 14 2019
		

Crossrefs

Cf. A003658, A232931, A306218 (the imaginary quadratic field case).
A002189 and A094847 are similar sequences.

Programs

  • PARI
    a(n) = my(i=2); while(!isfundamental(i)||sum(j=1, n, kronecker(i,prime(j))==-1)!=0, i++); i \\ Jianing Song, Feb 14 2019

Formula

a(n) > prime(n)^(4*sqrt(e) + o(1)). - Charles R Greathouse IV, Apr 23 2014
a(n) = A003658(k), where k is the smallest number such that A232931(k) >= prime(n+1). - Jianing Song, Feb 15 2019

Extensions

a(36) from Charles R Greathouse IV, Apr 24 2014
Showing 1-10 of 16 results. Next