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

A158870 Sums of the form (twin primes + 1) which are also an upper twin prime.

Original entry on oeis.org

13, 61, 1321, 1621, 4261, 5101, 6661, 6781, 11701, 12541, 21061, 66361, 83221, 88261, 107101, 110881, 114661, 127681, 130201, 140761, 141961, 144541, 148201, 149521, 157561, 161341, 163861, 175081, 186481, 204601, 230941, 249541, 267961
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 member, shown in A158866.
Moreover, except the first term, these numbers are of the form 10k+1. [We prove this by exhausting the possibilities when calculating the upper, summing and inspecting the lower of the sum. Here are the possible outcomes.
p1(k), p2(k) p2(m) = p1(k)+p2(k)+1
------------ ---------------------------------
10k+1 10k+3 20k+4+1 not prime
10k+3 10k+5 p2(k) not prime
10k+5 10k+7 p1(k) not prime
10k+7 10k+9 20k+16+1 upper => p1(m) not prime
10k+9 10k+11 20k+20+1 = 10(2k+2)+1
So the only form that was not eliminated, is 10k+1. 13 defies this scheme because 10k+5 is prime for k=0, Q.E.D.]

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 1321 is in the sequence.
		

Crossrefs

Cf. A158866.

Programs

  • Mathematica
    With[{tws=Total/@Select[Partition[Prime[Range[25000]],2,1],#[[2]]-#[[1]] == 2&]+1},Select[tws,And@@PrimeQ[#+{0,-2}]&]] (* Harvey P. Dale, Apr 30 2014 *)
  • PARI
    gp > g(n)=for(x=1,n,y=2*twinl(x)+3;if(isprime(y)&&isprime(y-2), print1(y",")))

Formula

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

Extensions

Edited by R. J. Mathar, Apr 06 2009

A195104 Smallest prime p such that p*t(n) +- 1 is a twin prime pair, where t(n)=A014574(n) is the n-th twin prime average.

Original entry on oeis.org

3, 2, 5, 11, 2, 11, 3, 29, 101, 199, 29, 7, 13, 11, 29, 71, 13, 3, 71, 101, 29, 43, 79, 5, 11, 11, 5, 29, 61, 2, 2, 11, 19, 11, 29, 5, 11, 7, 41, 19, 181, 19, 59, 5, 11, 7, 29, 11, 41, 179, 41, 13, 61, 181, 19, 241, 139, 331, 271, 3, 59, 5, 41, 89, 19, 2, 5, 131, 59, 5, 5, 509, 2
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 16 2011

Keywords

Comments

a(n) = 2 for n in A158866. - Robert Israel, Mar 07 2021

Examples

			a(4)=11 because 11*A014574(4) +- 1 = 11*18 +- 1 = 198 +- 1 is a twin prime pair, A014574(4) +- 1 = 18 +- 1 is also a twin prime pair, and 11 is prime.
		

Crossrefs

Programs

  • Maple
    A195104 := proc(n)
        k := A014574(n) ;
        for i from 1 do
            p := ithprime(i) ;
            if isprime(p*k-1) and isprime(p*k+1) then
                return p;
            end if;
        end do:
    end proc:
    seq(A195104(n),n=1..60) ; # R. J. Mathar, Dec 16 2011

Extensions

a(64) corrected by Robert Israel, Mar 07 2021
Showing 1-2 of 2 results.