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

A121825 Duplicate of A049423.

Original entry on oeis.org

3, 7, 19, 67, 103, 199, 487, 787, 1447, 2503, 2707, 3847, 4099, 4903, 5479, 5779, 8467, 8839, 11239, 12547, 14887, 16903, 17959, 19603, 21319, 23719, 24967, 25603, 29587, 31687, 47527, 52903, 58567, 59539, 61507, 65539, 75079, 81799, 88807, 92419
Offset: 1

Views

Author

Jonathan Vos Post, Aug 27 2006

Keywords

Comments

See also A121326 (Primes of the form 4*k^2 + 1); see also A049423 (Primes of the form k^2 + 3). For the primes of the form 4*k^2 + 3, the corresponding values of k are 1, 2, 4, 5, 7, 11, 14, 19, 25, 26, 31, 32, 35, 37, 38, 46, 47, 53, 56, 61, 65, 67, 70, 73.

Crossrefs

Programs

  • Magma
    [ a: n in [0..200] | IsPrime(a) where a is 4*n^2+3 ]; // Vincenzo Librandi, Dec 22 2010

Formula

a(n) = 3 + (2*A097697(n))^2. - R. J. Mathar, Aug 07 2008

Extensions

Terms after 21319 added by R. J. Mathar, Aug 07 2008
3 added by Vincenzo Librandi, Dec 22 2010

A242331 Numbers k such that k^2 + 3 is a semiprime.

Original entry on oeis.org

1, 6, 16, 18, 20, 24, 26, 32, 34, 36, 40, 44, 46, 48, 56, 60, 66, 68, 78, 80, 88, 98, 100, 102, 104, 108, 116, 118, 120, 128, 136, 148, 152, 164, 170, 174, 176, 182, 188, 190, 192, 196, 200, 204, 212, 220, 226, 232, 234, 238, 246, 250, 252, 258, 260, 262, 266
Offset: 1

Views

Author

Vincenzo Librandi, May 14 2014

Keywords

Comments

The semiprimes of this form are: 4, 39, 259, 327, 403, 579, 679, 1027, 1159, 1299, 1603, 1939, 2119, 2307, 3139, 3603, 4359, 4627, ...

Crossrefs

Programs

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

A056905 Primes of the form k^2 + 5.

Original entry on oeis.org

5, 41, 149, 1301, 2309, 5189, 6089, 9221, 13001, 15881, 26249, 28229, 39209, 41621, 60521, 66569, 86441, 112901, 116969, 138389, 171401, 186629, 207941, 213449, 242069, 254021, 266261, 285161, 304709, 331781, 345749, 352841, 389381, 443561
Offset: 1

Author

Henry Bottomley, Jul 07 2000

Keywords

Comments

Except for a(0), a(n) mod 180 = 41 or 149 since k must be a multiple of 6 without being a multiple of 30 for k^2+5 to be prime.

Examples

			a(2)=149 since 12^2 + 5 = 149, which is prime.
		

Crossrefs

Programs

  • Magma
    [a: n in [0..700] | IsPrime(a) where a is n^2+5]; // Vincenzo Librandi, Nov 30 2011
    
  • Mathematica
    Select[Table[n^2+5,{n,0,7000}],PrimeQ] (* Vincenzo Librandi, Nov 30 2011 *)
  • PARI
    is(n) = ispseudoprime(n) && issquare(n-5) \\ Felix Fröhlich, May 25 2018

Formula

a(n) = 36 * A056906(n) + 5.

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

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

A056902 Numbers n where 36n^2+24n+7 is prime (sorted by absolute values with negatives before positives).

Original entry on oeis.org

0, -1, 1, -2, 2, -4, -5, 6, 8, -9, 10, -11, -12, 12, -13, 15, -16, -18, -19, 20, -22, 22, 23, 24, -26, 26, -27, -29, -30, 36, 38, 40, -41, 41, -43, -46, -48, -50, -51, -53, -54, 54, -57, 58, 59, -61, 61, 66, -68, 69, -71, -72, 72, 73, 76, 78, -79, -81, -85, 85, 87
Offset: 0

Author

Henry Bottomley, Jul 06 2000

Keywords

Comments

36m^2+24m+7=(6m+2)^2+3 which is three more than a square

Examples

			a(3)=-2 since 36*(-2)^2+24*(-2)+7=144-48+7=103 which is prime
		

Crossrefs

This sequence and formula generate all but the first prime of the form k^2+3, i.e. A049423.

Formula

36*a(n)^2+24*a(n)+7=A049423(n+1).

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

A228424 Primes that can be written as a sum of a triangular number and a square.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 19, 29, 31, 37, 53, 59, 61, 67, 71, 79, 101, 103, 107, 109, 127, 131, 137, 149, 157, 179, 191, 197, 199, 211, 239, 241, 251, 257, 269, 271, 277, 311, 317, 331, 347, 349, 353, 359, 367, 379, 389, 397, 401, 409, 421, 431, 439, 449, 479, 487, 491, 499, 509, 521
Offset: 1

Author

Zhi-Wei Sun, Nov 10 2013

Keywords

Comments

This sequence is interesting because of the conjecture in the comments in A228425.
Note that the sequence contains all primes of the form x^2 + 1 (A002496) since 1 is a triangular number.

Examples

			a(1) = 2 since 2 = 1*(1+1)/2 + 1^2.
a(2) = 3 since 3 = 2*(2+1)/2 + 0^2.
		

Crossrefs

Subsequence of A014133. Subsequences include A002496, A049423, A056909, A138355, and A243450.

Programs

  • Mathematica
    TQ[n_]:=IntegerQ[Sqrt[8n+1]]
    n=0
    Do[Do[If[TQ[Prime[k]-x^2],n=n+1;Print[n," ",Prime[k]];Goto[aa]],{x,0,Sqrt[Prime[k]]}];
    Label[aa];Continue,{k,1,100}]
  • PARI
    istrg(n) = {if (! issquare(8*n+1), return (0)); return (1);}
    isok(p) = {for (i = 0, sqrtint(p), if (istrg(p-i^2), return (1)););}
    lista(nn) = {forprime(p=2, nn, if (isok(p), print1(p, ", ")););}
    
  • PARI
    list(lim)=my(v=List(if(lim<3,[],[3]))); for(m=1,(sqrtint((lim\=1)*8+1)-1)\2, my(t=m*(m+1)/2); for(s=1,sqrtint(lim-t), my(p=t+s^2); if(isprime(p), listput(v,p)))); Set(v) \\ Charles R Greathouse IV, Aug 28 2024

Formula

Bhattacharya & Rahaman prove that a(n) ≍ n (log n)^(3/2). - Charles R Greathouse IV, Aug 28 2024

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 *)

A302435 Number of primes of the form b^2+3 for b <= 10^n.

Original entry on oeis.org

5, 18, 110, 712, 5427, 44096, 373019, 3228862, 28494961
Offset: 1

Author

Seiichi Manyama, Apr 07 2018

Keywords

Examples

			a(1) = 5 because there are 5 primes of the form b^2+3 for b <= 10: 3, 7, 19, 67 and 103.
		

Crossrefs

Number of primes of the form b^2+m for b <= 10^n: A302443 (m=-3), A302442 (m=-2), A206709 (m=1), A302434 (m=2), this sequence (m=3).
Cf. A049423.

Programs

  • PARI
    {a(n) = sum(k=0, 10^n, isprime(k^2+3))}
Showing 1-10 of 13 results. Next