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

A115249 Values in A115248 that are not in A005123.

Original entry on oeis.org

19, 46, 53, 82, 100, 104, 109, 127, 128, 154, 172, 217, 228, 251, 257, 262, 271, 278, 289, 303, 316, 352, 353, 359, 379, 397, 415, 428, 447, 451, 460, 478, 487, 505, 514, 545, 586, 594, 603, 620, 640, 649, 667, 676, 692, 694, 721, 728, 739, 753, 757, 767
Offset: 0

Views

Author

Christian G. Bower, Jan 17 2006

Keywords

Crossrefs

A033200 Primes congruent to {1, 3} (mod 8); or, odd primes of form x^2 + 2*y^2.

Original entry on oeis.org

3, 11, 17, 19, 41, 43, 59, 67, 73, 83, 89, 97, 107, 113, 131, 137, 139, 163, 179, 193, 211, 227, 233, 241, 251, 257, 281, 283, 307, 313, 331, 337, 347, 353, 379, 401, 409, 419, 433, 443, 449, 457, 467, 491, 499
Offset: 1

Views

Author

Keywords

Comments

Rational primes that decompose in the field Q(sqrt(-2)). - N. J. A. Sloane, Dec 25 2017
Fermat knew of the relationship between a prime being congruent to 1 or 3 mod 8 and its being the sum of a square and twice a square, and claimed to have a firm proof of this fact. These numbers are not primes in Z[sqrt(-2)], as they have x - y sqrt(-2) as a divisor. - Alonso del Arte, Dec 07 2012
Terms m in A047471 with A010051(m) = 1. - Reinhard Zumkeller, Dec 29 2012
This sequence gives the primes p which satisfy norm(rho(p)) = + 1 with rho(p) := 2*cos(Pi/p) (the length ratio (smallest diagonal)/side in the regular p-gon). The norm of an algebraic number (over Q) is the product over all zeros of its minimal polynomial. Here norm(rho(p)) = (-1)^delta(p)* C(p, 0), with the degree delta(p) = A055034(p) = (p-1)/2. For the minimal polynomial C see A187360. For p == 1 (mod 8) the norm is C(p, 0) (see a comment on 4*A005123) and for p == 3 (mod 8) the norm is -C(p, 0) (see a comment on A186297). For the primes with norm(rho(p)) = -1 see A003628. - Wolfdieter Lang, Oct 24 2013
If p is a member then it has a unique representation as x^2+2y^2 [Frei, Theorem 3]. - N. J. A. Sloane, May 30 2014
Primes that are the quarter perimeter of a Heronian triangle. Such primes are unique to the Heronian triangle (see Yiu link). - Frank M Jackson, Nov 30 2014

Examples

			Since 11 is prime and 11 == 3 (mod 8), 11 is in the sequence. (Also 11 = 3^2 + 2 * 1^2 = (3 + sqrt(-2))(3 - sqrt(-2)).)
Since 17 is prime and 17 == 1 (mod 8), 17 is in the sequence.
		

References

  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 7.

Crossrefs

Cf. A033203.

