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

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

Original entry on oeis.org

0, 6, 12, 36, 48, 72, 78, 96, 114, 126, 162, 168, 198, 204, 246, 258, 294, 336, 342, 372, 414, 432, 456, 462, 492, 504, 516, 534, 552, 576, 588, 594, 624, 666, 714, 726, 756, 768, 786, 792, 798, 804, 834, 852, 876, 888, 918, 954, 996
Offset: 1

Views

Author

Cino Hilliard, Dec 26 2002

Keywords

Comments

The sum of the reciprocals of the primes generated from these indices converges to 0.2332142.. The sum of the reciprocals of these indices cannot be computed.
All terms are divisible by 6. - Zak Seidov, Dec 27 2014

Crossrefs

For the primes see A056905(n).
Other sequences of the type "Numbers k such that k^2 + i is prime": A005574 (i=1), A067201 (i=2), A049422 (i=3), A007591 (i=4), this sequence (i=5), A114269 (i=6), A114270 (i=7), A114271 (i=8), A114272 (i=9), A114273 (i=10), A114274 (i=11), A114275 (i=12).

Programs

  • Magma
    [n: n in [0..1000]| IsPrime(n^2+5)]; // Vincenzo Librandi, Jul 15 2012
  • Mathematica
    Select[Range[0,1000],PrimeQ[#^2+5]&] (* Vincenzo Librandi, Jul 13 2012 *)
  • PARI
    for(n=0,10^4,q=n^2+5;if(isprime(q),print1(n,", ")));
    

Formula

a(n) = 6 * A056906(n).

Extensions

Offset corrected by Arkadiusz Wesolowski, Aug 09 2011

A056909 Primes of the form k^2+6.

Original entry on oeis.org

7, 31, 127, 367, 631, 967, 1231, 3727, 4231, 6247, 7927, 8287, 11887, 17167, 21031, 22807, 30631, 34231, 39607, 48847, 72367, 108247, 109567, 126031, 160807, 185767, 198031, 231367, 235231, 261127, 265231, 279847, 290527, 323767, 354031, 366031, 373327, 421207
Offset: 1

Views

Author

Henry Bottomley, Jul 07 2000

Keywords

Comments

a(n) mod 120 = 7 or 31 for all n.

Examples

			a(2)=127 since 11^2+6=127 which is prime.
		

Crossrefs

Programs

  • Magma
    [a: n in [0..700] | IsPrime(a) where a is n^2+6]; // Vincenzo Librandi, Nov 30 2011
    
  • Mathematica
    Intersection[Table[n^2+6,{n,0,10^2}],Prime[Range[9*10^3]]] (* or *) For[i=6,i<=6,a={};Do[If[PrimeQ[n^2+i],AppendTo[a,n^2+i]],{n,0,100}];Print["n^2+",i,",",a];i++ ] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
    Select[Table[n^2+6,{n,0,7000}],PrimeQ] (* Vincenzo Librandi, Nov 30 2011 *)
  • PARI
    list(lim)=my(v=List(),t); forstep(k=1,sqrtint(lim\1-6),2, if(isprime(t=k^2+6), listput(v,t))); Vec(v) \\ Charles R Greathouse IV, Nov 06 2024

Formula

a(n) = 36*A056910(n)^2 + 12*A056910(n) + 7.
a(n) >> n^2 log n. - Charles R Greathouse IV, Nov 06 2024

A242333 Numbers k such that k^2 + 5 is a semiprime.

Original entry on oeis.org

1, 2, 3, 4, 8, 9, 14, 18, 21, 22, 24, 26, 27, 28, 30, 33, 42, 44, 51, 54, 57, 58, 62, 63, 64, 68, 69, 82, 84, 86, 90, 93, 98, 99, 102, 104, 108, 111, 118, 132, 134, 138, 144, 152, 154, 156, 166, 174, 177, 180, 183, 184, 186, 188, 189, 194, 208, 210, 212, 216
Offset: 1

Views

Author

Vincenzo Librandi, May 14 2014

Keywords

Comments

The semiprimes of this form are: 6, 9, 14, 21, 69, 86, 201, 329, 446, 489, 581, 681, 734, 789, 905, 1094, 1769, 1941, 2606, 2921, 3254, ...

Crossrefs

Programs

  • Magma
    IsSemiprime:=func; [n: n in [0..300] | IsSemiprime(s) where s is n^2+5];
  • Mathematica
    Select[Range[0, 300], PrimeOmega[#^2 + 5] == 2 &]

A056906 Numbers k such that 36*k^2 + 5 is prime.

Original entry on oeis.org

0, 1, 2, 6, 8, 12, 13, 16, 19, 21, 27, 28, 33, 34, 41, 43, 49, 56, 57, 62, 69, 72, 76, 77, 82, 84, 86, 89, 92, 96, 98, 99, 104, 111, 119, 121, 126, 128, 131, 132, 133, 134, 139, 142, 146, 148, 153, 159, 166, 168, 169, 173, 174
Offset: 1

Author

Henry Bottomley, Jul 07 2000

Keywords

Comments

Except for a(1), a(n) is never a multiple of 5.

Examples

			a(3)=2 since 36*2^2 + 5 = 149, which is prime.
		

Crossrefs

This sequence and formula generate all primes of the form k^2+5, i.e., A056905.
Except for the first term, this sequence is a subsequence of A047201.

Programs

Formula

a(n) = sqrt(A056905(n)-5)/6.

Extensions

Offset corrected by Arkadiusz Wesolowski, Aug 09 2011

A228244 Primes of the form k^2 + 17.

Original entry on oeis.org

17, 53, 593, 3617, 4373, 6101, 8117, 11681, 20753, 26261, 30293, 34613, 54773, 63521, 86453, 90017, 101141, 108917, 112913, 116981, 138401, 156833, 176417, 191861, 207953, 213461, 219041, 248021, 278801, 352853, 404513, 419921, 427733, 451601, 518417, 562517
Offset: 1

Author

Michel Marcus, Aug 18 2013

Keywords

Examples

			17 = 0^2 + 17 is prime.
53 = 6^2 + 17 is prime.
		

Programs

  • Magma
    [m: n in [0..900] | IsPrime(m) where m is n^2+17]; // Bruno Berselli, Aug 18 2013
  • Mathematica
    Select[Table[n^2 + 17, {n, 0, 900}], PrimeQ] (* Bruno Berselli, Aug 18 2013 *)
  • PARI
    isp(n) = isprime(n) && issquare(n-17);
    

Formula

a(n) = A241847(A264790(n)). - Elmo R. Oliveira, Apr 21 2025

A059843 a(n) is the smallest prime p such that p-n is a nonzero square.

Original entry on oeis.org

2, 3, 7, 5, 41, 7, 11, 17, 13, 11, 47, 13, 17, 23, 19, 17, 53, 19, 23, 29, 37, 23, 59, 73, 29, 107, 31, 29, 173, 31, 47, 41, 37, 43, 71, 37, 41, 47, 43, 41, 617, 43, 47, 53, 61, 47, 83, 73, 53, 59, 67, 53, 89, 79, 59, 137, 61, 59, 383, 61, 97, 71, 67, 73, 101, 67, 71, 149, 73
Offset: 1

Author

Labos Elemer, Feb 26 2001

Keywords

Examples

			For n = 17, let P = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,...} be the set of primes, then P - 17 = {-15,...,-4,0,2,6,12,14,20,24,26,30,36,...}. The first positive square in P - 17 is 36 with p = 53, so a(17) = 53. The square arising here is usually 1.
		

Crossrefs

These terms arise in A002496, A056899, A049423, A005473, A056905, A056909 as first or 2nd entries depending on offset.
Cf. A056896 (where p-n can be 0).

Programs

  • Maple
    SearchLimit := 100;
    for n from 1 to 400 do
    k := 0: c := true:
    while(c and k < SearchLimit) do
        k := k + 1:
        c := not isprime(k^2+n):
    end do:
    if k = SearchLimit then error("Search limit reached!") fi;
    a[n] := k^2 + n end do: seq(a[j], j=1..400);
    # Edited and SearchLimit introduced by Peter Luschny, Feb 05 2019
  • Mathematica
    spsq[n_]:=Module[{p=NextPrime[n]},While[!IntegerQ[Sqrt[p-n]],p= NextPrime[ p]];p]; Array[spsq,70] (* Harvey P. Dale, Nov 10 2017 *)
  • PARI
    for(n=1, 100, for(k=1, 100, if(isprime(k^2+n), print1(k^2+n, ", "); break()))) \\ Jianing Song, Feb 04 2019
    
  • PARI
    a(n) = forprime(p=n,, if ((p-n) && issquare(p-n), return (p))); \\ Michel Marcus, Feb 05 2019

Formula

a(n) = min{p : p - n = x^2 for some x > 0, p is prime}.
Does a(n) exist for all n? - Jianing Song, Feb 04 2019

A243449 Primes of the form n^2 + 14.

Original entry on oeis.org

23, 239, 743, 1103, 2039, 5639, 7583, 8663, 27239, 33503, 38039, 42863, 59063, 81239, 88223, 91823, 119039, 131783, 140639, 164039, 189239, 205223, 245039, 263183, 288383, 328343, 342239, 378239, 393143, 400703, 431663, 439583, 514103, 660983, 710663, 950639
Offset: 1

Author

Vincenzo Librandi, Jun 05 2014

Keywords

Crossrefs

Cf. A121250 (associated n).
Cf. primes of the form n^2+k: A144255 (k=1), A056899 (k=2), A049423 (k=3), A005473 (k=4), A056905 (k=5), A056909 (k=6), A079138 (k=7), A138338 (k=8), A138353 (k=9), A138355 (k=10), A138362 (k=11), A138368 (k=12), A138375 (k=13), this sequence (k=14), A243450 (k=15), A243451 (k=16), A228244 (k=17), A174812 (k=42).

Programs

  • Magma
    [a: n in [0..1000] | IsPrime(a) where a is n^2+14];
  • Mathematica
    Select[Table[n^2 + 14, {n, 0, 2000}], PrimeQ]
    Select[Range[1,1001,2]^2+14,PrimeQ] (* Harvey P. Dale, May 30 2023 *)

A059844 a(n) = smallest nonzero square x^2 such that n+x^2 is prime.

Original entry on oeis.org

1, 1, 4, 1, 36, 1, 4, 9, 4, 1, 36, 1, 4, 9, 4, 1, 36, 1, 4, 9, 16, 1, 36, 49, 4, 81, 4, 1, 144, 1, 16, 9, 4, 9, 36, 1, 4, 9, 4, 1, 576, 1, 4, 9, 16, 1, 36, 25, 4, 9, 16, 1, 36, 25, 4, 81, 4, 1, 324, 1, 36, 9, 4, 9, 36, 1, 4, 81, 4, 1, 36, 1, 16, 9, 4, 25, 36, 1, 4, 9, 16, 1, 144, 25, 4, 81
Offset: 1

Author

Labos Elemer, Feb 26 2001

Keywords

Comments

a(n) = 1 for n in A006093. - Robert Israel, Dec 31 2023

Examples

			a(24) = 49 because 49 + 24 = 73 is prime and 1 + 24 = 25, 4 + 24 = 28, 9 + 24 = 33, 16 + 24 = 40, 25 + 24 = 49, and 36 + 24 = 60 are composite.
		

Programs

  • Maple
    f:= proc(n) local x;
     for x from 1 + (n mod 2) by 2  do
      if isprime(n+x^2) then return x^2 fi;
     od
    end proc:
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Dec 31 2023
  • Mathematica
    sqs[n_]:=Module[{q=1},While[!PrimeQ[n+q],q=(Sqrt[q]+1)^2];q]; Array[ sqs,90] (* Harvey P. Dale, Aug 11 2017 *)

Formula

a(n) + n is the smallest prime of the form x^2 + n.
Showing 1-8 of 8 results.