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.

A092581 a(n) is the least prime such that a(n-1) is a quadratic non-residue of a(n).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 19, 23, 31, 37, 43, 47, 59, 61, 67, 71, 79, 83, 89, 101, 103, 107, 109, 127, 131, 137, 149, 151, 157, 163, 167, 179, 181, 191, 199, 227, 229, 239, 251, 257, 263, 271, 277, 283, 307, 311, 331, 347, 349, 359, 367, 373, 379, 383, 409, 431, 439
Offset: 1

Views

Author

Gary W. Adamson, Feb 29 2004

Keywords

References

  • Paulo Ribenboim, "The Little Book of Big Primes", Springer-Verlag, 1991, p. 28.

Crossrefs

Cf. A034794.

Programs

  • Mathematica
    first Needs[ "NumberTheory`NumberTheoryFunctions`" ] then f[n_] := Block[{k = PrimePi[n] + 1}, While[ JacobiSymbol[n, Prime[k]] == 1, k++ ]; Prime[k]]; NestList[f, 2, 56] (* Robert G. Wilson v, Mar 16 2004 *)

Formula

"If p>2 does not divide a and if there exists an integer b such that a is congruent to b^2 (mod p), then a is called a quadratic residue modulo p; otherwise, it is a nonquadratic residue modulo p". (p. 28, Ribenboim)

Extensions

More terms from Robert G. Wilson v, Mar 16 2004
a(17) corrected by T. D. Noe, Aug 28 2007

A140292 a(n) is a square mod a(n-1), a(n) > a(n-1) and a(n) semiprime.

Original entry on oeis.org

4, 9, 10, 14, 15, 21, 22, 25, 26, 35, 39, 49, 51, 55, 69, 82, 86, 87, 91, 95, 106, 115, 119, 121, 122, 123, 133, 134, 143, 146, 155, 159, 166, 169, 178, 183, 187, 202, 203, 219, 235, 249, 253, 254, 262, 265, 274, 278, 287, 289, 291, 295, 299, 302, 303, 309, 327
Offset: 1

Views

Author

Jonathan Vos Post, May 24 2008

Keywords

Crossrefs

Programs

  • Maple
    isqResid := proc(n,modp) local x ; for x from 1 to floor(modp/2) do if x^2 mod modp = n mod modp then RETURN(true) ; fi ; od: RETURN(false) ; end: isA001358 := proc(n) RETURN( numtheory[bigomega](n)= 2) ; end: A140292 := proc(n) option remember ; local a; if n = 1 then 4; else for a from A140292(n-1)+1 do if isA001358(a) and isqResid(a,A140292(n-1)) then RETURN(a) ; fi ; od ; fi ; end: seq(A140292(n),n=1..80) ; # R. J. Mathar, May 31 2008
  • Mathematica
    quadResQ[n_, p_] := Module[{x}, For[x = 1, x <= Floor[p/2], x++, If[Mod[x^2, p] == Mod[n, p], Return[True]]]; Return[False]];
    semiprimeQ[n_] := PrimeOmega[n] == 2;
    a[n_] := a[n] = Module[{k}, If[n == 1, 4, For[k = a[n - 1] + 1, True, k++, If[semiprimeQ[k] && quadResQ[k, a[n - 1]], Return[k]]]]];
    Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Jan 28 2024, after R. J. Mathar *)

Extensions

Corrected and extended by R. J. Mathar, May 31 2008

A359633 a(n) is the least prime > a(n-1) such that a(n-1) and a(n) are quadratic residues mod each other.

Original entry on oeis.org

2, 7, 29, 53, 59, 137, 139, 173, 179, 193, 197, 223, 241, 251, 317, 353, 383, 389, 409, 419, 457, 461, 467, 541, 557, 563, 593, 601, 607, 701, 743, 761, 769, 773, 787, 797, 811, 853, 857, 859, 881, 883, 929, 937, 941, 947, 977, 991, 1009, 1013, 1019, 1033, 1039, 1049, 1051, 1097, 1129, 1153, 1171
Offset: 1

Views

Author

Robert Israel, Jan 07 2023

Keywords

Comments

Quadratic reciprocity says that for odd primes p and q, if p is a quadratic residue mod q then q is a quadratic residue mod p except in the case where p and q are both congruent to 3 (mod 4), in which case they can't both be quadratic residues mod each other. Thus if a(n-1) == 1 (mod 4), a(n) is the least prime > a(n-1) that is a quadratic residue mod a(n-1), while if a(n-1) == 3 (mod 4), a(n) is the least prime > a(n-1) that is congruent to 1 (mod 4) and is a quadratic residue mod a(n-1).

Examples

			a(3) = 29 because a(2) = 7, 29 is a quadratic residue mod 7 and 7 is a quadratic residue mod 29, and 29 is the least prime > 7 that works.
		

Crossrefs

Programs

  • Maple
    f:= proc(p) local q;
       q:= p;
       do
         q:= nextprime(q);
         if NumberTheory:-QuadraticResidue(q,p) = 1 and NumberTheory:-QuadraticResidue(p,q) = 1  then return q fi
       od
    end proc:
    A[1]:= 2: for i from 2 to 100 do A[i]:= f(A[i-1]) od:
    seq(A[i], i=1..100);

A177051 A subsequence of the Fibonacci sequence such that a(n) is a quadratic residue mod a(n+1).

Original entry on oeis.org

1, 2, 34, 55, 89, 233, 377, 1597, 17711, 28657, 121393, 317811, 1346269, 3524578, 5702887, 24157817, 39088169, 63245986, 433494437, 2971215073, 53316291173, 591286729879, 956722026041, 2504730781961, 4052739537881, 17167680177565, 308061521170129, 5527939700884757, 61305790721611591, 99194853094755497, 1779979416004714189
Offset: 1

Views

Author

Michel Lagneau, Dec 09 2010

Keywords

Examples

			2, 34 and 55 are in the sequence because L(2/34) = L(34/55) = 1 where L(a/b) is the Legendre symbol of a and b, which is defined to be 1 if a is a quadratic residue (mod b) and -1 if a is a quadratic non-residue (mod b).
		

Crossrefs

Programs

  • Maple
    with(combinat, fibonacci):k:=1:pr0:=fibonacci(k):for n from k+1 to 100 do:pr:=fibonacci(n):if
      quadres(pr0,pr)=1then pr0:=pr:printf(`%d, `,pr):else fi:od:
  • PARI
    print1(k=1); for(n=3,100,t=fibonacci(n); if(issquare(Mod(k,t)), print1(", "k=t))) \\ Charles R Greathouse IV, Jan 09 2013

Extensions

Definition corrected by Michel Lagneau
Showing 1-4 of 4 results.