Programs

  • Haskell
    a033200 n = a033200_list !! (n-1)
    a033200_list = filter ((== 1) . a010051) a047471_list
    -- Reinhard Zumkeller, Dec 29 2012
    
  • Magma
    [p: p in PrimesUpTo(600) | p mod 8 in [1, 3]]; // Vincenzo Librandi, Aug 04 2012
    
  • Mathematica
    Rest[QuadPrimes2[1, 0, 2, 10000]] (* see A106856 *)
    Select[Prime[Range[200]],MemberQ[{1,3},Mod[#,8]]&] (* Harvey P. Dale, Jun 09 2017 *)
  • PARI
    is(n)=n%8<4 && n%2 && isprime(n) \\ Charles R Greathouse IV, Feb 09 2017

Formula

a(n) = A033203(n+1). - Zak Seidov, May 29 2014
A007519 UNION A007520. - R. J. Mathar, Jun 09 2020
L(-2, a(n)) = +1, n >= 1, with the Legendre symbol L. -Wolfdieter Lang, Jul 24 2024

A254760 Fundamental positive solution x = x1(n) of the first class of the Pell equation x^2 - 2*y^2 = A007519(n), n>=1 (primes congruent to 1 mod 8).

Original entry on oeis.org

5, 7, 9, 11, 13, 11, 13, 15, 19, 21, 17, 17, 21, 25, 19, 23, 21, 21, 29, 23, 23, 31, 33, 25, 27, 25, 29, 31, 31, 29, 29, 37, 41, 31, 35, 31, 37, 39, 41, 43, 35, 39, 35, 35, 43, 35, 49, 41, 37
Offset: 1

Views

Author

Wolfdieter Lang, Feb 10 2015

Keywords

Comments

For the corresponding term y1(n) see 2*A254761(n).
For the positive fundamental proper (sometimes called primitive) solutions x2(n) and y2(n) of the second class of this (generalized) Pell equation see A254762(n) and 2*A254763(n).
The present solutions of this first class are the smallest positive ones.
See the Nagell reference Theorem 111, p. 210, for the proof of the existence of solutions (the discriminant of this binary quadratic form is +8 hence it is an indefinite form with an infinitude of solutions if there exists at least one).
See the Nagell reference Theorem 110, p. 208, for the proof that there are only two classes of solutions for this Pell equation, because the equation is solvable and the primes from A007519 do not divide 4.
The present fundamental solutions are found according to the Nagell reference Theorem 108, p. 205, adapted to the case at hand, by scanning the following two inequalities for solutions x1(n) = 2*X1(n) + 1 and y1(n) = 2*Y1(n). The intervals to be scanned are ceiling((sqrt(8 + p(n))-1)/2) <= X1(n) <= floor((sqrt(2*p(n))-1)/2), with p(n) = A007519(n), and
1 <= Y1(n) <= floor(sqrt(A005123(n))).
The general positive proper solutions are for both classes obtained by applying positive powers of the matrix M = [[3,4],[2,3]] on the positive fundamental column vectors (x(n),y(n))^T. The n-th power M^n = S(n-1, 6)*M - S(n-2, 6) 1_2 , where 1_2 is the 2 X 2 identity matrix and S(n, 6), with S(-2, 6) = -1 and S(-1, 6) = 0 is the Chebyshev S-polynomial evaluated at x = 6, given in A001109(n).
The least positive x solutions (that is the ones of the first class) for the primes +1 and -1 (mod 8) together (including in the first class also the prime 2) are given in A002334. - Wolfdieter Lang, Feb 12 2015

Examples

			The first pairs [x1(n), y1(n)] of the fundamental positive solutions of this first class are (we list the prime A007519(n) as first entry):
[17, [5, 2]], [41, [7, 2]], [73, [9, 2]], [89, [11, 4]], [97, [13, 6]], [113, [11, 2]], [137, [13, 4]], [193, [15, 4]], [233, [19, 8]], [241, [21, 10]], [257, [17, 4]], [281, [17, 2]], [313, [21, 8]], [337, [25, 12]], [353, [19, 2]], [401, [23, 8]], [409, [21, 4]], ...
n=1: 5^2 - 2*2^2 = 25 - 8 = 17, ...
		

References

  • T. Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York, 1964.

Crossrefs

Formula

a(n)^2 - 2*(2*A254760(n))^2 = A007519(n) gives the smallest positive (proper) solution of this (generalized) Pell equation.

A139487 Numbers k such that 8k + 7 is prime.

Original entry on oeis.org

0, 2, 3, 5, 8, 9, 12, 15, 18, 20, 23, 24, 27, 29, 32, 33, 38, 44, 45, 47, 53, 54, 57, 59, 60, 62, 74, 75, 78, 80, 89, 90, 92, 93, 102, 104, 107, 110, 113, 114, 120, 122, 123, 128, 129, 132, 135, 137, 143, 152, 153, 159, 162, 164, 165, 170, 174, 177, 179, 180, 183, 185
Offset: 1

Views

Author

Artur Jasinski, Apr 23 2008

Keywords

Comments

For numbers k such that:
8k+1 is prime see A005123, primes see A007519;
8k+3 is prime see A005124, primes see A007520;
8k+5 is prime see A105133, primes see A007521;
8k+7 is prime see A139487, primes see A007522.
8k + 7 divides A000225(4k+3). - Jinyuan Wang, Mar 08 2019

Crossrefs

Programs

  • Magma
    [n: n in [0..200] | IsPrime(8*n+7)]; // Vincenzo Librandi, Jun 25 2014
    
  • Mathematica
    a = {}; Do[If[PrimeQ[8 n + 7], AppendTo[a, n]], {n, 0, 300}]; a
    Select[Range[0,200],PrimeQ[8#+7]&] (* Harvey P. Dale, Oct 10 2012 *)
  • PARI
    is(n)=isprime(8*n+7) \\ Charles R Greathouse IV, Feb 17 2017

Formula

a(n) = (A007522(n) - 7)/8, n >= 1.

A023228 Numbers k such that k and 8*k + 1 are both prime.

Original entry on oeis.org

2, 5, 11, 17, 29, 71, 101, 107, 131, 137, 149, 179, 239, 269, 347, 401, 431, 449, 479, 491, 509, 557, 599, 617, 659, 677, 761, 809, 821, 857, 929, 941, 947, 977, 1151, 1187, 1229, 1289, 1307, 1361, 1367, 1409, 1487, 1559, 1571, 1601, 1619, 1667, 1697, 1811, 1871
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007519 (primes of form 8n+1), A005123 ((( primes == 1 mod 8 ) - 1)/8). - Klaus Brockhaus, Dec 21 2008

Programs

  • Magma
    [ p: p in PrimesUpTo(1900) | IsPrime(8*p+1) ]; // Klaus Brockhaus, Dec 21 2008
    
  • Mathematica
    Select[Prime[Range[2000]], PrimeQ[8# + 1]&] (* Vincenzo Librandi, Feb 02 2014 *)
  • PARI
    list(lim)=my(v=List()); forprime(p=2,lim, if(isprime(8*p+1), listput(v,p))); Vec(v) \\ Charles R Greathouse IV, Oct 20 2021

Formula

Sum_{n>=1} 1/a(n) is in the interval (1.151956749, 1.4207187) (Wagstaff, 2021). - Amiram Eldar, Nov 04 2021

A124065 Numbers k such that 8*k - 1 and 8*k + 1 are twin primes.

Original entry on oeis.org

9, 24, 30, 39, 54, 75, 129, 144, 165, 186, 201, 234, 261, 264, 324, 336, 339, 375, 390, 396, 420, 441, 459, 471, 516, 534, 600, 621, 654, 660, 690, 705, 735, 795, 819, 849, 870, 891, 936, 945, 1011, 1029, 1125, 1155, 1179, 1215, 1221, 1251, 1284, 1395, 1419
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Examples

			9 is in the sequence since 8*9 - 1 = 71 and 8*9 + 1 = 73 are twin primes.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..2000] | IsPrime(8*n+1) and IsPrime(8*n-1)] // Vincenzo Librandi, Mar 08 2010
    
  • Mathematica
    Select[Range[1500], And @@ PrimeQ[{-1, 1} + 8# ] &] (* Ray Chandler, Nov 16 2006 *)
  • Python
    from sympy import isprime
    def ok(n): return isprime(8*n - 1) and isprime(8*n + 1)
    print(list(filter(ok, range(1420)))) # Michael S. Branicky, Sep 24 2021

Extensions

Extended by Ray Chandler, Nov 16 2006

A254762 Fundamental positive solution x = x2(n) of the second class of the Pell equation x^2 - 2*y^2 = A007519(n), n >= 1 (primes congruent to 1 mod 8).

Original entry on oeis.org

7, 13, 19, 17, 15, 25, 23, 29, 25, 23, 35, 43, 31, 27, 49, 37, 47, 55, 31, 45, 61, 37, 35, 59, 49, 67, 47, 45, 53, 63, 71, 47, 43, 77, 57, 85, 55, 53, 51, 49, 73, 61, 81, 89, 57, 97, 51, 67, 87
Offset: 1

Views

Author

Wolfdieter Lang, Feb 10 2015

Keywords

Comments

The corresponding term y = y2(n) of this fundamental solution of the second class of the (generalized) Pell equation x^2 - 2*y^2 = A007519(n) = 1 + 8*A005123(n) is given in 2*A254763(n).
For comments and the Nagell reference see A254760.

Examples

			The first pairs [x2(n), y2(n)] of the fundamental positive solutions of the second class are (we list the prime A007519(n) as first entry):
  [17, [7, 4]], [41, [13, 8]], [73, [19, 12]], [89, [17, 10]], [97, [15, 8]], [113, [25, 16]], [137, [23, 14]], [193, [29, 18]], [233, [25, 14]], [241, [23, 12]], [257, [35, 22]], [281, [43, 28]], [313, [31, 18]], [337, [27, 14]], [353, [49, 32]], [401, [37, 22]], [409, [47, 30]], ...
a(4) = 3*11 - 8*2 = 17.
		

Crossrefs

Formula

a(n)^2 - 2*(2*A254763(n))^2 = A007519(n) gives the second smallest positive (proper) solution of this (generalized) Pell equation.
a(n) = 3*A254760(n) - 8*A254761(n), n >= 1.

A254763 One half of the fundamental positive solution y = y2(n) of the second class of the Pell equation x^2 - 2*y^2 = A007519(n), n>=1 (primes congruent to 1 mod 8).

Original entry on oeis.org

2, 4, 6, 5, 4, 8, 7, 9, 7, 6, 11, 14, 9, 7, 16, 11, 15, 18, 8, 14, 20, 10, 9, 19, 15, 22, 14, 13, 16, 20, 23, 13, 11, 25, 17, 28, 16, 15, 14, 13, 23, 18, 26, 29, 16, 32, 13, 20, 28, 24
Offset: 1

Views

Author

Wolfdieter Lang, Feb 10 2015

Keywords

Comments

The corresponding fundamental solution x2(n) of this second class of positive solutions is given in A254762(n).
See the comments and the Nagell reference in A254760.

Examples

			n = 2: 13^2 - 2*(2*4)^2 = 169 - 128 = 41.
The smallest positive solution is (x1(2), y1(2)) = (7, 2) from (A254760(2), 2*A254761(2)).
See also A254762.
a(4) = 11 - 3*2 = 5.
		

Crossrefs

Formula

A254762(n)^2 - 2*(2*a(n))^2 = A007519(n) gives the second smallest positive (proper) solution of this (generalized) Pell equation.
a(n) = A254760(n) - 3*A254761(n), n >= 1.

A254934 Fundamental positive solution x = x1(n) of the first class of the Pell equation x^2 - 2*y^2 = -A007519(n), n>=1 (primes congruent to 1 mod 8).

Original entry on oeis.org

1, 3, 5, 3, 1, 7, 5, 7, 3, 1, 9, 13, 5, 1, 15, 7, 13, 17, 1, 11, 19, 3, 1, 17, 11, 21, 9, 7, 11, 17, 21, 5, 1, 23, 11, 27, 9, 7, 5, 3, 19, 11, 23, 27, 7, 31, 1, 13, 25, 19, 33, 7, 5, 21, 31, 25, 9, 29, 5, 15, 27, 13, 31, 11, 7, 17, 3, 37, 41, 31, 19, 25, 7, 35, 5, 17, 33, 13, 21, 19, 45, 25, 3
Offset: 1

Views

Author

Wolfdieter Lang, Feb 18 2015

Keywords

Comments

For the corresponding term y1(n) see A254935(n).
For the positive fundamental proper (sometimes called primitive) solutions x2(n) and y2(n) of the second class of this (generalized) Pell equation see A254936(n) and A254937(n).
The present solutions of this first class are the smallest positive ones.
See the Nagell reference Theorem 111, p. 210, for the proof of the existence of solutions (the discriminant of this binary quadratic form is +8 hence it is an indefinite form with an infinitude of solutions if there exists at least one).
See the Nagell reference Theorem 110, p. 208, for the proof that there are only two classes of solutions for this Pell equation, because the equation is solvable and each prime from A007519 does not divide 4.
The present fundamental solutions are found according to the Nagell reference Theorem 108a, p. 206-207, adapted to the case at hand, by scanning the following two inequalities for solutions x1(n) = 2*X1(n) + 1 and y1(n) = 2*Y1(n) + 1 (because even y is out in this Pell equation). The intervals to be scanned are identical for X1(n) and Y1(n), namely [0, floor((sqrt(p(n) - 1)/2)] with p(n) = A007519(n).
The general positive proper solutions are for both classes obtained by applying positive powers of the matrix M = [[3,4],[2,3]] on the fundamental positive column vectors (x(n),y(n))^T. The n-th power M^n = S(n-1, 6)*M - S(n-2, 6) 1_2 , where 1_2 is the 2 X 2 identity matrix and S(n, 6), with S(-2, 6) = -1 and S(-1, 6) = 0 is the Chebyshev S-polynomial evaluated at x = 6, given in A001109(n).
The least positive x solutions (that is the ones of the first class) for the primes +1 and -1 (mod 8) together (including prime 2) are given in A255235.

Examples

			The first pairs [x1(n), y1(n)] of the fundamental positive solutions of this first class are (the prime A007519(n) is listed as first entry):
[17, [1, 3]], [41, [3, 5]], [73, [5, 7]],
[89, [3, 7]], [97, [1, 7]], [113, [7, 9]],
[137, [5, 9]], [193, [7, 11]], [233, [3, 11]],
[241, [1, 11]], [257, [9, 13]], [281, [13, 15]],
[313, [5, 13]], [337, [1, 13]], [353, [15, 17]],
[401, [7, 15]], [409, [13, 17]], [433, [17, 19]],
[449, [1, 15]], [457, [11, 17]], [521, [19, 21]],
[569, [3, 17]], [577, [1, 17]], [593, [17, 21]],
[601, [11, 19]], [617, [21, 23]], [641, [9, 19]],
[673, [7, 19]], [761, [11, 21]], [769, [17, 23]],
...
n=1: 1^2 - 2*3^2 = 1 - 18 = -17, ...
		

References

  • T. Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York, 1964.

Crossrefs

Cf. A007519 (primes == 1 mod 8), A005123 (8k+1 is prime).
Cf. A254935 (corresponding y1 values), A254936 (x2 values), A254937 (y2 values), A254938, A255232, A255235, A254760.

Programs

  • PARI
    apply( {A254934(n, p=A007519(n))=Set(abs(qfbsolve(Qfb(-1,0,2), p,1)))[1][1]}, [1..77]) \\ The 2nd optional arg allows to directly specify the prime. - M. F. Hasler, May 22 2025

Formula

a(n)^2 - 2*A254935(n)^2 = -A007519(n), n >=1, gives the smallest positive (proper) solution of this (generalized) Pell equation.

Extensions

More terms from M. F. Hasler, May 22 2025

A254935 Fundamental positive solution y = y1(n) of the first class of the Pell equation x^2 - 2*y^2 = -A007519(n), n>=1 (primes congruent to 1 mod 8).

Original entry on oeis.org

3, 5, 7, 7, 7, 9, 9, 11, 11, 11, 13, 15, 13, 13, 17, 15, 17, 19, 15, 17, 21, 17, 17, 21, 19, 23, 19, 19, 21, 23, 25, 21, 21, 27, 23, 29, 23, 23, 23, 23, 27, 25, 29, 31, 25, 33, 25, 27, 31, 29, 35, 27, 27, 31, 35, 33, 29, 35, 29, 31, 35, 31, 37, 31, 31, 33, 31, 41, 43, 39, 35, 37, 33, 41, 33, 35, 41
Offset: 1

Views

Author

Wolfdieter Lang, Feb 18 2015

Keywords

Comments

For the corresponding term x1(n) see A254934(n).
See A254934 also for the Nagell reference.
The least positive y solutions (that is the ones of the first class) for the primes +1 and -1 (mod 8) together (including prime 2) are given in A255246.

Examples

			See A254934.
n = 3: 5^2 - 2*7^2 = 25 - 98 = -73.
		

Crossrefs

Cf. A007519 (primes == 1 mod 8), A005123 (8k+1 is prime).
Cf. A254934 (corresponding x1 values), A254936 (x2 values), A254937 (y2 values), A254938 (same for primes == 7 mod 8), A255232 (y2 values, halved).

Programs

Formula

A254934(n)^2 - 2*a(n)^2 = -A007519(n) gives the smallest positive (proper) solution of this (generalized) Pell equation.

Extensions

More terms from M. F. Hasler, May 22 2025
Showing 1-10 of 27 results. Next