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

A145824 Lower twin primes p1 such that p1-1 is a square.

Original entry on oeis.org

5, 17, 101, 197, 5477, 8837, 16901, 17957, 21317, 25601, 52901, 65537, 106277, 115601, 122501, 164837, 184901, 193601, 220901, 341057, 401957, 470597, 490001, 495617, 614657, 739601, 846401, 972197, 1110917, 1144901, 1336337, 1464101
Offset: 1

Views

Author

Cino Hilliard, Oct 20 2008

Keywords

Comments

3 is the only lower twin prime for which p1+1 is a square. This follows from the fact that lower twin primes > 3 are of the form 3n+2 and adding 1 we get a number of the form 3m. Then 3m = k^2 implies k = 3r and 3m = 9r^2. Subtracting 1 we have 3m = (3r-1)(3r+1) not prime contradicting 3m-1 is prime.
Conjecture: There exist an infinite number of primes of this form.
a(n) = A080149(n)^2 + 1. - Zak Seidov, Oct 21 2008

Examples

			p1 = 5 is a lower twin prime. 5-1 = 4 is a square.
		

Crossrefs

Cf. A080149. - Zak Seidov, Oct 21 2008
Subsequence of A002496 (Primes of form n^2 + 1). - Zak Seidov, Nov 25 2011

