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 10 results.

A007522 Primes of the form 8n+7, that is, primes congruent to -1 mod 8.

Original entry on oeis.org

7, 23, 31, 47, 71, 79, 103, 127, 151, 167, 191, 199, 223, 239, 263, 271, 311, 359, 367, 383, 431, 439, 463, 479, 487, 503, 599, 607, 631, 647, 719, 727, 743, 751, 823, 839, 863, 887, 911, 919, 967, 983, 991, 1031, 1039, 1063, 1087, 1103, 1151
Offset: 1

Views

Author

Keywords

Comments

Primes that are the sum of no fewer than four positive squares.
Discriminant is 32, class is 2. Binary quadratic forms ax^2 + bxy + cy^2 have discriminant d = b^2 - 4ac and gcd(a, b, c) = 1.
Primes p such that x^4 = 2 has just two solutions mod p. Subsequence of A040098. Solutions mod p are represented by integers from 0 to p - 1. For p > 2, i is a solution mod p of x^4 = 2 if and only if p - i is a solution mod p of x^4 = 2, so the sum of the two solutions is p. The solutions are given in A065907 and A065908. - Klaus Brockhaus, Nov 28 2001
As this is a subset of A001132, this is also a subset of the primes of form x^2 - 2y^2. And as this is also a subset of A038873, this is also a subset of the primes of form x^2 - 2y^2. - Tito Piezas III, Dec 28 2008
Subsequence of A141164. - Reinhard Zumkeller, Mar 26 2011
Also a subsequence of primes of the form x^2 + y^2 + z^2 + 1. - Arkadiusz Wesolowski, Apr 05 2012
Primes p such that p XOR 6 = p - 6. - Brad Clardy, Jul 22 2012

References

  • Z. I. Borevich and I. R. Shafarevich, Number Theory. Academic Press, NY, 1966.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • D. B. Zagier, Zetafunktionen und quadratische Körper, Springer, 1981.

Crossrefs

Subsequence of A004771.
Cf. A141174 (d = 32). A038872 (d = 5). A038873 (d = 8). A068228, A141123 (d = 12). A038883 (d = 13). A038889 (d = 17). A141111, A141112 (d = 65).

