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

A248785 Numbers n with the property that p = n^2 - 13 and q = n^2 + 13 are consecutive primes.

Original entry on oeis.org

948, 1134, 1500, 2058, 2856, 3192, 3846, 3906, 4842, 5190, 5502, 6744, 6888, 7266, 7392, 7698, 8586, 8778, 8850, 9198, 9558, 10272, 10500, 10782, 11658, 11730, 11760, 12456, 12738, 13062, 13578, 14130, 14262, 14658, 14808, 15306, 15552, 15720, 16104, 16242
Offset: 1

Views

Author

Zak Seidov, Oct 13 2014

Keywords

Comments

All terms are == 0 (mod 6).

Examples

			n = 948, p = 898691 = prime(71194), q = 898717 = prime(71195);
n = 1134, p = 1285943 = prime(99033), q = 1285969 = prime(99034).
		

Crossrefs

Subsequence of A177833 and of A075190.
E.g., a(1) = 948 = A075190(103) = A177833(15).

Programs

  • Maple
    with(numtheory): A248785:=n->`if`(isprime(n^2-13) and isprime(n^2+13) and pi(n^2+13) = pi(n^2-13)+1,n,NULL): seq(A248785(n), n=1..2*10^4); # Wesley Ivan Hurt, Oct 13 2014
  • Mathematica
    Select[Range[17000],PrimeQ[#^2-13]&&NextPrime[#^2-13]==#^2+13&] (* Harvey P. Dale, Aug 14 2020 *)
  • PARI
    isok(n) = isprime(p=n^2-13) && isprime(q=n^2+13) && (q==nextprime(p+1)); \\ Michel Marcus, Oct 14 2014

Extensions

More terms from Michel Marcus, Oct 14 2014

A178652 Primes of the form 4^k + 13^2.

Original entry on oeis.org

173, 233, 1193, 16553, 262313, 67109033, 1073741993, 4611686018427388073, 73786976294838206633, 19807040628566084398385987753, 1361129467683753853853498429727072845993
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Jun 01 2010

Keywords

Comments

Necessarily k is odd, 4^2 + 13^2 a multiple of 5.

Examples

			a(1) = 4^1 + 13^2 = 173.
a(2) = 4^3 + 13^2 = 233.
a(11) = 4^65 + 13^2 = 1361129467683753853853498429727072845993.
a(12) = 4^99 + 13^2 = 401734511064747568885490523085290650630550748445698208825513.
		

Crossrefs

Programs

  • Mathematica
    Select[4^Range[0,70]+13^2,PrimeQ] (* Harvey P. Dale, Mar 05 2015 *)
  • PARI
    forstep(n=1,999,2,if(ispseudoprime(t=4^n+169),print1(t", "))) \\ Charles R Greathouse IV, Aug 27 2013

Extensions

New name from Charles R Greathouse IV, Aug 27 2013

A248738 Least number m such that both m^2 -/+ prime(n) are (positive) primes.

Original entry on oeis.org

3, 4, 6, 6, 90, 4, 6, 30, 6, 180, 6, 12, 30, 18, 12, 48, 60, 90, 24, 30, 18, 120, 12, 510, 10, 60, 36, 12, 60, 12, 12, 30, 12, 12, 30, 120, 24, 48, 18, 48, 690, 1020, 30, 14, 18, 420, 180, 18, 36, 540, 42, 1230, 150, 870, 36, 18, 330, 870, 18, 30, 18, 18, 18, 150, 30, 18, 30, 30, 60, 180, 24, 30, 36
Offset: 1

Views

Author

Zak Seidov, Oct 13 2014

Keywords

Examples

			a(1)=3 because p=prime(1)=2 and both P=3^2-2=7 and Q=3^2+2=11 are prime;
a(3)=6 because p=5 and both P=31 and Q=41 are prime;
a(10000)=510 because p=104729 and both P=155371 and Q=364829 are prime.
		

Crossrefs

Programs

  • Mathematica
    lnm[n_]:=Module[{m=2,pr=Prime[n]},If[m^2-pr<0,m=Ceiling[Sqrt[pr]]];While[ !AllTrue[m^2+{pr,-pr},PrimeQ],m++];m]; Array[lnm,80] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Nov 22 2014 *)
  • PARI
    a(n) = { p = prime(n); m = sqrtint(p); until( isprime(m^2-p) && isprime(m^2+p), m++); m} \\ Michel Marcus, Oct 13 2014

A178653 Numbers k that 4^k + 13^2 is prime.

Original entry on oeis.org

1, 3, 5, 7, 9, 13, 15, 31, 33, 47, 65, 99, 103, 147, 197, 203, 257, 399, 411, 471, 497, 979, 1189, 2851, 3221, 4689, 5027, 7131, 7545, 9049, 9849
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Jun 01 2010

Keywords

Comments

See A178652.

Examples

			4^1 + 13^2 = 173 = prime(40), 1 is first term.
4^3 + 13^2 = 233 = prime(51), 3 is 2nd term.
4^5 + 13^2 = 1193 = prime(196), 5 is 3rd term.
4^147 + 13^2 = 318286...15753 (89 digits), 147 is 14th term.
4^197 + 13^2 = 403...9753 (119 digits), 197 is 15th term.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ[(2^k)^2 + 169]; k = 1; lst = {}; While[k < 10^4, If[ fQ@k, AppendTo[lst, k]; Print@k]; k += 2]; lst (* Robert G. Wilson v, Jul 31 2010 *)
  • PARI
    forstep(k=1,999,2,if(ispseudoprime(4^n+169),print1(n", "))) \\ Charles R Greathouse IV, Aug 27 2013

Extensions

a(16)-a(31) from Robert G. Wilson v, Jul 31 2010
New name from Charles R Greathouse IV, Aug 27 2013
Showing 1-4 of 4 results.