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

A027754 Numbers k such that k^2 + k + 5 is prime.

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 11, 16, 17, 18, 21, 23, 27, 31, 32, 38, 42, 48, 51, 62, 67, 72, 73, 76, 77, 83, 86, 91, 93, 97, 108, 111, 116, 121, 126, 133, 136, 137, 146, 153, 158, 163, 172, 177, 182, 188, 191, 192, 193, 202, 212, 213, 216, 223, 226, 231, 247, 248
Offset: 1

Views

Author

Keywords

Examples

			Since 3^2 + 3 + 5 = 17, which is prime, 3 is in the sequence.
Since 4^2 + 4 + 5 = 25 = 5^2, 4 is not in the sequence.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..1000] |IsPrime(n^2+n+5)] // Vincenzo Librandi, Nov 20 2010
  • Mathematica
    Select[Range[0, 499], PrimeQ[#^2 + # + 5] &] (* Alonso del Arte, Nov 28 2016 *)

A028823 Numbers k such that k^2 + k + 17 is prime.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18, 19, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 35, 37, 38, 40, 42, 44, 45, 46, 47, 49, 53, 56, 57, 59, 60, 62, 63, 64, 70, 72, 73, 75, 76, 79, 81, 82, 86, 87, 91, 92, 95, 98, 103, 104, 108, 109, 110, 113, 114
Offset: 1

Views

Author

Keywords

Comments

Complement of A007636. - Michel Marcus, Jun 17 2013

Examples

			15^2 + 15 + 17 = 257, which is prime, so 15 is in the sequence.
16^2 + 16 + 17 = 289 = 17^2, so 16 is not in the sequence. Much more obviously, 17 is not in the sequence either.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..1000] |IsPrime(n^2+n+17)] // Vincenzo Librandi, Nov 19 2010
    
  • Mathematica
    Select[Range[0, 199], PrimeQ[#^2 + # + 17] &] (* Indranil Ghosh, Mar 19 2017 *)
  • PARI
    is(n)=isprime(n^2+n+17) \\ Charles R Greathouse IV, Feb 20 2017
    
  • Python
    from sympy import isprime
    print([n for n in range(201) if isprime(n**2 + n + 17)]) # Indranil Ghosh, Mar 19 2017

A092749 a(n) is the least k such that m^2 + m + k is prime for m = 0..n.

Original entry on oeis.org

2, 3, 5, 5, 11, 11, 11, 11, 11, 11, 17, 17, 17, 17, 17, 17, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41
Offset: 0

Views

Author

Gabriel Cunningham (gcasey(AT)mit.edu), Apr 12 2004

Keywords

Comments

From Pieter Moree (moree(AT)mpim-bonn.mpg.de), Apr 16 2004: (Start)
The numbers 2, 3, 5, 11, 17, and 41 above are the only numbers B such that m^2+m+B is prime for m=0,...,B-2; this can be proved (see Mollin's paper) and is closely related to the celebrated Rabinowitsch criterion.
Since the value of m^2+m+B is B^2 for m=B-1, one cannot possibly do better than this.
An obvious question of course is whether for given n, a(n) exists at all. This is far from obvious. Assuming the generally believed k-tuplets conjecture, the answer is yes as was shown by Andrew Granville. For a proof (which is not very difficult) see the paper by Mollin.
It is also known, due to work of Lukes, Patterson and Williams, that any further elements in the above sequence, if they exist, exceed 10^18.
(End)
George Bright conjectured that a(n) exists for every n (private communication, 1974; see Dudley). - Charles R Greathouse IV, Sep 12 2013
Least prime in a succession of primes whose difference are n consecutive even numbers. - Robert G. Wilson v, Sep 30 2013
From Altug Alkan, Oct 06 2017: (Start)
Let b_i(n) be the least k such that i*(m^2 + m) + k is prime for m = 0..n and this sequence be the b_1(n) and b_3(n) be the A256302(n). Some initial values of b_i(n) for 2 <= i <= 7 are:
b_2(n): 2, 3, 7, 7, 7, 7, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19.
b_4(n): 2, 3, 5, 5, 23, 59, 59, 59, 59, 59, 59, 59, 59, 59, 653, 653, 653, 653.
b_5(n): 2, 3, 7, 7, 7, 7, 13, 13, 13, 13, 13, 13.
b_6(n): 2, 5, 5, 7, 7, 11, 11, 11, 11, 17, 17, 17, 17, 17, 17, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31.
b_7(n): 2, 3, 5, 5, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17. (End)

Examples

			a(1) = 3 because 0^2 + 0 + 3 = 3 is prime and 1^2 + 1 + 3 = 5 is prime and it is the smallest number with the required properties.
a(2) = 5 because 5, 7, and 11 are primes; a(3) = 5 because 5, 7, 11, and 17 are primes; a(4) = 11 because 11, 13, 17, 23, and 31 are prime. - _Robert G. Wilson v_, Sep 30 2013
		

References

  • Underwood Dudley, Mathematical Cranks, MAA: Washington, DC, 1992. See pp. 62f.
  • R. F. Lukes, C. D. Patterson, and H. C. Williams, Numerical sieving devices: their history and some applications, Nieuw Archief Wisk. 13 (1995), pp. 113-139.

Crossrefs

Cf. A014556.

Programs

  • Mathematica
    allPrime[n_, k_] := And @@ PrimeQ[Table[m^2 + m + k, {m, 0, n}]]; Table[k = 0; While[! allPrime[n, k], k++]; k, {n, 0, 39}] (* T. D. Noe, Mar 05 2012 *)
    f[n_] := Block[{p = FoldList[#1 + #2 &, 1, 2 Range@ n]}, While[ Union[ PrimeQ@ p][[1]] == False, p = p + 2]; p[[1]]]; f[0] = 2; Array[f, 40, 0] (* Robert G. Wilson v, Sep 30 2013 *)
  • PARI
    isok(k,n) = {for (m=0, n, if (!isprime(m^2 + m + k), return(0));); return (1);}
    a(n) = {my(k = 0); while(!isok(k,n), k++); k;} \\ Michel Marcus, Oct 06 2017

A273756 Least p for which min { x >= 0 | p + (2n+1)*x + x^2 is composite } reaches the (local) maximum given in A273770.

Original entry on oeis.org

41, 43, 47, 53, 61, 71, 83, 97, 113, 131, 151, 173, 197, 223, 251, 281, 313, 347, 383, 421, 461, 503, 547, 593, 641, 691, 743, 797, 73303, 73361, 73421, 73483, 3443897, 3071069, 3071137, 15949847, 76553693, 365462323, 365462399, 2204597, 9721, 1842719, 246407633, 246407719, 246407807, 246407897, 246407989
Offset: 0

Views

Author

M. F. Hasler, May 26 2016

Keywords

Comments

All terms are prime, since this is necessary and sufficient to get a prime for x = 0.
The values given in A273770 are the number of consecutive primes obtained for x = 0, 1, 2, ....
Sequence A273595 is the subsequence of terms for which 2n+1 is prime.
For even coefficients of the linear term, the answer would always be q=2, the only choice that yields a prime for x=0 and also for x=1 if (coefficient of the linear term)+3 is prime.
The initial term a(n=0) = 41 corresponds to Euler's famous prime-generating polynomial 41+x+x^2. Some subsequent terms are equal to the primes this polynomial takes for x=1,2,3,.... This stems from the fact that adding 2 to the coefficient of the linear term is equivalent to shifting the x-variable by 1. Since here we require x >= 0, we find a reduced subset of the previous sequence of primes, missing the first one, starting with q equal to the second one. (It is known that there is no better prime-generating polynomial of this form than Euler's, see the MathWorld page and A014556. "Better" means a larger p producing p-1 primes in a row. However, the prime k-tuple conjecture suggests that there should be arbitrarily long runs of primes of this form (for much larger p), i.e., longer than 41, but certainly much less than the respective p. Therefore we speak of local maxima.)

Crossrefs

Cf. also A002837 (n such that n^2-n+41 is prime), A007634 (n such that n^2+n+41 is composite), A005846 (primes of form n^2+n+41), A097823, A144051, A187057 ... A187060, A190800, A191456 ff.
The first line of data coincides with that of A202018, A107448, A155884 (and also A140755, A142719, except for some initial terms), which are all related.

Programs

  • PARI
    A273756(n,p=2*n+1,L=10^(5+n\10),m=0,Q)={forprime(q=1,L, for(x=1,oo, ispseudoprime(q+p*x+x^2)&& next; x>m&& [Q=q,m=x]; break));Q}

Extensions

Edited, following a remark by Don Reble, by M. F. Hasler, Jan 23 2018
a(27) corrected and more terms from Don Reble, Feb 15 2018

A302445 Triangle read by rows: row n gives primes of form k^2 + n - k for 0 < k < n.

Original entry on oeis.org

2, 3, 5, 5, 7, 11, 17, 7, 13, 19, 37, 11, 29, 11, 13, 17, 23, 31, 41, 53, 67, 83, 101, 13, 19, 43, 103, 17, 71, 197, 17, 19, 23, 29, 37, 47, 59, 73, 89, 107, 127, 149, 173, 199, 227, 257, 19, 31, 61, 109, 151, 229, 23, 41, 131, 293, 401, 23, 29, 43, 53, 79, 113, 179, 233, 263, 443
Offset: 2

Views

Author

Seiichi Manyama, Apr 08 2018

Keywords

Examples

			  n\k|  1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16
  ---+-----------------------------------------------------------------------
    2|  2;
    3|  3,  5;
    4|
    5|  5,  7, 11, 17;
    6|
    7|  7,   , 13, 19,   , 37;
    8|
    9|   , 11,   ,   , 29,   ,   ,   ;
   10|
   11| 11, 13, 17, 23, 31, 41, 53, 67, 83, 101;
   12|
   13| 13,   , 19,   ,   , 43,   ,   ,   , 103,    ,    ;
   14|
   15|   , 17,   ,   ,   ,   ,   , 71,   ,    ,    ,    ,    , 197;
   16|
   17| 17, 19, 23, 29, 37, 47, 59, 73, 89, 107, 127, 149, 173, 199, 227, 257;
		

Crossrefs

Row n: A027753 (n=3), A027755 (n=5), A048059 (n=11), A007635 (n=17), A005846 (n=41).

Programs

  • GAP
    a:=Filtered(Flat(List([1..10],n->List([1..n],k->k^2+n-k))),IsPrime); # Muniru A Asiru, Apr 09 2018
  • Mathematica
    Map[Union@ Select[#, PrimeQ] &, Table[k^2 + n - k, {n, 23}, {k, 0, n}]] // Flatten (* Michael De Vlieger, Apr 10 2018 *)

A253827 a(n) is the number of primes of the form x^2 + x + prime(n) for 0 <= x <=prime(n).

Original entry on oeis.org

1, 2, 4, 4, 10, 4, 16, 6, 10, 13, 14, 16, 40, 8, 26, 19, 34, 21, 36, 28, 18, 18, 34, 27, 31, 68, 16, 71, 30, 23, 37, 37, 67, 44, 54, 55, 54, 26, 65, 50, 70, 68, 79, 43, 60, 70, 52, 51, 132, 38, 60, 100, 59, 111, 114, 84, 77, 68, 78, 105, 49, 67, 124, 145, 35
Offset: 1

Views

Author

Michel Lagneau, Jan 16 2015

Keywords

Comments

Equivalently, number of distinct primes of the form x^2 - x + prime(n) for 0 <= x <= prime(n). (The point is that x^2 + x = (x+1)^2 - (x+1), so the two forms give the same numbers. x^2 - x + prime(n) is the same for x=0 and x=1, which is why the "distinct" in the comment. - Robert Israel, Oct 09 2016)
1 <= a(n) <= prime(n)-1. a(n) = prime(n)-1 iff n is in A014556. Are there any n > 1 such that a(n) = 1? - Robert Israel, Jan 16 2015

Examples

			a(13) = 40 because prime(13) = 41 and x^2 + x + 41 generates 40 prime numbers for x = 0..41.
		

Crossrefs

Programs

  • Maple
    f:= proc(n)
    local p,x;
    p:= ithprime(n);
    nops(select(isprime, [seq(x^2+x+p,x=0..p)]))
    end proc:
    seq(f(n), n=1..100); # Robert Israel, Jan 16 2015
  • Mathematica
    lst={};Do[p=Prime[n];k=0;Do[If[PrimeQ[x^2+x+p],k=k+1],{x,0,p}];AppendTo[lst,k],{n,1,100}];lst
    Table[With[{p=Prime[n]},Count[Table[x^2+x+p,{x,0,p}],?PrimeQ]],{n,70}] (* _Harvey P. Dale, May 27 2018 *)
  • PARI
    a(n) = my(p=prime(n)); sum(k=0, p, isprime(subst(x^2+x+p, x, k))); \\ Michel Marcus, Jan 16 2015

A302826 a(n) is number of primes of form k^2 + n - k for 0 < k < n.

Original entry on oeis.org

1, 2, 0, 4, 0, 4, 0, 2, 0, 10, 0, 4, 0, 3, 0, 16, 0, 6, 0, 5, 0, 10, 0, 10, 0, 5, 0, 13, 0, 14, 0, 3, 0, 10, 0, 16, 0, 7, 0, 40, 0, 8, 0, 6, 0, 26, 0, 12, 0, 9, 0, 19, 0, 14, 0, 9, 0, 34, 0, 21, 0, 5, 0, 19, 0, 36, 0, 13, 0, 28, 0, 18, 0, 7, 0, 31, 0, 18, 0, 19, 0, 34, 0, 15
Offset: 2

Views

Author

Seiichi Manyama, Apr 14 2018

Keywords

Examples

			Primes of form k^2 + n - k for 0 < k < n:
  n\k|  1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16  |a(n)
  ---+------------------------------------------------------------------------+----
    2|  2;                                                                    |  1
    3|  3,  5;                                                                |  2
    4|                                                                        |  0
    5|  5,  7, 11, 17;                                                        |  4
    6|                                                                        |  0
    7|  7,   , 13, 19,   , 37;                                                |  4
    8|                                                                        |  0
    9|   , 11,   ,   , 29,   ,   ,   ;                                        |  2
   10|                                                                        |  0
   11| 11, 13, 17, 23, 31, 41, 53, 67, 83, 101;                               | 10
   12|                                                                        |  0
   13| 13,   , 19,   ,   , 43,   ,   ,   , 103,    ,    ;                     |  4
   14|                                                                        |  0
   15|   , 17,   ,   ,   ,   ,   , 71,   ,    ,    ,    ,    , 197;           |  3
   16|                                                                        |  0
   17| 17, 19, 23, 29, 37, 47, 59, 73, 89, 107, 127, 149, 173, 199, 227, 257; | 16
		

Crossrefs

A196230 Euler primes: values of x^2 - x + k for x = 1..k-1, where k is one of Euler's "lucky" numbers 2, 3, 5, 11, 17, 41.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 83, 89, 97, 101, 107, 113, 127, 131, 149, 151, 173, 197, 199, 223, 227, 251, 257, 281, 313, 347, 383, 421, 461, 503, 547, 593, 641, 691, 743, 797, 853, 911, 971, 1033, 1097, 1163, 1231, 1301, 1373, 1447, 1523, 1601
Offset: 1

Views

Author

Jonathan Sondow, Oct 29 2011

Keywords

Comments

See A198245 for another sequence of "Euler primes". - N. J. A. Sloane, May 29 2022
All terms are prime numbers.
k is an Euler "lucky" number iff 4k-1 is a Heegner number 1, 2, 3, 7, 11, 19, 43, 67, 163.
See A014556 (Euler's "lucky" numbers) and A003173 (Heegner numbers) for additional references and links.

Examples

			The prime 1601 is a member because 40^2-40+41 = 1601.
		

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, p. 225.

Crossrefs

Programs

  • Mathematica
    H = {2, 3, 5, 11, 17, 41}; Union[Flatten[Table[ Array[ #^2 - # + H[[k]] &, H[[k]] - 1], {k, 1, 6}]]]

A208645 Least x>0 such that x^2+x+n is not prime.

Original entry on oeis.org

2, 4, 1, 2, 1, 4, 1, 1, 1, 2, 1, 10, 1, 1, 1, 2, 1, 16, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 4, 1, 1, 1, 2, 1, 40, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 6, 1, 1, 1, 2, 1, 1, 1, 1
Offset: 0

Views

Author

M. F. Hasler, Mar 03 2012

Keywords

Comments

By definition, a(n)>0 for all n, and a(n)>1 if n+2 is prime.

Examples

			a(0)=2 since 1^2+1+0=2 is prime, but 2^2+2+0=6 is composite.
a(1)=4 since 1^2+1+1=2, 2^2+2+1=7 and 3^2+3+1=13 are prime, but 4^2+4+1=21 is composite.
		

Crossrefs

Programs

  • Mathematica
    lx[n_]:=Module[{x=1},While[PrimeQ[x^2+x+n],x++];x]; Array[lx, 90, 0] (* Harvey P. Dale, Aug 14 2013 *)
  • PARI
    a(n)=for( x=1, n+3, isprime(x^2+x+n) || return(x))

A268109 Terms of A268101 without repetition.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 41, 647, 1277, 1979, 2753
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jan 26 2016

Keywords

Crossrefs

Cf. A268101. Supersequence of A014556.
Previous Showing 11-20 of 26 results. Next