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.

A023251 Primes that remain prime through 2 iterations of function f(x) = 4x + 9.

Original entry on oeis.org

7, 41, 43, 47, 67, 71, 97, 103, 137, 263, 293, 307, 397, 421, 467, 491, 571, 587, 593, 683, 727, 757, 883, 907, 1021, 1061, 1063, 1097, 1153, 1373, 1427, 1433, 1453, 1523, 1567, 1657, 1747, 1811, 1867, 2141, 2251, 2281, 2287, 2647, 2693, 2791, 2797, 2857, 2927
Offset: 1

Views

Author

Keywords

Comments

Primes p such that 4*p+9 and 16*p+45 are also primes. - Vincenzo Librandi, Aug 04 2010

Crossrefs

Subsequence of A111199.

Programs

  • Magma
    [n: n in [0..100000] | IsPrime(n) and IsPrime(4*n+9) and IsPrime(16*n+45)]; // Vincenzo Librandi, Aug 04 2010
  • Mathematica
    rpQ[n_]:=AllTrue[Rest[NestList[4#+9&,n,2]],PrimeQ]; Select[Prime[ Range[ 500]],rpQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 03 2019 *)

A023282 Primes that remain prime through 3 iterations of function f(x) = 4x + 9.

Original entry on oeis.org

71, 97, 103, 263, 883, 907, 1747, 1867, 2251, 2281, 2693, 2791, 2857, 3067, 3541, 4073, 4513, 4597, 4663, 4793, 6047, 6971, 6983, 8761, 9091, 9203, 9311, 9377, 10343, 11131, 11437, 12037, 12107, 12401, 13451, 13627, 14887, 15881, 16217, 16301, 16493, 16871
Offset: 1

Views

Author

Keywords

Comments

Primes p such that 4*p+9, 16*p+45 and 64*p+189 are also primes. - Vincenzo Librandi, Aug 04 2010

Crossrefs

Subsequence of A023216, A023251, and of A111199.

Programs

  • Magma
    [n: n in [1..150000] | IsPrime(n) and IsPrime(4*n+9) and IsPrime(16*n+45) and IsPrime(64*n+189)] // Vincenzo Librandi, Aug 04 2010
  • Mathematica
    Select[Prime@ Range@ 2100, Times @@ Boole@ PrimeQ@ Rest@ NestList[4 # + 9 &, #, 3] > 0 &] (* Michael De Vlieger, Sep 20 2016 *)

A023312 Primes that remain prime through 4 iterations of function f(x) = 4x + 9.

Original entry on oeis.org

883, 2857, 4073, 4663, 9311, 11131, 16493, 18257, 19541, 22063, 28687, 35837, 48383, 55817, 59393, 62131, 71387, 73037, 73133, 78173, 83423, 86111, 88261, 90511, 93287, 93811, 99377, 101051, 104537, 122203, 125927, 149497, 152377, 153941, 155653
Offset: 1

Views

Author

Keywords

Comments

Primes p such that 4*p+9, 16*p+45, 64*p+189 and 256*p+765 are also primes. - Vincenzo Librandi, Aug 04 2010

Crossrefs

Subsequence of A023216, A023251, A023282, and A111199.

Programs

  • Magma
    [n: n in [1..1000000] | IsPrime(n) and IsPrime(4*n+9) and IsPrime(16*n+45) and IsPrime(64*n+189) and IsPrime(256*n+765)] // Vincenzo Librandi, Aug 04 2010

A023340 Primes that remain prime through 5 iterations of function f(x) = 4x + 9.

Original entry on oeis.org

18257, 19541, 22063, 48383, 73037, 73133, 78173, 88261, 93811, 101051, 104537, 152377, 153941, 162343, 168043, 175523, 204251, 211681, 238463, 287341, 375253, 386713, 423961, 659513, 672181, 676103, 688027, 741283, 759491, 770951, 786673
Offset: 1

Views

Author

Keywords

Comments

Primes p such that 4*p+9, 16*p+45, 64*p+189, 256*p+765 and 1024*p+3069 are also primes. - Vincenzo Librandi, Aug 05 2010

Crossrefs

Subsequence of A023216, A023251, A023282, A023312, and A111199.

Programs

  • Magma
    [n: n in [1..10000000] | IsPrime(n) and IsPrime(4*n+9) and IsPrime(16*n+45) and IsPrime(64*n+189) and IsPrime(256*n+765) and IsPrime(1024*n+3069)] // Vincenzo Librandi, Aug 05 2010
    
  • PARI
    is(n)=isprime(n) && isprime(4*n+9) && isprime(16*n+45) && isprime(64*n+189) && isprime(256*n+765) && isprime(1024*n+3069) \\ Charles R Greathouse IV, Oct 11 2016

A153464 Numbers k such that 4*k+9 is not prime.

Original entry on oeis.org

0, 3, 4, 6, 9, 10, 12, 14, 15, 17, 18, 19, 21, 24, 27, 28, 29, 30, 31, 33, 34, 36, 38, 39, 40, 42, 44, 45, 48, 49, 50, 51, 52, 53, 54, 57, 59, 60, 61, 63, 64, 66, 69, 70, 72, 73, 74, 75, 78, 79, 80, 81, 83, 84, 87, 88, 89, 90, 92, 93, 94, 96, 99, 101, 102, 104, 105
Offset: 1

Views

Author

Vincenzo Librandi, Dec 27 2008

Keywords

Examples

			Distribution of the terms in the following triangular array:
  0;
  *,4;
  3,*,10;
  *,9,*,18;
  6,*,17,*,28;
  *,14,*,27,*,40;
  9,*,24,*,39,*,54;
  *,19,*,36,*,53,*,70;
  12,*,31,*,50,*,69,*,88;
  *,24,*,45,*,66,*,87,*,108;
  15,*,38,*,61,*,84,*,107,*,130; etc.
where * marks the non-integer values of (2*h*k + k + h - 4)/2 with h >= k >= 1. - _Vincenzo Librandi_, Jan 14 2013
		

Crossrefs

Cf. A111199.

Programs

  • Magma
    [n: n in [0..150] | not IsPrime(4*n+9)]; // Vincenzo Librandi, Jan 14 2013
  • Mathematica
    Select[Range[0, 200], !PrimeQ[4 # + 9] &] (* Vincenzo Librandi, Jan 14 2013 *)

Extensions

79 added by R. J. Mathar, Sep 23 2009
0 added by Arkadiusz Wesolowski, Aug 03 2011

A378964 a(n) is the least prime of the form p^2 + n*q^2 where p and q are primes, or -1 if there are none.

Original entry on oeis.org

13, 17, 31, 41, 29, 73, 37, 41, 61, 89, 53, 73, 61, 151, 109, 73, 157, 97, 101, 89, 109, 97, 101, 241, 109, 113, 157, 137, -1, 241, 149, 137, 157, 257, 149, 193, 157, 367, 181, 281, 173, 193, 181, 421, 229, 193, 197, 241, 317, 499, 229, 233, -1, 241, 229, 233, 277, 241, -1, 409, 269, 257, 277
Offset: 1

Views

Author

Robert Israel, Dec 12 2024

Keywords

Comments

Green and Sawhney (see link) proved that there are infinitely many such primes if n == 0 or 4 (mod 6).
If n is odd, p or q must be 2.
If n == 2 (mod 3), p or q must be 3.
Thus if n == 5 (mod 6), the only possible primes of this form are 9 + 4 n and 4 + 9 n.

Examples

			a(6) = 73 because 73 = 7^2 + 6 * 2^2 is the least prime of the form p^2 + 6 * q^2.
		

Crossrefs

Cf. A111199 (a(n) = 9+4*n).

Programs

  • Maple
    f:= proc(n) uses priqueue;
        local pq, p, t;
        if n mod 6 = 5 then
          if isprime(3^2 + n * 2^2) then return 3^2 + n*2^2
          elif isprime(2^2 + n*3^2) then return 2^2 + n*3^2
          else return -1
        fi fi;
        initialize(pq);
        insert([-9 - 4*n,3,2],pq);
        insert([-4 - 9*n,2,3],pq);
        if n mod 3 = 2 then
          do
            t:= extract(pq);
            if isprime(-t[1]) then return -t[1] fi;
            if t[2] = 3 then p:= nextprime(t[3]); if p = 3 then p:= 5 fi; insert([-9 - n*p^2,3,p],pq) fi;
            if t[3] = 3 then p:= nextprime(t[2]); if p = 3 then p:= 5 fi; insert([-p^2 - n*9,p,3],pq) fi;
          od
        else
          do
            t:= extract(pq);
            if isprime(-t[1]) then return -t[1] fi;
            if t[3] = 2  then p:= nextprime(t[2]); insert([-p^2 - n*4  , p, 2],pq) fi;
            if t[2] = 2 or n::even then
              p:= nextprime(t[3]); insert([-t[2]^2 - n*p^2,t[2],p],pq)
            fi;
          od
        fi
    end proc:
    map(f, [$1..200]);
Showing 1-6 of 6 results.