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-6 of 6 results.

A007519 Primes of form 8n+1, that is, primes congruent to 1 mod 8.

Original entry on oeis.org

17, 41, 73, 89, 97, 113, 137, 193, 233, 241, 257, 281, 313, 337, 353, 401, 409, 433, 449, 457, 521, 569, 577, 593, 601, 617, 641, 673, 761, 769, 809, 857, 881, 929, 937, 953, 977, 1009, 1033, 1049, 1097, 1129, 1153, 1193, 1201, 1217, 1249, 1289, 1297, 1321, 1361
Offset: 1

Views

Author

Keywords

Comments

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.
Integers n (n > 9) of form 4k + 1 such that binomial(n-1, (n-1)/4) == 1 (mod n) - Benoit Cloitre, Feb 07 2004
Primes of the form x^2 + 8y^2. - T. D. Noe, May 07 2005
Also primes of the form x^2 + 16y^2. See A140633. - T. D. Noe, May 19 2008
Is this the same sequence as A141174?
Being a subset of A001132 and also a subset of A038873, this is also a subset of the primes of the form u^2 - 2v^2. - Tito Piezas III, Dec 28 2008
These primes p are only which possess the property: for every integer m from interval [0, p) with the Hamming distance D(m, p) = 2, there exists an integer h from (m, p) with D(m, h) = 2. - Vladimir Shevelev, Apr 18 2012
Primes p such that p XOR 6 = p + 6. - Brad Clardy, Jul 22 2012
Odd primes p such that -1 is a 4th power mod p. - Eric M. Schmidt, Mar 27 2014
There are infinitely many primes of this form. See Brubaker link. - Alonso del Arte, Jan 12 2017
These primes split in Z[sqrt(2)]. For example, 17 = (-1)(1 - 3*sqrt(2))(1 + 3*sqrt(2)). This is also true of primes of the form 8n - 1. - Alonso del Arte, Jan 26 2017

Examples

			a(1) = 17 = 2 * 8 + 1 = (10001)_2. All numbers m from [0, 17) with the Hamming distance D(m, 17) = 2 are 0, 3, 5, 9. For m = 0, we can take h = 3, since 3 is drawn from (0, 17) and D(0, 3) = 2; for m = 3, we can take h = 5, since 5 from (3, 17) and D(3, 5) = 2; for m = 5, we can take h = 6, since 6 from (5, 17) and D(5, 6) = 2; for m = 9, we can take h = 10, since 10 is drawn from (9, 17) and D(9, 10) = 2. - _Vladimir Shevelev_, Apr 18 2012
		

References

  • Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • Z. I. Borevich and I. R. Shafarevich, Number Theory.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 261.

Crossrefs

Subsequence of A017077 and of A038873.
Cf. A139643. Complement in primes of A154264. Cf. A042987.
Cf. A038872 (d = 5). A038873 (d = 8). A068228, A141123 (d = 12). A038883 (d = 13). A038889 (d = 17). A141111, A141112 (d = 65).
Cf. also A242663.
For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.

