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

A191456 Primes p such that the polynomial x^2+x+p generates only primes for x=1..9.

Original entry on oeis.org

11, 17, 41, 844427, 51448361, 86966771, 122983031, 180078317, 960959381, 1278189947, 1761702947, 1829187287, 2426256797, 2911675511, 3013107257, 4778888351, 5221343711
Offset: 1

Views

Author

Zak Seidov, Jun 02 2011

Keywords

Crossrefs

Generates primes for x=1..k: A001359 (1), A022004 (2), A172454 (3), A187057 (4), A187058 (5), A144051 (6), A187060 (7), A190800 (8), this sequence (9), A191457 (10), A191458 (11), A253592 (12), A253605 (13). Each is by definition a subsequence of preceding sequences.
Subsequence such that x=10 gives a composite number: A211238.

Programs

A210360 Prime numbers p such that x^2 + x + p produces primes for x = 0..1 but not x = 2.

Original entry on oeis.org

3, 29, 59, 71, 137, 149, 179, 197, 239, 269, 281, 419, 431, 521, 569, 599, 617, 659, 809, 827, 1019, 1031, 1049, 1061, 1151, 1229, 1289, 1319, 1451, 1619, 1667, 1697, 1721, 1787, 1877, 1931, 1949, 2027, 2087, 2111, 2129, 2141, 2309, 2339, 2381, 2549, 2591
Offset: 1

Views

Author

T. D. Noe, Apr 05 2012

Keywords

Comments

The first term is A164926(2).

Crossrefs

Programs

  • Mathematica
    lookfor = 2; t = {}; n = 0; While[Length[t] < 50, n++; c = Prime[n]; i = 1; While[PrimeQ[i^2 + i + c], i++]; If[i == lookfor, AppendTo[t, c]]]; t

A210361 Prime numbers p such that x^2 + x + p produces primes for x = 0..2 but not x = 3.

Original entry on oeis.org

107, 191, 311, 461, 821, 857, 881, 1301, 1871, 1997, 2081, 2237, 2267, 2657, 3251, 3461, 3671, 4517, 4967, 5231, 5477, 5501, 5651, 6197, 6827, 7877, 8087, 8291, 8537, 8861, 9431, 10427, 10457, 11171, 12917, 13001, 13691, 13757, 13877, 14081, 14321, 15641
Offset: 1

Views

Author

T. D. Noe, Apr 05 2012

Keywords

Comments

The first term is A164926(3).

Crossrefs

Programs

  • Mathematica
    lookfor = 3; t = {}; n = 0; While[Length[t] < 50, n++; c = Prime[n]; i = 1; While[PrimeQ[i^2 + i + c], i++]; If[i == lookfor, AppendTo[t, c]]]; t

A210362 Prime numbers p such that x^2 + x + p produces primes for x = 0..3 but not x = 4.

Original entry on oeis.org

5, 101, 227, 1091, 1481, 1487, 3917, 4127, 4787, 8231, 9461, 10331, 11777, 12107, 14627, 16061, 20747, 25577, 27737, 29021, 32297, 33347, 35531, 35591, 36467, 38447, 39227, 41177, 42461, 44267, 44531, 49031, 59441, 69191, 77237, 79811, 80777, 93251, 93491
Offset: 1

Views

Author

T. D. Noe, Apr 05 2012

Keywords

Comments

The first term is A164926(4).

Crossrefs

