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 21-30 of 36 results. Next

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

A154936 Primes in A154935.

Original entry on oeis.org

7, 199, 211, 337, 367, 1231, 1321, 1627, 1741, 2161, 2251, 2551, 3259, 3769, 3877, 3931, 4099, 4591, 4759, 4789, 6829, 7297, 7867, 8221, 8887, 9049, 9181, 9337, 9349, 11959, 12697, 12919, 13411, 13591, 14827, 15187, 15217, 15817, 15877, 15889
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={}; Do[p=n^7-2; If[PrimeQ[p], If[PrimeQ[n], AppendTo[lst,n]]], {n,0,8!}]; lst

A296507 Numbers m such that m^2 - 13 is a prime.

Original entry on oeis.org

4, 6, 12, 18, 24, 30, 36, 54, 72, 84, 90, 96, 102, 114, 120, 138, 168, 186, 198, 204, 210, 216, 228, 240, 276, 294, 318, 330, 354, 360, 372, 378, 402, 414, 438, 444, 456, 480, 498, 504, 588, 600, 612, 618, 630, 636, 666, 678, 690, 714, 720, 726, 732, 738, 762
Offset: 1

Views

Author

Zak Seidov, Dec 13 2017

Keywords

Comments

All terms except 4 are divisible by 6. - Robert Israel, Dec 13 2017

Crossrefs