Programs

  • Haskell
    a007519 n = a007519_list !! (n-1)
    a007519_list = filter ((== 1) . a010051) [1,9..]
    -- Reinhard Zumkeller, Mar 06 2012
    
  • Magma
    [p: p in PrimesUpTo(2000) | p mod 8 eq 1 ]; // Vincenzo Librandi, Aug 21 2012
    
  • Mathematica
    Select[1 + 8 Range@ 170, PrimeQ] (* Robert G. Wilson v *)
  • PARI
    forprime(p=2,1e4,if(p%8==1,print1(p", "))) \\ Charles R Greathouse IV, Jun 16 2011
    
  • PARI
    forprimestep(p=17,10^4,8, print1(p", ")) \\ Charles R Greathouse IV, Jul 17 2024
    
  • PARI
    lista(nn)= my(vpr = []); for (x = 0, nn, y = 0; while ((v = x^2+6*x*y+y^2) < nn, if (isprime(v), if (! vecsearch(vpr, v), vpr = concat(vpr, v); vpr = vecsort(vpr););); y++;);); vpr; \\ Michel Marcus, Feb 01 2014
    
  • PARI
    A007519_upto(N, start=1)=select(t->t%8==1,primes([start,N]))
    #A7519=A007519_upto(10^5)
    A007519(n)={while(#A7519A007519_upto(N*3\2, N+1))); A7519[n]} \\ M. F. Hasler, May 22 2025
    
  • SageMath
    # uses[binaryQF]
    # The function binaryQF is defined in the link 'Binary Quadratic Forms'.
    Q = binaryQF([1, 4, -4])
    print(Q.represented_positives(1361, 'prime'))  # Peter Luschny, Jan 26 2017

A167134 Primes congruent to {2, 3, 5, 7} mod 11.

Original entry on oeis.org

2, 3, 5, 7, 13, 29, 47, 71, 73, 79, 101, 113, 137, 139, 157, 167, 179, 181, 211, 223, 227, 233, 269, 271, 277, 293, 311, 313, 337, 359, 379, 401, 409, 421, 431, 443, 467, 487, 491, 509, 541, 557, 563, 577, 599, 601, 607, 619, 641, 643, 673, 709, 733, 739, 751
Offset: 1

Views

Author

Klaus Brockhaus, Oct 28 2009

Keywords

Comments

Primes p such that p mod 11 is prime.
Primes of the form 11*n+r where n >= 0 and r is in {2, 3, 5, 7}.
2 and primes congruent to {3, 5, 7, 13} mod 22. - Chai Wah Wu, Apr 29 2025

Crossrefs

Cf. A003627, A045326, A003631, A045309, A045314, A042987, A078403, A042993, A167134, A167135, A167119: primes p such that p mod k is prime, for k = 3..13 resp.

Programs

  • Magma
    [ p: p in PrimesUpTo(760) | p mod 11 in {2, 3, 5, 7} ];
    [ p: p in PrimesUpTo(760) | exists(t){ n: n in [0..p div 11] | exists(u){ r: r in {2, 3, 5,7} | p eq (11*n+r) } } ];
  • Mathematica
    Select[Prime[Range[600]],MemberQ[{2, 3, 5, 7},Mod[#,11]]&] (* Vincenzo Librandi, Aug 05 2012 *)

A167135 Primes congruent to {2, 3, 5, 7, 11} mod 12.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 19, 23, 29, 31, 41, 43, 47, 53, 59, 67, 71, 79, 83, 89, 101, 103, 107, 113, 127, 131, 137, 139, 149, 151, 163, 167, 173, 179, 191, 197, 199, 211, 223, 227, 233, 239, 251, 257, 263, 269, 271, 281, 283, 293, 307, 311, 317, 331, 347, 353, 359
Offset: 1

Views

Author

Klaus Brockhaus, Oct 28 2009

Keywords

Comments

Primes p such that p mod 12 is prime.
Primes of the form 12*n+r where n >= 0 and r is in {2, 3, 5, 7, 11}.
Except for the prime 2, these are the primes that are encountered in the set of numbers {x, f(f(x))} where x is of the form 4k+3 with k>=0, and where f(x) is the 3x+1-problem function, and f(f(x)) the second iteration value. Indeed this sequence is the set union of 2 and A002145 (4k+3 primes) and A007528 (6k+5 primes), since f(f(4k+3))=6k+5. Equivalently one does not get any prime from A068228 (the complement of the present sequence). - Michel Marcus and Bill McEachen, May 07 2016

Crossrefs

Subsequences: A002145, A007528. Complement: A068228.
Cf. A003627, A045326, A003631, A045309, A045314, A042987, A078403, A042993, A167134, A167135, A167119: primes p such that p mod k is prime, for k = 3..13 resp.

Programs

  • Magma
    [ p: p in PrimesUpTo(760) | p mod 12 in {2, 3, 5, 7, 11} ];
    
  • Magma
    [ p: p in PrimesUpTo(760) | exists(t){ n: n in [0..p div 12] | exists(u){ r: r in {2, 3, 5,7, 11} | p eq (12*n+r) } } ];
  • Maple
    isA167135  := n -> isprime(n) and not modp(n, 12) != 1:
    select(isA167135, [$1..360]); # Peter Luschny, Mar 28 2018
  • Mathematica
    Select[Prime[Range[400]],MemberQ[{2,3, 5, 7, 11},Mod[#,12]]&] (* Vincenzo Librandi, Aug 05 2012 *)
    Select[Prime[Range[72]], Mod[#, 12] != 1 &] (* Peter Luschny, Mar 28 2018 *)

A167119 Primes congruent to 2, 3, 5, 7 or 11 (mod 13).

Original entry on oeis.org

2, 3, 5, 7, 11, 29, 31, 37, 41, 59, 67, 83, 89, 107, 109, 137, 163, 167, 193, 197, 211, 223, 239, 241, 263, 271, 293, 317, 349, 353, 367, 379, 397, 401, 419, 421, 431, 449, 457, 479, 499, 509, 523, 557, 577, 587, 601, 613, 631, 653, 661, 683, 691, 709, 733, 739, 743, 757
Offset: 1

Views

Author

Keywords

Comments

Primes which have a remainder mod 13 that is prime.
Union of A141858, A100202, A102732, A140371 and A140373. - R. J. Mathar, Oct 29 2009

Examples

			11 mod 13 = 11, 29 mod 13 = 3, 31 mod 13 = 5, hence 11, 29 and 31 are in the sequence.
		

Crossrefs

Cf. A003627, A045326, A003631, A045309, A045314, A042987, A078403, A042993, A167134, A167135: primes p such that p mod k is prime, for k = 3..12 resp.

Programs

  • Magma
    [ p: p in PrimesUpTo(740) | p mod 13 in {2, 3, 5, 7, 11} ]; // Klaus Brockhaus, Oct 28 2009
  • Mathematica
    f[n_]:=PrimeQ[Mod[n,13]]; lst={};Do[p=Prime[n];If[f[p],AppendTo[lst,p]],{n,6,6!}];lst
    Select[Prime[Range[4000]],MemberQ[{2, 3, 5, 7, 11},Mod[#,13]]&] (* Vincenzo Librandi, Aug 05 2012 *)
  • PARI
    {forprime(p=2, 740, if(isprime(p%13), print1(p, ",")))} \\ Klaus Brockhaus, Oct 28 2009
    

Extensions

Edited by Klaus Brockhaus and R. J. Mathar, Oct 28 2009 and Oct 29 2009

A350577 Prime numbers in A036991.

Original entry on oeis.org

3, 5, 7, 11, 13, 19, 23, 29, 31, 43, 47, 53, 59, 61, 71, 79, 83, 103, 107, 109, 127, 151, 157, 167, 173, 179, 181, 191, 199, 211, 223, 239, 251, 271, 283, 307, 311, 317, 331, 347, 349, 359, 367, 373, 379, 383, 431, 439, 443, 461, 463, 467, 479, 487, 491, 499
Offset: 1

Views

Author

Gennady Eremin, Jan 07 2022

Keywords

Comments

This sequence includes A000668.
Conjecture: The sequence is infinite. For example, in the first million primes (see A000040) 304208 numbers are terms of A036991.

Crossrefs

Programs

  • Maple
    q:= proc(n) local l, t, i; l:= Bits[Split](n); t:=0;
          for i to nops(l) do t:= t-1+2*l[i];
            if t<0 then return false fi
          od: true
        end:
    select(isprime and q, [$2..500])[];  # Alois P. Heinz, Jan 07 2022
  • Mathematica
    q[n_] := PrimeQ[n] && AllTrue[Accumulate[(-1)^Reverse[IntegerDigits[n, 2]]], # <= 0 &]; Select[Range[500], q] (* Amiram Eldar, Jan 07 2022 *)
  • Python
    from sympy import isprime
    def ok(n):
        if n == 0: return True
        count = {"0": 0, "1": 0}
        for bit in bin(n)[:1:-1]:
            count[bit] += 1
            if count["0"] > count["1"]: return False
        return isprime(n)
    print([k for k in range(3, 500, 2) if ok(k)]) # Michael S. Branicky, Jan 07 2022

Formula

Intersection of A000040 and A036991.

A157115 Alternate terms of A007519, A007520, A007521, A007522.

Original entry on oeis.org

17, 3, 5, 7, 41, 11, 13, 23, 73, 19, 29, 31, 89, 43, 37, 47, 97, 59, 53, 71, 113, 67, 61, 79, 137, 83, 101, 103, 193, 107, 109, 127, 233, 131, 149, 151, 241, 139, 157, 167, 257, 163, 173, 191, 281, 179, 181, 199, 313, 211, 197, 223, 337, 227, 229, 239, 353, 251, 269
Offset: 1

Views

Author

Zak Seidov and N. J. A. Sloane, Feb 23 2009

Keywords

Comments

Or, read the following table by columns:
17,41,73,89,97,113,137,193,233,241,257,281,313,337,353,401,409,... (primes = = 1 mod 8)
3,11,19,43,59,67,83,107,131,139,163,179,211,227,251,283,307,331,... (primes == 3 mod 8)
5,13,29,37,53,61,101,109,149,157,173,181,197,229,269,277,293,317,... (primes == 5 mod 8)
7,23,31,47,71,79,103,127,151,167,191,199,223,239,263,271,311,359,... (primes == 7 mod 8)

Examples

			The first four primes congruent to (1,3,5,7) mod 8 are 17,3,5,7, hence a(1..4)=17,3,5,7;
The next four primes congruent to (1,3,5,7) mod 8 are 41,11,13,23, hence a(5..8)=41,11,13,23, etc.
		

Crossrefs

Programs

  • Mathematica
    s[i_]:=(c=0;a=2*i-1;Reap[Do[If[PrimeQ[a],c++;Sow[a]];If[c>99,Break[],a = a+8],{10^8}]][[2,1]]);Flatten[Transpose[Table[s[i],{i,4}]]]; (* Zak Seidov, Jan 16 2013 *)
Showing 1-6 of 6 results.