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

A158866 Indices of twin primes if the sum of these twin primes+1 is an upper twin prime.

Original entry on oeis.org

2, 5, 30, 31, 66, 73, 88, 91, 141, 147, 217, 513, 607, 637, 743, 760, 784, 845, 856, 911, 920, 938, 949, 958, 994, 1015, 1031, 1092, 1150, 1246, 1373, 1470, 1553, 1586, 1768, 1814, 1871, 2017, 2029, 2129, 2261, 2271, 2331, 2370, 2458, 2488, 2510, 2545, 2579
Offset: 1

Views

Author

Cino Hilliard, Mar 28 2009

Keywords

Comments

If the sum is a member of a twin prime pair, it always is the upper twin prime member. [Proof: Twin primes are sequentially of the form 6n-1 and 6n+1. Then adding according to the condition, we get 6n-1+6n+1+1 = 12n+1. This implies 12n+1 is an upper member since if it were a lower member, 12n+1+2 would be the upper member but 12n+3 is not prime contradicting the definition of a twin prime. Therefore 12n+1 must be an upper twin prime member as stated.]

Examples

			The 30th lower twin prime is 659. 659+661+1 = 1321, prime and 1319 is too.
Then 1319 is the lower member of the twin prime pair (1319,1321). So 30 is in the sequence.
		

Crossrefs

Cf. A158870.

Programs

  • Maple
    count:= 0: Res:= NULL:
    k:= 1:
    for j from 1 while count < 100 do
      if isprime(6*j-1) and isprime(6*j+1) then
        k:= k+1;
        if isprime(12*j-1) and isprime(12*j+1) then
           count:= count+1;
           Res:= Res,k;
        fi
      fi
    od:
    Res; # Robert Israel, Mar 06 2018
  • Mathematica
    utpQ[{a_, b_}]:=And@@PrimeQ[a + b + {1, -1}]; Flatten[Position[Select[ Partition[Prime[Range[25000]],2,1],#[[2]]-#[[1]]==2&],?utpQ]] (* _Harvey P. Dale, Sep 16 2013 *)
  • PARI
    twinl(n) = { local(c,x); c=0; x=1; while(c
    				

Formula

{k: A054735(k)+1 = A006512(j), any j} - R. J. Mathar, Apr 06 2009

Extensions

Edited by R. J. Mathar, Apr 06 2009

A256386 Numbers m such that m-2, m-1, m+1, m+2 cannot all be represented in the form x*y + x + y for values x, y with x >= y > 1.

Original entry on oeis.org

2, 3, 4, 5, 8, 11, 59, 1319, 1619, 4259, 5099, 6659, 6779, 11699, 12539, 21059, 66359, 83219, 88259, 107099, 110879, 114659, 127679, 130199, 140759, 141959, 144539, 148199, 149519, 157559, 161339, 163859, 175079, 186479, 204599, 230939, 249539, 267959, 273899, 312839
Offset: 1

Views

Author

Alex Ratushnyak, Mar 31 2015

Keywords

Comments

Indices of terms surrounded by pairs of zeros in A255361.
Conjectures:
1. A255361(a(n)) > 0 for n > 4.
2. All terms > 8 are primes.
3. All terms > 8 are terms of these supersequences: A118072, A171667, A176821, A181602, A181669.
From Lamine Ngom, Feb 12 2022: (Start)
For n > 4, a(n) is not a term of A254636. This means that a(n)-2, a(n)-1, a(n)+1 and a(n)+2 are adjacent terms in A254636.
Number of terms < 10^k: 5, 7, 7, 13, 19, 96, 441, 2552, ...
Conjecture 2 would follow if we establish the equivalence "t is in sequence" <=> "t is a term of b(n): lesser of twin primes pair p and q such that (p - 1)/2 and (q + 1)/2 are also a pair of twin primes (A077800)".
It appears that b(n) = a(n) for n > 5. Verified for all terms < 10^9. (End)

Examples

			9, 10, 12, 13 cannot be represented as x*y + x + y, where x >= y > 1. Therefore 11 is in the sequence.
		

Crossrefs

Formula

a(n) = A158870(n-5) - 2, n > 5 (conjectured). - Lamine Ngom, Feb 12 2022

A358573 a(n) = smallest prime p such that q, r and s are all prime, where q = p + 2*(2*n + 1), r = (p - 2*n - 1)/2, and s = (q + 2*n + 1)/2.

Original entry on oeis.org

11, 13, 19, 17, 19, 229, 47, 29, 163, 29, 31, 37, 47, 53, 1231, 41, 43, 61, 83, 61, 439, 1217, 59, 73, 59, 61, 67, 89, 83, 541, 71, 73, 103, 593, 271, 349, 83, 89, 103, 461, 239, 97, 107, 97, 211, 149, 107, 229, 263, 181, 499, 317, 139, 1453, 131, 809, 127, 137, 163
Offset: 0

Views

Author

Lamine Ngom, Nov 23 2022

Keywords

Comments

Equivalently, smallest prime of the form (p + q - 2*n - 1), where p is prime, q = p + 2*(2*n + 1) is prime, and (p + q + 2*n + 1) is also prime.
a(n) is the first term of the sequence of numbers m such that (m - 2*n - 2), (m - 1), (m + 4*n + 1) and (m + 6*n + 2) cannot be represented as x*y + x + y, with x >= y > 1 (A254636).
Such sequence contains only prime numbers which are the lesser of a pair of primes (p, q) such that the pair (r, s) also forms a pair of primes with the same difference, where q = p + 2*(2*n + 1), r = (p - 2*n - 1)/2, and s = (q + 2*n + 1)/2.

Examples

			229 is the lesser prime in the pair (229, 251) with difference 2*(2*5+1) = 22, and the couple (229-22/2)/2 = 109 and (251+22/2)/2 = 131 forms another prime pair with distance 22, and there is no prime lower than 229 with this property. Hence a(5) = 229.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{p=2, q, r, s}, While[!AllTrue[{(q = p + 2*(2*n + 1)), (r = (p - 2*n - 1)/2), (s = (q + 2*n + 1)/2)}, #>0 && PrimeQ[#] &], p = NextPrime[p]]; p]; Array[a, 60, 0] (* Amiram Eldar, Nov 23 2022 *)
  • PARI
    a(n) = my(p=2, q); while(!isprime(q = p + 2*(2*n + 1)) || !isprime((p - 2*n - 1)/2) || !isprime((q + 2*n + 1)/2), p=nextprime(p+1)); p; \\ Michel Marcus, Nov 23 2022
Showing 1-3 of 3 results.