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

A153974 Numbers n such that n^3 - 3 is prime.

Original entry on oeis.org

2, 4, 8, 10, 14, 16, 26, 34, 38, 40, 74, 80, 106, 110, 116, 124, 136, 158, 178, 184, 190, 206, 224, 230, 238, 256, 274, 280, 316, 320, 338, 340, 386, 410, 428, 446, 458, 464, 470, 484, 496, 530, 544, 550, 556, 590, 626, 634, 644, 646, 674, 710, 718, 728, 730
Offset: 1

Views

Author

Keywords

Comments

2^3 - 3 = 5 is prime, 4^3 - 3 = 61 is prime, ...

Crossrefs

Programs

  • Magma
    [n: n in [2..500] | IsPrime(n^3-3)]; // Vincenzo Librandi, Nov 26 2010
    
  • Mathematica
    a[n_]:=n^x-y;lst={};x=3;y=3;Do[If[PrimeQ[a[n]],AppendTo[lst,n]],{n,0,6!}];lst
    Select[Range[2, 1000], PrimeQ[#^3 - 3] &] (* G. C. Greubel, Sep 01 2016 *)
  • PARI
    is(n)=isprime(n^3-3) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

First two terms 0,1, removed by Zak Seidov, Mar 14 2009

A176681 Numbers k such that k^2 +-5 are primes.

Original entry on oeis.org

6, 12, 36, 72, 78, 168, 198, 204, 342, 432, 456, 492, 534, 588, 594, 666, 726, 756, 786, 804, 996, 1014, 1212, 1218, 1248, 1254, 1266, 1314, 1344, 1476, 1512, 1554, 1806, 1812, 1902, 2088, 2298, 2322, 2364, 2616, 2634, 3066, 3072, 3162, 3432, 3444, 3852
Offset: 1

Views

Author

Keywords

Examples

			12 is in the sequence, because 12^2 + 5 = 149 and 12^2 - 5 = 139 are primes.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[8! ],PrimeQ[ #^2-5]&&PrimeQ[ #^2+5]&]

A176682 Numbers k such that k^2 +-7 are primes.

Original entry on oeis.org

6, 12, 18, 36, 48, 60, 66, 132, 138, 162, 186, 192, 216, 228, 270, 330, 360, 366, 408, 468, 474, 582, 606, 642, 678, 708, 744, 792, 1086, 1182, 1236, 1308, 1326, 1458, 1524, 1686, 1782, 1902, 1998, 2040, 2124, 2178, 2208, 2244, 2358, 2370, 2634, 2658, 2760
Offset: 1

Views

Author

Keywords

Examples

			12 is in the sequence, because 12^2 - 7 = 137 and 12^2 + 7 = 151 are primes.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[8! ],PrimeQ[ #^2-7]&&PrimeQ[ #^2+7]&]

A176683 Numbers k such that k^2 +-11 are primes.

Original entry on oeis.org

90, 120, 210, 270, 300, 510, 690, 720, 780, 960, 1200, 2190, 4260, 4350, 4470, 4920, 4980, 5040, 5100, 5250, 5550, 5670, 5730, 5790, 6810, 8100, 8280, 8490, 8610, 9150, 9540, 9990, 10140, 10200, 10650, 11130, 11430, 12060, 12510, 12930, 13770, 13800
Offset: 1

Views

Author

Keywords

Examples

			90 is in the sequence, because 90^2 - 11 = 8089 and 90^2 + 11 = 8111 are primes.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[8! ],PrimeQ[ #^2-11]&&PrimeQ[ #^2+11]&]
    Select[Range[14000],AllTrue[#^2+{11,-11},PrimeQ]&] (* Harvey P. Dale, Aug 03 2024 *)

A153975 Values of n such that n^2-3 and n^2+3 are both prime.

Original entry on oeis.org

4, 8, 10, 14, 64, 92, 112, 140, 146, 172, 218, 298, 304, 322, 326, 340, 350, 356, 416, 440, 470, 508, 554, 560, 580, 626, 634, 652, 668, 686, 694, 704, 728, 736, 746, 770, 806, 818, 868, 892, 920, 1054, 1082, 1102, 1130, 1156, 1196, 1256, 1264, 1378, 1418
Offset: 1

Views

Author

Keywords

Comments

Intersection of A028873 and A049422. - Zak Seidov, Oct 12 2014

Examples

			4^2 - 3 = 13 and 4^2 + 3 = 19 are both primes, so 4 is in the sequence.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..1400] | IsPrime(n^2-3) and IsPrime(n^2+3)]; // Vincenzo Librandi, Oct 12 2014
    
  • Mathematica
    Select[Range[1500], PrimeQ[#^2 - 3] && PrimeQ[#^2 + 3] &] (* Vincenzo Librandi, Oct 12 2014 *)
  • PARI
    is(n) = isprime(n^2-3) && isprime(n^2+3); \\ Altug Alkan, Sep 01 2016

Extensions

Incorrect term 0 removed and Mma edited by Zak Seidov, Oct 12 2014

A155021 Values of n such that n^a-+a are primes, a=5.

Original entry on oeis.org

0, 42, 1566, 2154, 4482, 6054, 6252, 7566, 7968, 8478, 9546, 10128, 10992, 14286, 14574, 15846, 16212, 16248, 16854, 17268, 17976, 18186, 22434, 23658, 23952, 24234, 24408, 26154, 26742, 28908, 29262, 30018, 30522, 32424, 33174, 33378
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a={};Do[m=n^5;If[PrimeQ[m-5]&&PrimeQ[m+5],AppendTo[a,n]],{n,0,9!}];a

A176684 Numbers k such that k^3 +-5 are primes.

Original entry on oeis.org

2, 12, 48, 66, 78, 126, 192, 324, 576, 738, 858, 1806, 2466, 2496, 2688, 3186, 3276, 3978, 4092, 4248, 4404, 4884, 5034, 5274, 5352, 5898, 6018, 6198, 6396, 6408, 6516, 6708, 6852, 7368, 7914, 8304, 8628, 8658, 8904, 9048, 9168, 9528, 10812, 10932
Offset: 1

Views

Author

Keywords

Examples

			12 is in the sequence, because 12^3 - 5 = 1723 and 12^3 + 5 = 1733 are primes.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[8! ],PrimeQ[ #^3-5]&&PrimeQ[ #^3+5]&]

A189051 Numbers n such that n+/-2 and n^2+/-2 are all primes.

Original entry on oeis.org

9, 15, 21, 309, 441, 1611, 2955, 3081, 3879, 5529, 7209, 7755, 7875, 13761, 15015, 15729, 16659, 21561, 22155, 35595, 37059, 38199, 45291, 50049, 51429, 59619, 63855, 67215, 67941, 71331, 72891, 83061, 96459, 96909, 102795, 106959, 111495
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 16 2011

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..2000000]|IsPrime(n-2)and IsPrime(n+2)and IsPrime(n^2-2)and IsPrime(n^2+2)]; // Vincenzo Librandi, Apr 20 2011
  • Maple
    select(n -> isprime(n-2) and isprime(n+2) and isprime(n^2-2) and isprime(n^2+2),
    [seq(i,i=3..10^6, 6)]); # Robert Israel, Jun 23 2017
  • Mathematica
    pQ[n_]:=Module[{n2=n^2},And@@PrimeQ[{n+2,n-2,n2+2,n2-2}]]; Select[Range[ 120000],pQ] (* Harvey P. Dale, Jun 04 2011 *)
  • PARI
    forstep(n=3,100000,6,if(isprime(n-2)&isprime(n+2)&isprime(n^2-2)&isprime(n^2+2),print1(n", ")))
    

Formula

Intersection of A087679 and A108701.

Extensions

Corrected and extended by Franklin T. Adams-Watters, Apr 16 2011

A108403 Numbers n such that n^2-6 and n^2+6 are both prime.

Original entry on oeis.org

5, 25, 65, 145, 355, 605, 985, 1075, 1295, 1465, 1565, 1675, 1915, 2345, 2425, 2585, 2755, 3005, 3155, 3785, 4595, 4625, 4975, 5225, 5465, 5665, 5905, 5915, 6115, 6295, 6305, 6415, 6485, 7235, 7775, 8185, 9065, 9275, 9415, 9755, 9835, 10145, 10195
Offset: 1

Views

Author

John L. Drost, Jul 04 2005

Keywords

Comments

All members of the sequence are divisible by 5 as if n is 1 or 4 mod 5 then n^2-6 is divisible by 5 and if n is 2 or 3 mod 5 then n^2+6 is divisible by 5.

Examples

			a(2)=25 since 25^2 - 6 = 619 and 25^2 + 6 = 631 are both prime.
		

Crossrefs

Cf. A087681 (with n instead of n^2), A108701 (with 2 instead of 6).

Programs

  • Magma
    [n: n in [2..100000] | IsPrime(n^2-6) and IsPrime(n^2+6)] // Vincenzo Librandi, Nov 13 2010
  • Mathematica
    pQ[n_]:=Module[{n2=n^2},And@@PrimeQ[{n2-6,n2+6}]]; Select[5Range[2100], pQ]  (* Harvey P. Dale, Nov 06 2011 *)

A155022 Values of n such that n^a-+a are primes, a=7.

Original entry on oeis.org

0, 66, 516, 3450, 7200, 8850, 12480, 16500, 18234, 18534, 19440, 21246, 26466, 28596, 39036, 41634, 43500, 43710, 54186, 54876, 59316, 68886, 77184, 81540, 82134, 88044, 89064, 95796, 97530, 98610, 108294, 111864, 113160, 120534, 120696
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a={};Do[m=n^7;If[PrimeQ[m-7]&&PrimeQ[m+7],AppendTo[a,n]],{n,0,9!}];a
    Select[Range[0,130000],And@@PrimeQ[#^7+{7,-7}]&] (* Harvey P. Dale, Aug 26 2013 *)
Showing 1-10 of 15 results. Next