login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Twin primes ending in 1.
7

%I #14 Oct 24 2021 11:27:56

%S 11,31,41,61,71,101,151,181,191,241,271,281,311,421,431,461,521,571,

%T 601,641,661,811,821,881,1021,1031,1051,1061,1091,1151,1231,1291,1301,

%U 1321,1451,1481,1621,1721,1871,1931,1951,2081,2111,2131,2141,2311,2341,2381

%N Twin primes ending in 1.

%C These are twin primes == 1 (mod 30) or == 11 (mod 30) or == 21 (mod 30). In the first case they cannot be lower twin primes because the upper ones would be == 3 (mod 30) and divisible by 3. In the second case they cannot be upper twin primes because the lower ones would be == 9 (mod 30) and divisible by 3. The last case is excluded because that implies they are divisible by 3. In summary the upper twin primes in here are given by A282326, the lower twin primes in here by A282321. - _R. J. Mathar_, Feb 14 2017

%H Harvey P. Dale, <a href="/A181603/b181603.txt">Table of n, a(n) for n = 1..1000</a>

%H Omar E. Pol, <a href="http://www.polprimos.com">Determinacion geometrica de los numeros primos y perfectos</a>

%p isA181603 := proc(p)

%p if isprime(p) and (isprime(p-2) or isprime(p+2)) then

%p if modp(p,10) = 1 then

%p true;

%p else

%p false;

%p end if ;

%p else

%p false;

%p end if;

%p end proc:

%p for n from 1 to 1000 do

%p if isA181603(n) then

%p printf("%d,",n) ;

%p end if;

%p end do: # _R. J. Mathar_, Feb 14 2017

%t Select[Prime@ Range@ 360, Mod[ #, 10] == 1 && (PrimeQ[ # - 2] || PrimeQ[ # + 2]) &] (* _Robert G. Wilson v_, Nov 06 2010 *)

%t Select[Flatten[Select[Partition[Prime[Range[400]],2,1],#[[2]]-#[[1]] == 2&]],Mod[#,10]==1&] (* _Harvey P. Dale_, Oct 24 2021 *)

%Y Cf. A001097, A181604, A181605, A181606.

%K base,nonn

%O 1,1

%A _Omar E. Pol_, Nov 01 2010

%E More terms from _Robert G. Wilson v_, Nov 06 2010