Programs

  • Haskell
    a007522 n = a007522_list !! (n-1)
    a007522_list = filter ((== 1) . a010051) a004771_list
    -- Reinhard Zumkeller, Jan 29 2013
    
  • Magma
    [p: p in PrimesUpTo(2000) | p mod 8 eq 7]; // Vincenzo Librandi, Jun 26 2014
  • Maple
    select(isprime, [seq(i,i=7..10000,8)]); # Robert Israel, Nov 22 2016
  • Mathematica
    Select[8Range[200] - 1, PrimeQ] (* Alonso del Arte, Nov 07 2016 *)
  • PARI
    (A007522(m) = local(p, s, x, z); forprime(p = 3, m, s = []; for(x = 0, p-1, if(x^4%p == 2%p, s = concat(s, [x]))); z = matsize(s)[2]; if(z == 2, print1(p, ", ")))); A007522(1400)  \\ Does not return a(m) but prints all terms <= m. - Edited to make it executable by M. F. Hasler, May 22 2025.
    
  • PARI
    A007522_upto(N, start=1)=select(p->p%8==7, primes([start, N]))
    #A7522=A007522_upto(10^5)
    A007522(n)={while(#A7522A007522_upto(N*3\2, N+1))); A7522[n]} \\ M. F. Hasler, May 22 2025
    

Formula

Equals A000040 INTERSECT A004215. - R. J. Mathar, Nov 22 2006
a(n) = 7 + A139487(n)*8, n >= 1. - Wolfdieter Lang, Feb 18 2015

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

Original entry on oeis.org

5, 7, 13, 9, 21, 11, 17, 29, 19, 15, 31, 37, 17, 27, 33, 23, 29, 21, 41, 47, 37, 23, 43, 33, 49, 55, 51, 31, 41, 69, 53, 29, 43, 59, 35, 31, 45, 61, 41, 67, 85, 57, 47, 63, 43, 53, 35, 75, 93, 37, 71, 61, 83, 47, 89, 39, 73, 53, 63, 79, 49, 85, 69, 97, 103, 109, 55, 65, 47, 77, 67, 83, 49
Offset: 1

Views

Author

Wolfdieter Lang, Feb 18 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 = -A007522(n) = -(1 + A139487(n)*8) is given in 2*A255234(n).
For comments and the Nagell reference see A254938.

Examples

			The first pairs [x2(n), y2(n)] of the fundamental positive solutions of this second class are (the prime A007522(n) appears as first entry):
  [7, [5, 4]], [23, [7, 6]], [31, [13, 10]],
  [47, [9, 8]], [71, [21, 16]], [79, [11, 10]], [103, [17, 14]], [127, [29, 22]],
  [151, [19, 16]], [167, [15, 14]],
  [191, [31, 24]], [199, [37, 28]],
  [223, [17, 16]], [239, [27, 22]],
  [263, [33, 26]], [271, [23, 20]],
  [311, [29, 24]], [359, [21, 20]],
  [367, [41, 32]], [383, [47, 36]],
  [431, [37, 30]], [439, [23, 22]],
  [463, [43, 34]], [479, [33, 28]], ...
n= 4: 9^2 - 2*(2*4)^2 = -47 = -A007522(4).
a(4) = -(3*5 - 4*(2*3)) = 24 - 15 = 9.
		

Crossrefs

Cf. A007522 (primes == 7 mod 8), A139487 (8k+7 is prime).
Cf. 2*A255234 (corresponding y2 values), A254938 (x1 values), 2*A255232 (y2 values), A255247, A254936.

Programs

  • PARI
    apply( {A255233(n, p=A007522(n))=Set(abs(qfbsolve(Qfb(-1, 0, 2), p, 1)))[1]*[-3,4]~}, [1..88]) \\ The 2nd optional arg allows to directly specify the prime. - M. F. Hasler, May 22 2025

Formula

a(n)^2 - 2*(2*A255234(n))^2 = -A007522(n) gives the second smallest positive (proper) solution of this (generalized) Pell equation.
a(n) = -(3*A254938(n) - 4*2*A255232(n)), n >= 1.

Extensions

More terms from Colin Barker, Feb 23 2015
Double-checked and extended by M. F. Hasler, May 22 2025

A023231 Primes p such that 8*p + 7 is also prime.

Original entry on oeis.org

2, 3, 5, 23, 29, 47, 53, 59, 89, 107, 113, 137, 179, 197, 227, 233, 257, 263, 293, 317, 359, 389, 419, 509, 557, 587, 593, 599, 617, 653, 659, 683, 839, 857, 863, 887, 947, 977, 1013, 1097, 1103, 1163, 1193, 1217, 1223, 1229, 1259, 1277, 1283, 1307, 1319, 1409
Offset: 1

Views

Author

Keywords

Examples

			For p = 3, 8*p + 7 = 31;
for p = 179, 8*p + 7 = 1439.
		

Crossrefs

Programs

  • Magma
    [n: n in PrimesUpTo(1500) | IsPrime(8*n+7)]; // Vincenzo Librandi, Nov 20 2010
  • Maple
    a := proc (n) if isprime(n) = true and isprime(8*n+7) = true then n else end if end proc: seq(a(n), n = 1 .. 1500); # Emeric Deutsch, Dec 30 2008
  • Mathematica
    Select[Prime@Range@500, PrimeQ[8 # + 7] &] (* Vincenzo Librandi, May 19 2014 *)

Extensions

Edited by N. J. A. Sloane, Mar 11 2009 at the suggestion of R. J. Mathar

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

Original entry on oeis.org

5, 11, 9, 17, 13, 23, 21, 17, 27, 35, 23, 21, 41, 31, 29, 39, 37, 53, 33, 31, 41, 59, 39, 49, 37, 35, 43, 63, 53, 37, 49, 77, 59, 47, 75, 83, 65, 53, 73, 51, 45, 61, 71, 59, 79, 69, 95, 55, 49, 101
Offset: 1

Views

Author

Wolfdieter Lang, Feb 11 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 = A007522(n) = 7 + 8*A139487(n) is given in A254929(n).
The positive fundamental solutions of the first classes are given in (A254764(n), A254765(n)).
For comments and the Nagell reference see A254764.

Examples

			The first pairs [x2(n), y2(n)] of the fundamental positive solutions of the second class are (we list the prime A007522(n) as first entry): [7,[5,3]], [23,[11,7]], [31,[9,5]], [47,[17,11]], [71,[13,7]], [79,[23,15]], [103,[21,13]], [127,[17,9]], [151,[27,17]], [167,[35,23]], [191,[23,13]], [199,[21,11]], [223,[41,27]], [239,[31,19]], [263,[29,17]], [271,[39,25]], ...
		

Crossrefs

Formula

a(n)^2 - 2*(A254929(n))^2 = A007522(n) gives the second smallest positive (proper) solution of this (generalized) Pell equation.
a(n) = 3*A254764(n) - 4*A254765(n), n >= 1.

A023294 Primes that remain prime through 3 iterations of function f(x) = 8x + 7.

Original entry on oeis.org

659, 2549, 5189, 6269, 7229, 7949, 9209, 11579, 16139, 18089, 22739, 25589, 26099, 26339, 29009, 30689, 40289, 51719, 55799, 59669, 60689, 61379, 63599, 69959, 70229, 74609, 85829, 94949, 95819, 102539, 109589, 118169, 121469, 135599, 136889
Offset: 1

Views

Author

Keywords

Comments

Primes p such that 8*p+7, 64*p+63 and 512*p+511 are also primes. - Vincenzo Librandi, Aug 04 2010

Crossrefs

Subsequence of A023231, A023263, and A139487.

Programs

  • Magma
    [n: n in [1..450000] | IsPrime(n) and IsPrime(8*n+7) and IsPrime(64*n+63) and IsPrime(512*n+511)]; // Vincenzo Librandi, Aug 04 2010

Formula

a(n) == 29 (mod 30). - John Cerkan, Sep 23 2016

A023322 Primes that remain prime through 4 iterations of function f(x) = 8x + 7.

Original entry on oeis.org

7949, 25589, 55799, 61379, 69959, 70229, 74609, 174569, 188369, 204719, 220469, 225629, 233759, 250919, 286619, 363659, 552749, 592139, 658349, 735419, 783269, 827549, 931949, 1018889, 1065839, 1126319, 1132739, 1187939, 1215629, 1378529
Offset: 1

Views

Author

Keywords

Comments

Primes p such that 8*p+7, 64*p+63, 512*p+511 and 4096*p+4095 are also primes. - Vincenzo Librandi, Aug 04 2010

Crossrefs

Subsequence of A023231, A023263, A023294, and A139487.

Programs

  • Magma
    [n: n in [1..5000000] | IsPrime(n) and IsPrime(8*n+7) and IsPrime(64*n+63) and IsPrime(512*n+511) and IsPrime(4096*n+4095)] // Vincenzo Librandi, Aug 04 2010
  • Mathematica
    rp4Q[p_]:=AllTrue[Rest[NestList[8#+7&,p,4]],PrimeQ]; Select[Prime[Range[110000]],rp4Q] (* Harvey P. Dale, Aug 03 2023 *)

Formula

a(n) == 9 (mod 10). - John Cerkan, Oct 08 2016

A023350 Primes that remain prime through 5 iterations of function f(x) = 8x + 7.

Original entry on oeis.org

25589, 220469, 225629, 286619, 783269, 1215629, 1407389, 1542029, 1642919, 2329469, 2776979, 3104159, 4082759, 4229129, 5405999, 5905619, 6548849, 6862859, 7681409, 7904669, 8623799, 8971049, 9599309, 9658469, 9725039, 11420579
Offset: 1

Views

Author

Keywords

Comments

Primes p such that 8*p+7, 64*p+63, 512*p+511, 4096*p+4095 and 32768*p+32767 are also primes. - Vincenzo Librandi, Aug 05 2010

Crossrefs

Subsequence of A023231, A023263, A023294, A023322, and A139487.

Programs

  • Magma
    [n: n in [1..19000000] | IsPrime(n) and IsPrime(8*n+7) and IsPrime(64*n+63) and IsPrime(512*n+511) and IsPrime(4096*n+4095) and IsPrime(32768*n+32767)]; // Vincenzo Librandi, Aug 05 2010
  • Mathematica
    i5Q[p_]:=AllTrue[Rest[NestList[8#+7&,p,5]],PrimeQ]; Select[Prime[Range[760000]],i5Q] (* Harvey P. Dale, Jul 05 2025 *)

Formula

a(n) == 29 (mod 30). - John Cerkan, Nov 08 2016

A153235 Numbers n such that 8*n+7 is not prime.

Original entry on oeis.org

1, 4, 6, 7, 10, 11, 13, 14, 16, 17, 19, 21, 22, 25, 26, 28, 30, 31, 34, 35, 36, 37, 39, 40, 41, 42, 43, 46, 48, 49, 50, 51, 52, 55, 56, 58, 61, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 76, 77, 79, 81, 82, 83, 84, 85, 86, 87, 88, 91, 94, 95, 96, 97, 98, 99, 100, 101
Offset: 1

Views

Author

Vincenzo Librandi, Dec 21 2008

Keywords

Examples

			Distribution of the terms in the following triangular array:
*;
1,*;
*,*,*;
*,*,7,*;
*,6,*,*,*;
4,*,*,*,17,*;
*,*,*,16,*,*,*;
*,*,14,*,*,*,31,*;
*,11,*,*,*,30,*,*,*;
7,*,*,*,28,*,*,*,49,*:
*,*,*,25,*,*,*,48,*,*,*;
*,*,21,*,*,*,46,*,*,*,71,*; etc.
where * marks the non-integer values of (2*h*k + k + h - 3)/4 with h >= k >= 1. - _Vincenzo Librandi_, Jan 15 2013
		

Crossrefs

Cf. A139487.

Programs

  • Magma
    [n: n in [0..110] | not IsPrime(8*n+7)]; // Vincenzo Librandi, Jan 12 2013
  • Mathematica
    Select[Range[0, 200], !PrimeQ[8 # + 7] &] (* Vincenzo Librandi, Jan 12 2013 *)

A153236 Numbers n such that 8*n + 3 is not prime.

Original entry on oeis.org

3, 4, 6, 9, 11, 12, 14, 15, 18, 19, 21, 23, 24, 25, 27, 29, 30, 32, 33, 34, 36, 37, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 53, 54, 56, 57, 59, 60, 63, 64, 66, 67, 69, 72, 74, 75, 76, 78, 79, 81, 83, 84, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97
Offset: 1

Views

Author

Vincenzo Librandi, Dec 21 2008

Keywords

Examples

			Distribution of the terms in the following triangular array:
*;
*,*;
*,4,*;
3,*,*,*;
*,*,*,12,*;
*,*,11,*,*,*;
*,9,*,*,*,24,*;
6,*,*,*,23,*,*,*;
*,*,*,21,*,*,*,40,*;
*,*,18,*,*,*,39,*,*,*;
*,14,*,*,*,37,*,*,*,60,*;
9,*,*,*,34,*,*,*,59,*,*,*; etc.
where * marks the non-integer values of (2*h*k + k + h - 1)/4 with h >= k >= 1. - _Vincenzo Librandi_, Jan 15 2013
		

Crossrefs

Programs

  • Magma
    [n: n in [0..110] | not IsPrime(8*n+3)]; // Vincenzo Librandi, Jan 12 2013
  • Mathematica
    Select[Range[0, 200], !PrimeQ[8 # + 3] &] (* Vincenzo Librandi, Jan 12 2013 *)

A244087 Numbers n such that 4*n+3 and 8*n+7 are prime.

Original entry on oeis.org

0, 2, 5, 20, 32, 44, 47, 59, 62, 89, 104, 107, 110, 122, 164, 170, 179, 185, 227, 254, 257, 275, 305, 359, 362, 374, 377, 389, 395, 452, 482, 500, 509, 515, 584, 587, 599, 614, 635, 674, 704, 725, 734, 740, 755, 824, 839, 872, 884, 905, 944, 950, 962, 965, 977
Offset: 1

Views

Author

Vincenzo Librandi, Jun 25 2014

Keywords

Comments

-2 is a primitive root mod (8*n+7).

Crossrefs

Intersection of A095278 and A139487.

Programs

  • Magma
    [n: n in [0..1000] | IsPrime(4*n+3) and IsPrime(8*n+7)];
  • Mathematica
    Select[Range[0, 1500], PrimeQ[4 # + 3]&&PrimeQ[8 # + 7] &]
Showing 1-10 of 10 results.