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.

A059770 First solution of x^2 = 2 mod p for primes p such that a solution exists.

Original entry on oeis.org

0, 3, 6, 5, 8, 17, 7, 12, 32, 9, 25, 14, 38, 51, 16, 31, 46, 13, 57, 52, 20, 15, 85, 99, 22, 60, 110, 96, 132, 66, 120, 26, 167, 19, 79, 137, 53, 97, 188, 206, 21, 30, 80, 203, 187, 91, 157, 249, 201, 34, 142, 166, 222, 194, 296, 94, 67, 36, 283, 324, 27, 102, 113, 73
Offset: 1

Views

Author

Klaus Brockhaus, Feb 21 2001

Keywords

Comments

Solutions mod p are represented by integers from 0 to p-1. For p > 2: If x^2 = 2 has a solution mod p, then it has exactly two solutions and their sum is p; i is a solution mod p of x^2 = 2 iff p-i is a solution mod p of x^2 = 2. No integer occurs more than once in this sequence. Moreover, no integer (except 0) occurs both in this sequence and in sequence A059771 of the second solutions (Cf. A059772).

Examples

			a(6) = 17, since 41 is the sixth term of A038873, 17 and 24 are the solutions mod 41 of x^2 = 2 and 17 is the smaller one.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := MemberQ[{1, 2, 7}, Mod[n, 8]]; f[n_] := PowerMod[2, 1/2, n]; f@ Select[ Prime[Range[135]], fQ] (* Robert G. Wilson v, Oct 18 2011 *)

Formula

a(n) = first (least) solution of x^2 = 2 mod p, where p is the n-th prime such that x^2 = 2 mod p has a solution, i.e. p is the n-th term of A038873.

A059771 Second solution of x^2 = 2 mod p for primes p such that a solution exists.

Original entry on oeis.org

0, 4, 11, 18, 23, 24, 40, 59, 41, 70, 64, 83, 65, 62, 111, 106, 105, 154, 134, 141, 179, 208, 148, 140, 219, 197, 153, 175, 149, 245, 193, 311, 186, 340, 288, 246, 348, 312, 243, 227, 418, 419, 377, 260, 292, 396, 346, 272, 368, 543, 451, 433, 379, 413, 321
Offset: 1

Views

Author

Klaus Brockhaus, Feb 21 2001

Keywords

Comments

Solutions mod p are represented by integers from 0 to p-1. For p > 2: If x^2 = 2 has a solution mod p, then it has exactly two solutions and their sum is p; i is a solution mod p of x^2 = 2 iff p-i is a solution mod p of x^2 = 2. No integer occurs more than once in this sequence. Moreover, no integer (except 0) occurs both in this sequence and in sequence A059770 of the first solutions (Cf. A059772).

Examples

			a(6) = 24 since 41 is the sixth term of A038873, 17 and 24 are the solutions mod 41 of x^2 = 2 and 24 is the larger one.
		

Crossrefs

Programs

  • Maple
    R:= 0: p:= 2: count:= 1:
    while count < 100 do
      p:= nextprime(p);
      if NumberTheory:-QuadraticResidue(2,p)=1 then
        v:= NumberTheory:-ModularSquareRoot(2,p);
        R:= R, max(v,p-v);
        count:= count+1
      fi
    od:
    R; # Robert Israel, Sep 07 2023

Formula

a(n) = second (larger) solution of x^2 = 2 mod p, where p is the n-th prime such that x^2 = 2 mod p has a solution, i.e. p is the n-th term of A038873. a(n) = 0 if x^2 = 2 mod p has one solution (only for p = 2).

A060515 Integers i > 1 for which there is no prime p such that i is a solution mod p of x^2 = 2.

Original entry on oeis.org

2, 10, 28, 39, 45, 54, 58, 74, 87, 88, 101, 108, 114, 116, 130, 143, 147, 156, 164, 168, 178, 180, 181, 225, 228, 235, 238, 242, 244, 248, 256, 263, 270, 271, 277, 304, 305, 317, 318, 325, 333, 334, 338, 347, 363, 367, 373, 374, 378, 380, 381, 386, 397, 402
Offset: 1

Views

Author

Klaus Brockhaus, Mar 24 2001

Keywords

Comments

Solutions mod p are represented by integers from 0 to p-1. The following equivalences holds for i > 1: There is a prime p such that i is a solution mod p of x^2 = 2 iff i^2-2 has a prime factor > i; i is a solution mod p of x^2 = 2 iff p is a prime factor of i^2-2 and p > i.

Examples

			a(1) = 2, since there is no prime p such that 2 is a solution mod p of x^2 = 2. a(2) = 10, since there is no prime p such that 10 is a solution mod p of x^2 = 2 and for each integer i from 3 to 9 there is a prime q such that i is a solution mod q of x^2 = 2 (cf. A059772).
		

Crossrefs

Programs

  • Maple
    select(t -> max(numtheory:-factorset(t^2-2)) <= t, [$2..1000]); # Robert Israel, Feb 23 2016
  • PARI
    is(n)=my(f=factor(n^2-2)[,1]);n>1&&f[#f]<=n \\ Charles R Greathouse IV, Aug 24 2013

Formula

Integer i > 1 is a term of this sequence iff i^2-2 has no prime factor > i.

A363102 Denominator of the continued fraction 1/(2-3/(3-4/(4-5/(...(n-1)-n/(-2))))).

Original entry on oeis.org

7, 7, 23, 17, 47, 31, 79, 7, 17, 71, 167, 97, 223, 127, 41, 23, 359, 199, 439, 241, 31, 41, 89, 337, 727, 1, 839, 449, 137, 73, 1087, 577, 1223, 647, 1367, 103, 1, 47, 73, 881, 1847, 967, 1, 151, 2207, 1151, 2399, 1249, 113, 193, 401, 1, 3023, 1567, 191, 41, 71, 257, 3719, 113, 3967, 89, 103, 311
Offset: 3

Views

Author

Mohammed Bouras, May 19 2023

Keywords

Comments

Conjecture 1: The sequence contains only 1's and primes.
Conjecture 2: All prime numbers appear either twice (same as A356247 and A357127) or three times.
Similar terms of A164314.
Conjecture: Record values correspond to A028871(m), m > 1. - Bill McEachen, Mar 06 2024
a(n) = 1 positions appear to correspond to A060515(m), m > 2. - Bill McEachen, Aug 05 2024

Examples

			a(5) = (5^2 - 2)/gcd(5^2 - 2, 2*A051403(5-3) + 5*A051403(5-4))= 23.
a(6) = a(11) = 6 + 11 = 17.
a(7) = a(40) = 7 + 40 = 47.
		

Crossrefs

Programs

  • PARI
    a051403(n) = (n+2)*sum(k=0, n, k!)/2;
    a(n) = (n^2 - 2)/gcd(n^2 - 2, 2*a051403(n-3) + n*a051403(n-4)); \\ Michel Marcus, May 24 2023

Formula

a(n) = (n^2 - 2)/gcd(n^2 - 2, 2*A051403(n-3) + n*A051403(n-4)).
a(n) = A164314(n) if A164314(n) > n.
If a(n) = a(m) and n < m < a(n), then a(n) = n + m.
Showing 1-4 of 4 results.