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.

Previous Showing 11-20 of 23 results. Next

A211238 Prime numbers p such that x^2 + x + p produces primes for x = 0..9 but not x = 10.

Original entry on oeis.org

11, 844427, 51448361, 86966771, 122983031, 960959381, 2426256797, 2911675511, 3013107257, 4778888351, 5221343711, 5258591537, 6430890287, 7156316591, 8518049207, 8828280941, 9467776751, 10687380227, 10783636931, 11856793337, 12128287007, 14431067237, 14772642497
Offset: 1

Views

Author

T. D. Noe, Apr 08 2012

Keywords

Comments

The first term is A164926(10).

Crossrefs

Programs

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

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

Original entry on oeis.org

21557, 26681, 128981, 2073347, 3992201, 4889237, 6184637, 11900501, 21456047, 24598361, 33771581, 34864211, 50943791, 55793951, 56421347, 61218251, 67787537, 69726647, 76345121, 86145881, 90261707, 92865791, 99624647, 102960281, 108846161
Offset: 1

Views

Author

T. D. Noe, Apr 08 2012

Keywords

Comments

The first term is A164926(8).

Crossrefs

Programs

  • Mathematica
    lookfor = 8; t = {}; n = 0; While[Length[t] < 25, n++; c = Prime[n]; i = 1; While[PrimeQ[i^2 + i + c], i++]; If[i == lookfor, AppendTo[t, c]]]; t
    Select[Prime[Range[6250000]],AllTrue[#+{2,6,12,20,30,42,56}, PrimeQ] && !PrimeQ[ #+72]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 04 2016 *)

A211237 Prime numbers p such that x^2 + x + p produces primes for x = 0..8 but not x = 9.

Original entry on oeis.org

51867197, 85776137, 93685301, 97122197, 107599757, 113575727, 118136267, 232728647, 316973621, 483040757, 564537761, 749930717, 840472307, 901288517, 1559839991, 1696818647, 2251028567, 2469604721, 2796607337, 3098938847, 3152692841, 3344410367
Offset: 1

Views

Author

T. D. Noe, Apr 08 2012

Keywords

Comments

The first term is A164926(9).

Crossrefs

Programs

  • Mathematica
    lookfor = 9; t = {}; n = 0; While[Length[t] < 25, n++; c = Prime[n]; i = 1; While[PrimeQ[i^2 + i + c], i++]; If[i == lookfor, AppendTo[t, c]]]; t
    Select[Prime[Range[31*10^5,65*10^5]],AllTrue[#+{2,6,12,20,30,42,56,72},PrimeQ] && CompositeQ[#+90]&] (* The program generates the first 6 terms of the sequence. To generate more, increase the second Range constant. *) (* Harvey P. Dale, Nov 02 2021 *)

A211239 Prime numbers p such that x^2 + x + p produces primes for x = 0..10 but not x = 11.

Original entry on oeis.org

180078317, 1278189947, 1829187287, 5862143447, 6369321857, 7226006861, 12412643261, 50626299797, 53039299211, 72355485857, 74621287901, 76233413141, 81948881447, 115826556611, 129077263697, 137168442221, 137376420947, 146539105871, 168759510737, 181122284501
Offset: 1

Views

Author

T. D. Noe, Apr 09 2012

Keywords

Comments

The first term is A164926(11).

Crossrefs

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

Original entry on oeis.org

17, 41, 8776320587, 10102729577, 273373448057, 1359854730821, 2131528031441, 2170341748697, 2308235320997, 3488995203761, 6508136293511, 9002680663721, 10351316646611, 10574937675011, 10972430075921, 14334964751111, 15853264017401, 27649987598537, 30431463129071, 35854761907577
Offset: 1

Views

Author

Zak Seidov, Jan 05 2015

Keywords

Crossrefs

Subsequence of A191458. Cf. A164926.

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

Original entry on oeis.org

2, 3, 59, 5, 89, 599, 3329, 617, 269, 21107, 9833477, 19497833669, 215830859597, 111338387, 251704297005767, 17
Offset: 1

Views

Author

J.W.L. (Jan) Eerland, Oct 01 2024

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(p) local k;
      for k from 1 while isprime(p+k*(k+1)*7) 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=7;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 + 7*k*(k+1)), return(0))); return (!isprime(p + 7*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($ + 7*$n*($n+1)) } sieve_prime_cluster($lo, $hi, map { 7*$*($+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, Oct 04 2024

Extensions

a(11)-a(12) from Hugo Pfoertner, Oct 01 2024
a(13)-a(14) from Hugo Pfoertner, Oct 03 2024
a(15)-a(16) from Daniel Suteu, Oct 04 2024

A211240 Prime numbers p such that x^2 + x + p produces primes for x = 0..11 but not x = 12.

Original entry on oeis.org

1761702947, 11085833111, 177558051107, 473787509537, 557149355507, 715464238661, 2236159108277, 2751203698151, 3247566894821, 3288002848511, 3424305123047, 3490420408691, 3729352769561, 3801308473871, 4296903559301, 4656625081181, 4837112125121, 5125165470701
Offset: 1

Views

Author

T. D. Noe, Apr 10 2012

Keywords

Comments

The first term is A164926(12).

Crossrefs

Extensions

a(7)-a(18) from Donovan Johnson, Apr 16 2012

A230663 Least prime p such that x^2 + 3*x + p produces primes for x = 0..n-1 but not x = n.

Original entry on oeis.org

2, 67, 3, 349, 79, 439, 21559, 14713, 13, 8123233, 223, 3468214093, 1701300344203, 11613197109589, 19
Offset: 1

Views

Author

Zak Seidov, Oct 27 2013

Keywords

Comments

a(39) = 43 and all other terms > 128865958933.

Crossrefs

Cf. A164926.

Programs

  • Mathematica
    Table[p = 2; While[! (Union[Table[PrimeQ[x^2 + 3*x + p], {x, 0, n - 1}]] == {True} && PrimeQ[n^2 + 3*n + p] == False), p = NextPrime[p]]; p, {n, 9}] (* T. D. Noe, Oct 29 2013 *)
  • PARI
    isok(p, n) = for (k=0, n-1, if(!isprime(p + k*(k+3)), return(0))); return(!isprime(p + n*(n+3)));
    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($ + $n*($n+3)) } sieve_prime_cluster($lo, $hi, map { $*($+3) } 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)-a(15) from Daniel Suteu, Dec 22 2024

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

Original entry on oeis.org

17, 41, 27649987598537, 30431463129071, 58326356511581, 161966446726157, 291598227841757
Offset: 1

Views

Author

Zak Seidov, Jan 05 2015

Keywords

Crossrefs

Subsequence of A253592 and A191458. Cf. A164926.

Programs

Extensions

a(5)-a(7) from Daniel Suteu, Dec 22 2024

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

Original entry on oeis.org

2, 3, 11, 5, 227, 17, 65837, 1607, 19427, 2397347207, 153535525937, 157542769194527, 29503289812427, 32467505340816977, 1109038455070356527, 143924005810811657, 305948728878647722727
Offset: 1

Views

Author

Robert C. Lyons, Aug 18 2022

Keywords

Comments

This sequence is a variation of A164926.
a(15) > 10^18. - Bert Dobbelaere, Aug 28 2022

Examples

			For n=5, 227 is the smallest prime such that 2^x - 2 + p produces primes for x=1..n and a composite for x=n+1. The following are the 5 primes that are produced: 227, 229, 233, 241, 257; note that the consecutive differences are 2, 4, 8, and 16.
For n=6, 17 is the smallest prime such that 2^x - 2 + p produces primes for x=1..n and a composite for x=n+1. The following are the 6 primes that are produced: 17, 19, 23, 31, 47, 79; note that the consecutive differences are 2, 4, 8, 16, and 32.
		

Crossrefs

Cf. A164926.

Programs

  • Python
    import sympy
    def get_longest_run_of_primes(p):
        run = [p]
        x = 2
        while True:
            next_prime = 2**x - 2 + p
            if sympy.isprime(next_prime):
                run.append(next_prime)
                x = x + 1
            else:
                break
        return run
    n_to_longest_run_map = {}
    max_prime_index = 100000
    for prime_index in range(1, max_prime_index+1):
        p = sympy.prime(prime_index)
        longest_run_for_p = get_longest_run_of_primes(p)
        length_of_longest_run_for_p = len(longest_run_for_p)
        if length_of_longest_run_for_p not in n_to_longest_run_map:
            n_to_longest_run_map[length_of_longest_run_for_p] = longest_run_for_p
    n = 1
    seq = []
    while n in n_to_longest_run_map:
        seq.append(n_to_longest_run_map[n][0])
        n = n + 1
    print(seq)

Extensions

a(10)-a(14), a(16) from Bert Dobbelaere, Aug 28 2022
a(15) from Norman Luhn, Dec 15 2022
a(17) from Norman Luhn, Dec 17 2022
Previous Showing 11-20 of 23 results. Next