Programs

  • Magma
    [p: p in PrimesUpTo(2000000) | IsSquare(p-1) and IsPrime(p+2)]; // Vincenzo Librandi, Nov 08 2014
  • Mathematica
    lst={}; Do[p=Prime@n; If[PrimeQ@(p+2)&&Sqrt[p-1]==IntegerPart[Sqrt[p-1]],AppendTo[lst,p]],{n,9!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 11 2009 *)
  • PARI
    g(n) = for(x=1,n,y=twinl(x)-1;if(issquare(y),print1(y+1",")))
    twinl(n) = local(c, x); c=0;x=1;while(c
    				

Extensions

More terms from Zak Seidov, Oct 21 2008

A187873 Second smallest prime after n^2.

Original entry on oeis.org

3, 3, 7, 13, 19, 31, 41, 59, 71, 89, 103, 131, 151, 179, 199, 229, 263, 307, 337, 373, 409, 449, 491, 547, 587, 641, 683, 739, 797, 857, 911, 971, 1033, 1093, 1171, 1231, 1301, 1381, 1451, 1531, 1607, 1697, 1783, 1867, 1951, 2029
Offset: 0

Views

Author

Keywords

Comments

From Robert Israel, Dec 18 2018: (Start)
Oppermann's conjecture implies a(n) < (n+1)^2 for n > 0.
For n > 1, a(n) >= n^2 + 3, with equality for n in A080149. (End)

Examples

			2^2=4, second smallest prime=7;
3^2=9, second smallest prime=13; ..
		

Crossrefs

Programs

  • Maple
    seq(nextprime(nextprime(n^2)),n=0..50); # Robert Israel, Dec 18 2018
  • Mathematica
    NextPrime[Range[0,100]^2, 2]

A224481 Positive integers x such that x^2 - 34 is the average of a twin prime pair.

Original entry on oeis.org

8, 26, 46, 58, 74, 76, 82, 92, 134, 164, 236, 248, 304, 314, 362, 368, 394, 416, 454, 496, 502, 512, 544, 568, 592, 598, 632, 668, 706, 734, 772, 776, 788, 818, 824, 844, 898, 944, 986, 1142, 1184, 1324, 1328, 1346, 1426, 1436, 1462, 1502, 1522, 1612, 1766
Offset: 1

Views

Author

Michael G. Kaarhus, Apr 09 2013

Keywords

Comments

y = x^2 - 34 is one of a family of quadratics y = x^2 + c that produces averages of twin prime pairs. The first 24 negative numbers c that produce averages are congruent to either 0 or 2 (mod 6) (as calculated by maxima), and they differ by no more than 6. Other than that, I have not found an order to the sequence of negative numbers c. The first 11 positive numbers c that produce averages are apparently the beginning of all integers >= 2 that are equivalent to {2,0,2,0...} (mod 6).
If c=2, then the x that satisfy y = x^2 + c are A080149.
Apparently, there are infinitely many numbers c that produce twin prime averages. Here are some of them: (-84, -78, -76, -72, -70, -66, -64, -60, -58, -54, -52, -46, -42, -40, -36, -34, -30, -28, -22, -18, -16, -12, -6, -4, 2, 6, 8, 12, 14, 18, 20, 24, 26, 30, 32).
Dickson's conjecture implies that this sequence is infinite. Bateman-Horn-Stemmler gives conjectured growth. - Charles R Greathouse IV, Apr 10 2013

Examples

			26 is in this sequence, because 26^2 - 34 = 642, which is the average of the twin prime pair (641, 643).
		

Crossrefs

Cf. A080149.

Programs

  • Mathematica
    nn=1000; av = Select[Prime[Range[PrimePi[nn^2]]], PrimeQ[# + 2] &] + 1; Select[Range[nn], MemberQ[av, #^2 - 34] &] (* T. D. Noe, Apr 09 2013 *)
    nn = 2000; Select[Range[8, nn, 2], PrimeQ[p = #^2 - 35] && PrimeQ[p + 2] &] (* Zak Seidov, Apr 27 2013 *)
    Select[Range[3,1800],AllTrue[#^2-{35,33},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 14 2020 *)
  • PARI
    is(n)=isprime(n^2-35)&&isprime(n^2-33) \\ Charles R Greathouse IV, Apr 10 2013

A237191 Numbers k such that k+1, k+3, k^2+1, k^2+3, k^4+1, k^4+3 are six primes.

Original entry on oeis.org

2, 520360, 14320216, 30527896, 119668186, 120506050, 131448430, 142493926, 211158676, 254574706, 276368680, 306216940, 315122416, 421132180, 472731400, 506213890, 540271396, 616078786, 629310346, 646308250, 741176296, 752897860, 800587480, 851425030, 897745996
Offset: 1

Views

Author

Alex Ratushnyak, Feb 04 2014

Keywords

Crossrefs

A subsequence of A067662, A070325, A070689, A080149.

Programs

  • Python
    from sympy import isprime
    for n in range(0,1000000000,2):
        if isprime(n+1) and isprime(n*n+1) and isprime(n**4+1):
            if isprime(n+3) and isprime(n*n+3) and isprime(n**4+3):
                print(n, end=', ')

A356175 Numbers k such that k^2 + {1,3,7,13,163} are prime.

Original entry on oeis.org

2, 4, 10, 14290, 64390, 74554, 83464, 93460, 132304, 238850, 262630, 277630, 300206, 352600, 376190, 404954, 415180, 610340, 806180, 984686, 1025650, 1047050, 1106116, 1382860, 2014624, 2440714, 2525870, 2538344, 2760026, 2826380, 3145600, 3508586, 3715156
Offset: 1

Views

Author

Jean-Marc Rebert, Jul 28 2022

Keywords

Comments

For 14 <= m <= 999 and k <= A356110(31) = 8069560, the number of sets of primes of the form k^2 + {1,3,7,13,m} is the greatest for m = 163. There are 51 such terms. See b-file.
All terms are 2 or 4 modulo 6.

Examples

			2 is a term since 2^2 + {1,3,7,13,163} = {5,7,11,17,167} are all primes.
		

Crossrefs

Programs

  • Maple
    q:= k-> andmap(j-> isprime(k^2+j), [1, 3, 7, 13, 163]):
    select(q, [$0..1000000])[];  # Alois P. Heinz, Jul 28 2022
  • Mathematica
    Select[Range[4*10^6], AllTrue[#^2 + {1, 3, 7, 13, 163}, PrimeQ] &] (* Amiram Eldar, Jul 28 2022 *)
  • PARI
    is(k)=my(v=[1,3,7,13,163],ok=1);for(i=1,#v,if(!isprime(k^2+v[i]),ok=0;break));ok
    
  • Python
    from sympy import isprime
    def ok(n): return all(isprime(n*n+i) for i in {1,3,7,13,163})
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Jul 28 2022

A145823 Squares of the form p1 - 1 where p1 is a lower twin prime.

Original entry on oeis.org

4, 16, 100, 196, 5476, 8836, 16900, 17956, 21316, 25600, 52900, 65536, 106276, 115600, 122500, 164836, 184900, 193600, 220900, 341056, 401956, 470596, 490000, 495616, 614656, 739600, 846400, 972196, 1110916, 1144900, 1336336, 1464100
Offset: 1

Views

Author

Cino Hilliard, Oct 20 2008

Keywords

Comments

These numbers are of the form 3n+1. This follows from the fact that a lower twin prime > 3 is of the form 3n+2. If p1 = 3n+1 then the upper twin would be 3n+1+2 = 3k which is not prime for k > 1. 4 is the only square which is a lower twin prime + 1. If a lower twin prime p1 + 1 is a square, then it is of the form 3n+2+1 or 3n. Then 3n = x^2 implies x = 3r for some r. This implies 3n = 9r^2. Now if we subtract 1 we have 9r^2-1 = (3r-1)(3r+1) which is not prime.

Examples

			p1=5 is a lower twin prime. 5-1 = 4 is a square.
		

Programs

  • Mathematica
    Select[Select[Partition[Prime[Range[112000]],2,1],#[[2]]-#[[1]]==2&][[All,1]]-1,IntegerQ[Sqrt[#]]&] (* Harvey P. Dale, Jul 05 2020 *)
  • PARI
    g(n) = for(x=1,n,y=twinl(x)-1;if(issquare(y),print1(y",")))
    twinl(n) = local(c, x); c=0;x=1;while(c
    				

Formula

a(n) = A080149(n)^2. [From Ray Chandler, Oct 24 2008]

Extensions

Extended by Ray Chandler, Oct 24 2008
Showing 1-6 of 6 results.