Programs

  • Maple
    select(n -> isprime(n^2-13), 2*[$2..10^4]); # Robert Israel, Dec 13 2017
  • Mathematica
    Reap[m=4;Do[If[PrimeQ[m^2-13],Sow[m]];m=m+2,{1000}]][[2,1]]
    Select[Range[800],PrimeQ[#^2-13]&] (* Harvey P. Dale, Mar 06 2023 *)
  • PARI
    isok(n) = isprime(n^2-13); \\ Michel Marcus, Dec 14 2017

A071351 Numbers n such that both n^4 + 2 and n^4 - 2 are prime.

Original entry on oeis.org

3, 21, 87, 99, 129, 141, 279, 627, 657, 777, 783, 795, 1653, 1725, 1833, 1959, 2001, 2043, 3039, 3399, 3609, 3861, 3975, 4257, 4371, 4491, 5403, 5541, 5709, 5985, 7371, 7539, 7869, 7917, 8397, 8445, 8547, 8793, 9051, 9057, 9915, 9933, 11067, 12153
Offset: 1

Views

Author

Labos Elemer, May 21 2002

Keywords

Examples

			n=3: n^4 = 81; {79,83} are primes.
		

Crossrefs

Programs

  • Mathematica
    lst={}; Do[p1=n^4-2; p2=n^4+2; If[PrimeQ[p1]&&PrimeQ[p2],AppendTo[lst,n]],{n,0,8!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jan 17 2009 *)
    Select[Range[730000], AllTrue[#^4 + {2, -2}, PrimeQ] &] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 02 2018 *)

A140454 Number of primes p less than 10^n such that p^2-2 is prime.

Original entry on oeis.org

4, 13, 52, 259, 1595, 10548, 74914, 563533, 4387106
Offset: 1

Views

Author

Jonathan Vos Post, Jun 26 2008

Keywords

Comments

Korevaar gives these values in Table 1, p. 18, attributing the calculation to Fokko van de Bult. Abstract: For any positive integer r, let pi_{2r}(x) denote the number of prime pairs (p, p+2r) with p not exceeding (large) x. According to the prime-pair conjecture of Hardy and Littlewood, pi_{2r}(x) should be asymptotic to 2C_{2r}li_2(x) with an explicit positive constant C_{2r}. A heuristic argument indicates that the remainder e_{2r}(x) in this approximation cannot be of lower order than x^beta, where beta is the supremum of the real parts of zeta's zeros. The argument also suggests an approximation for pi_{2r}(x) similar to one of Riemann for pi(x).

Examples

			a(1) = 4 because {2, 3, 5, 7} are the 4 primes p less than 10^1 such that p^2-2 are primes, namely {2, 7, 23, 47}.
a(2) = 13 = #{2, 3, 5, 7, 13, 19, 29, 37, 43, 47, 61, 71, 89}.
		

Crossrefs

Formula

a(n) = #{p < 10^n in A028870}.

Extensions

a(9) from Donovan Johnson, Feb 17 2010

A225098 Numbers k such that k^2 - 2 and 2*k^2 - 1 are both prime.

Original entry on oeis.org

2, 3, 7, 13, 15, 21, 43, 49, 63, 69, 127, 155, 183, 211, 231, 237, 259, 265, 273, 293, 301, 323, 335, 391, 435, 441, 447, 489, 505, 573, 595, 671, 713, 715, 743, 757, 797, 811, 951, 959, 973, 979, 987, 993, 1035, 1147, 1197, 1287, 1359, 1393, 1415, 1429, 1443, 1491, 1525, 1597, 1617, 1653
Offset: 1

Views

Author

Gerasimov Sergey, Apr 27 2013

Keywords

Comments

Primes in the sequence: 2, 3, 7, 13, 43, 127, 211, 293, 743, 757, 797, 811, 1429,...

Examples

			2^2 - 2 = 2 is prime and 2*2^2 - 1 = 7 is prime, so a(1) = 2.
		

Crossrefs

Intersection of A028870 and A066049.

Programs

  • Mathematica
    Select[Range[1653], PrimeQ[#^2 - 2] && PrimeQ[2*#^2 - 1] &] (* T. D. Noe, May 10 2013 *)

Extensions

Corrected by R. J. Mathar, May 05 2013

A146980 Nonsquarefree numbers such that n-1 is prime and n+1 is square.

Original entry on oeis.org

8, 24, 48, 80, 168, 224, 360, 440, 728, 840, 1088, 1224, 1368, 1848, 2208, 2400, 3024, 3720, 3968, 4760, 5040, 5624, 5928, 7920, 8648, 10608, 11448, 13688, 14160, 14640, 16128, 17160, 18224, 19320, 21024, 24024, 25920, 28560, 29928, 31328, 33488
Offset: 1

Views

Author

Giovanni Teofilatto, Nov 04 2008

Keywords

Comments

Also numbers n > 3 such that n-1 is prime and n+1 is square.
Sequence gives values x of fundamental solution (x,y) to Pellian x^2 - D*y^2 = 1, with D = n-1 = A049002, corresponding values y being sqrt(n+1) = A028870. (Substituting back into the Pellian we indeed have n^2 - (n-1)(n+1) = 1.) - Lekraj Beedassy, Feb 23 2019

Crossrefs

Programs

  • Magma
    [ n: n in [1..35000] | not IsSquarefree(n) and IsPrime(n-1) and IsSquare(n+1) ]; // Klaus Brockhaus, Nov 05 2008
    
  • Mathematica
    Select[Range[35000], !SquareFreeQ[#] && PrimeQ[#-1] && IntegerQ[Sqrt[#+1] ] &] (* G. C. Greubel, Feb 22 2019 *)
    Mean/@SequencePosition[Table[Which[PrimeQ[n],1,IntegerQ[Sqrt[ n]],3,!SquareFreeQ[ n],2,True,0],{n,33500}],{1,2,3}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 03 2020 *)
  • PARI
    list(lim)=my(v=List()); forstep(k=3,sqrtint(lim\1+1),2, if(isprime(k^2-2), listput(v,k^2-1))); Vec(v) \\ Charles R Greathouse IV, Jun 13 2017
    
  • Sage
    [n for n in (1..35000) if not is_squarefree(n) and is_prime(n-1) and is_square(n+1)] # G. C. Greubel, Feb 22 2019

Extensions

Extended beyond a(6) by Klaus Brockhaus, Nov 05 2008

A154938 Numbers k such that k^6 - 2 and k^6 + 2 are both primes.

Original entry on oeis.org

195, 213, 231, 657, 1563, 1749, 2967, 3597, 3627, 4263, 4887, 6867, 6993, 7257, 7725, 9045, 9201, 9717, 11595, 12579, 13029, 14145, 14259, 14367, 15837, 16131, 16581, 17259, 19905, 19917, 21081, 21711, 23127, 24435, 24921, 28299, 28707
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..500] | IsPrime(n^6-2) and IsPrime(n^6+2)]; // Vincenzo Librandi, Nov 26 2010
  • Mathematica
    lst={};Do[p1=n^6-2;p2=n^6+2;If[PrimeQ[p1]&&PrimeQ[p2],AppendTo[lst,n]],{n,0,9!}];lst
    Select[Range[30000],AllTrue[#^6+{2,-2},PrimeQ]&] (* Harvey P. Dale, Jun 21 2025 *)

A216945 Numbers k such that k-2, k^2-2, k^3-2, k^4-2 and k^5-2 are all prime.

Original entry on oeis.org

15331, 289311, 487899, 798385, 1685775, 1790991, 1885261, 1920619, 1967925, 2304805, 2479735, 3049201, 3114439, 3175039, 3692065, 4095531, 4653649, 5606349, 5708235, 6113745, 6143235, 6697425, 7028035, 7461601, 8671585, 8997121, 9260131, 10084915, 10239529
Offset: 1

Views

Author

Michel Lagneau, Sep 20 2012

Keywords

Comments

k^6-2 is also prime for k = 1685775, 4095531, 4653649, 5606349, 13219339, 13326069, 18439561, ...
Sequence is infinite under Schinzel's Hypothesis H. a(n) >> n log^5 n. - Charles R Greathouse IV, Sep 20 2012

Crossrefs

Programs

  • Mathematica
    Select[Range[20000000], And@@PrimeQ/@(Table[n^i-2, {i, 1, 5}]/.n->#)&]
    Select[Prime[Range[680000]]+2,AllTrue[#^Range[2,5]-2,PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 11 2020 *)

Formula

Sequence is A052147 intersection A028870 intersection A038599 intersection A154831 intersection A154833.

A239474 Smallest k >= 1 such that k^n-n is prime. a(n) = 0 if no such k exists.

Original entry on oeis.org

3, 2, 2, 0, 4, 5, 60, 3, 2, 21, 28, 5, 2, 199, 28, 0, 234, 11, 2, 3, 2, 159, 10, 31, 68, 145, 0, 69, 186, 163, 32, 253, 26, 261, 4, 0, 8, 11, 62, 3, 22, 43, 6, 7, 8, 945, 76, 7, 116, 129, 382, 93, 330, 361, 2, 555, 224, 1359, 78, 29, 62, 39, 110, 0, 1032, 37, 462, 29
Offset: 1

Views

Author

Derek Orr, Mar 20 2014

Keywords

Comments

If n is of the form (pk)^p for some k and some prime p, then a(n) = 0 (See A097764).

Examples

			1^1-1 = 0 is not prime. 2^1-1 = 1 is not prime. 3^1-1 = 2 is prime. Thus, a(1) = 3.
		

Crossrefs

Programs

  • Python
    import sympy
    from sympy import isprime
    def TwoMin(x):
      for k in range(1,5000):
        if isprime(k**x-x):
          return k
    x = 1
    while x < 100:
      print(TwoMin(x))
      x += 1

Formula

a(A097764(n)) = 0 for all n.
Previous Showing 21-30 of 36 results. Next