Programs

  • Mathematica
    lookfor = 4; t = {}; n = 0; While[Length[t] < 50, n++; c = Prime[n]; i = 1; While[PrimeQ[i^2 + i + c], i++]; If[i == lookfor, AppendTo[t, c]]]; t
    Select[Prime[Range[10000]],AllTrue[#+{2,6,12},PrimeQ]&&!PrimeQ[#+20]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 26 2015 *)
    Select[Prime[Range[10000]],Boole[PrimeQ[#+{2,6,12,20}]]=={1,1,1,0}&] (* Harvey P. Dale, Nov 17 2024 *)

A210363 Prime numbers p such that x^2 + x + p produces primes for x = 0..4 but not x = 5.

Original entry on oeis.org

347, 641, 1427, 2687, 4001, 4637, 4931, 19421, 21011, 22271, 23741, 26711, 27941, 32057, 43781, 45821, 55331, 55817, 68207, 71327, 91571, 128657, 165701, 167621, 172421, 179897, 191447, 193871, 205421, 234191, 239231, 258107, 258611, 259157, 278807, 290021
Offset: 1

Views

Author

T. D. Noe, Apr 05 2012

Keywords

Comments

The first term is A164926(5).

Crossrefs

Programs

  • Mathematica
    lookfor = 5; t = {}; n = 0; While[Length[t] < 50, n++; c = Prime[n]; i = 1; While[PrimeQ[i^2 + i + c], i++]; If[i == lookfor, AppendTo[t, c]]]; t
    Select[Prime[Range[26000]],AllTrue[#+{2,6,12,20},PrimeQ] && !PrimeQ[ #+30]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 13 2017 *)
    Select[Prime[Range[26000]],Boole[PrimeQ[#+{2,6,12,20,30}]]=={1,1,1,1,0}&] (* Harvey P. Dale, May 29 2025 *)

A210364 Prime numbers p such that x^2 + x + p produces primes for x = 0..5 but not x = 6.

Original entry on oeis.org

1607, 3527, 13901, 31247, 33617, 55661, 68897, 97367, 166841, 195731, 221717, 347981, 348431, 354371, 416387, 506327, 548831, 566537, 929057, 954257, 1246367, 1265081, 1358801, 1505087, 1538081, 1595051, 1634441, 1749257, 2200811, 2322107, 2641547, 2697971
Offset: 1

Views

Author

T. D. Noe, Apr 05 2012

Keywords

Comments

The first term is A164926(6).

Crossrefs

Programs

  • Mathematica
    lookfor = 6; t = {}; n = 0; While[Length[t] < 50, n++; c = Prime[n]; i = 1; While[PrimeQ[i^2 + i + c], i++]; If[i == lookfor, AppendTo[t, c]]]; t

A210365 Prime numbers p such that x^2 + x + p produces primes for x = 0..6 but not x = 7.

Original entry on oeis.org

1277, 28277, 113147, 421697, 665111, 1164587, 1615631, 2798921, 2846771, 3053747, 5071667, 5093507, 5344247, 5706641, 6383051, 8396777, 10732817, 10812407, 11920367, 13176587, 16197947, 16462541, 16655447, 16943471, 17807831, 18102101, 20488901, 23421311
Offset: 1

Views

Author

T. D. Noe, Apr 05 2012

Keywords

Comments

The first term is A164926(7).

Crossrefs

Programs

  • Mathematica
    lookfor = 7; t = {}; n = 0; While[Length[t] < 30, n++; c = Prime[n]; i = 1; While[PrimeQ[i^2 + i + c], i++]; If[i == lookfor, AppendTo[t, c]]]; t

A370387 a(n) is the least prime p such that p + 6*k*(k+1) is prime for 0 <= k <= n-1 but not for k=n.

Original entry on oeis.org

2, 19, 5, 67, 7, 281, 1051, 6791, 11, 115599457, 365705201, 79352440891, 286351937491, 5810592517241, 17, 1942721697854617
Offset: 1

Views

Author

J.W.L. (Jan) Eerland, Mar 12 2024

Keywords

Comments

a(10), ..., a(14) > 10^7, a(15) = 17, a(16), ..., a(20) > 10^7.
a(29) = 31. - Chai Wah Wu, Apr 10 2024

Crossrefs

Programs

  • Maple
    f:= proc(p) local k;
      for k from 1 while isprime(p+k*(k+1)*6) do od:
      k
    end proc:
    A:= Vector(12): count:= 0:
    for i from 1 while count < 12 do
      v:= f(ithprime(i));
      if A[v] = 0 then count:= count+1; A[v]:= ithprime(i) fi
    od:
    convert(A,list);
  • Mathematica
    Table[p=1;m=6;Monitor[Parallelize[While[True,If[And[MemberQ[PrimeQ[Table[p+m*k*(k+1),{k,0,n-1}]],False]==False,PrimeQ[p+m*n*(n+1)]==False],Break[]];p++];p],p],{n,1,10}]
  • PARI
    isok(p, n) = for (k=0, n-1, if (! isprime(p + 6*k*(k+1)), return(0))); return (!isprime(p + 6*n*(n+1)));
    a(n) = my(p=2); while (!isok(p, n), p=nextprime(p+1)); p;
    
  • Perl
    use ntheory qw(:all); sub a { my $n = $[0]; my $lo = 2; my $hi = 2*$lo; while (1) { my @terms = grep { !is_prime($ + 6*$n*($n+1)) } sieve_prime_cluster($lo, $hi, map { 6*$*($+1) } 1 .. $n-1); return $terms[0] if @terms; $lo = $hi+1; $hi = 2*$lo; } }; $| = 1; for my $n (1..100) { print a($n), ", " } # Daniel Suteu, Dec 30 2024

Extensions

a(10)-a(11) from Chai Wah Wu, Apr 10 2024
a(12) from Chai Wah Wu, Apr 11 2024
a(13)-a(14) from David A. Corneth, Apr 11 2024
a(15) from J.W.L. (Jan) Eerland, Mar 12 2024
a(16) from Daniel Suteu, Dec 30 2024

A371024 a(n) is the least prime p such that p + 4*k*(k+1) is prime for 0 <= k <= n-1 but not for k=n.

Original entry on oeis.org

2, 3, 29, 5, 23, 269, 272879, 149, 61463, 929, 7426253, 2609, 233, 59, 78977932125503
Offset: 1

Views

Author

J.W.L. (Jan) Eerland, Mar 08 2024

Keywords

Comments

a(15) > 3277860277, a(16) > 3103623446, a(17) > 2853255995,
a(18) = 653, a(19) > 2480173428, a(20) > 2058783580, a(21) > 1894529774, a(22) > 1896261075, a(23) > 1836831342, a(24), ..., a(100) > 15000000.
Other than a(1)-a(14) and a(18), no terms < 24870000007. - Michael S. Branicky, Apr 12 2024
From David A. Corneth, Apr 12 2024: (Start)
Using remainders mod q we can restrict the search. For example for a(15) a term can only be 2, 3 or 5 (mod 7). Or maybe 7 itself. If a(15) = p == 1 (mod 7) then for k = 3 we have q + 4*3*(3+1) == 0 mod 7. Similarily number 0, 4 and 6 (mod 7) produce a multiple of 7 where they should not.
Doing so for various primes mod q we can reduce the number of remainders and with that the search space by combining the possible remainders using the Chinese Remainder Theorem (CRT).
So the possible remainders mod 2 are 1. The possible remainders mod 3 are 2. Using the CRT, a number of the form 1 (mod 2) and 2 (mod 3) simultaneously is of the form 5 (mod 6).
a(15) > 2.3*10^13 if it exists. (End)

Crossrefs

Programs

  • Maple
    f:= proc(p) local k;
      for k from 1 while isprime(p+k*(k+1)*4) do od:
      k
    end proc:
    A:= Vector(12): count:= 0:
    for i from 1 while count < 12 do
      v:= f(ithprime(i));
      if A[v] = 0 then count:= count+1; A[v]:= ithprime(i) fi
    od:
    convert(A,list);
  • Mathematica
    Table[p=1;m=4;Monitor[Parallelize[While[True,If[And[MemberQ[PrimeQ[Table[p+m*k*(k+1),{k,0,n-1}]],False]==False,PrimeQ[p+m*n*(n+1)]==False],Break[]];p++];p],p],{n,1,10}]
  • PARI
    isok(p, n) = for (k=0, n-1, if (! isprime(p + 4*k*(k+1)), return(0))); return (!isprime(p + 4*n*(n+1)));
    a(n) = my(p=2); while (!isok(p, n), p=nextprime(p+1)); p; \\ Michel Marcus, Mar 12 2024
    
  • Perl
    use ntheory qw(:all); sub a { my $n = $[0]; my $lo = 2; my $hi = 2*$lo; while (1) { my @terms = grep { !is_prime($ + 4*$n*($n+1)) } sieve_prime_cluster($lo, $hi, map { 4*$*($+1) } 1 .. $n-1); return $terms[0] if @terms; $lo = $hi+1; $hi = 2*$lo; } }; $| = 1; for my $n (1..100) { print a($n), ", " }; # Daniel Suteu, Dec 17 2024
  • Python
    from sympy import isprime, nextprime
    from itertools import count, islice
    def f(p):
        k = 1
        while isprime(p+4*k*(k+1)): k += 1
        return k
    def agen(verbose=False): # generator of terms
        adict, n, p = dict(), 1, 1
        while True:
            p = nextprime(p)
            v = f(p)
            if v not in adict:
                adict[v] = p
                if verbose: print("FOUND", v, p)
            while n in adict:
                yield adict[n]; n += 1
    print(list(islice(agen(), 14))) # Michael S. Branicky, Apr 12 2024
    

Extensions

a(15) from Daniel Suteu, Dec 17 2024

A165234 Least prime p such that 2x^2 + p produces primes for x=0..n-1 and composite for x=n.

Original entry on oeis.org

2, 17, 3, 1481, 5, 149, 569, 2081, 2339, 5939831, 11, 33164857769, 3217755097229, 272259344081, 17762917045631
Offset: 1

Views

Author

T. D. Noe, Sep 09 2009

Keywords

Comments

Other known values: a(14)=272259344081 and a(29)=29. There are no other terms less than 10^12. The primes p = 3, 5, 11, and 29 produce p consecutive distinct primes because the imaginary quadratic field Q(sqrt(-2p)) has class number 2. Assuming the prime k-tuples conjecture, this sequence is defined for n>0.

References

  • Paulo Ribenboim, My Numbers, My Friends, Springer,2000, pp. 349-350.

Crossrefs

Programs

  • Mathematica
    PrimeRun[p_Integer] := Module[{k=0}, While[PrimeQ[2k^2+p], k++ ]; k]; nn=9; t=Table[0,{nn}]; cnt=0; p=1; While[cnt
    				
  • PARI
    isok(p, n) = for (k=0, n-1, if(!isprime(p + 2*k^2), return(0))); return(!isprime(p + 2*n^2));
    a(n) = forprime(p=2, oo, if(isok(p, n), return(p))); \\ Daniel Suteu, Dec 22 2024
    
  • Perl
    use ntheory qw(:all); sub a { my $n = $[0]; my $lo = 2; my $hi = 2*$lo; while (1) { my @terms = grep { !is_prime($ + 2*$n*$n) } sieve_prime_cluster($lo, $hi, map { 2*$*$ } 1 .. $n-1); return $terms[0] if @terms; $lo = $hi+1; $hi = 2*$lo; } }; $| = 1; for my $n (1..100) { print a($n), ", " } # Daniel Suteu, Dec 22 2024

Extensions

a(13) and a(15) from Daniel Suteu, Dec 22 2024
Showing 1-10 of 23 results. Next