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.

A213882 Numbers b such that there is at least one number c and one single-digit number d such that (10^c-d)*10^b-1 and (10^c-d)*10^b+1 are twin primes with 0 < c < 2*b.

This page as a plain text file.
%I A213882 #23 Jul 23 2012 19:32:39
%S A213882 1,2,3,4,5,6,7,8,9,13,14,15,19,21,23,26,40,43,45,52,54,55,69,77,90,99,
%T A213882 106,128,147,176,202,267,331,458,512,555,908,942,1004,1123,1374,1386,
%U A213882 1467
%N A213882 Numbers b such that there is at least one number c and one single-digit number d such that (10^c-d)*10^b-1 and (10^c-d)*10^b+1 are twin primes with 0 < c < 2*b.
%C A213882 The single-digit number d is always 1, 4, or 7 in this format because otherwise one of (10^c-d)*10^b+-1 is a multiple of 3.
%C A213882 For one b there may be more than one matching (c,d).
%C A213882 The sequence of associated minimum c values starts: 1, 1, 1, 2, 3, 6, 1, 4, 2, 11, 9, 4, 7, 12, 9, 9, 42, 62, 5, 31, 2, 72, 88, 141, 119, 181, 6, 38, 164, 132, 53, 293, 150, 704, 557, 980, 952, 1596, 529, 2221, 200, 169, 1371,... and their associated d values are 4, 4, 1, 1, 1, 1, 7, 4, 7, 4, 1, 1, 4, 1, 7, 1, 4, 1, 7, 7, 7, 4, 1, 7, 1, 7, 4, 4, 4, 7, 1, 1, 7, 7, 4, 4, 4, 1, 1, 7, 7, 1, 1, ....
%e A213882 (10^1-7)*10^1-1=29 prime 31 the twin prime so a(1)=1.
%e A213882 (10^1-4)*10^2-1=599 prime 601 the twin prime so a(2)=2.
%e A213882 (10^1-1)*10^3-1=8999 prime 9001 the twin prime so a(3)=3.
%e A213882 (10^2-1)*10^4-1=989999 prime 990001 twin prime so a(4)=4.
%e A213882 (10^3-1)*10^5-1=99899999 prime.
%e A213882 (10^3-1)*10^5+1=99900001 twin prime so a(5)=5.
%p A213882 isA213882 := proc(b)
%p A213882      local c,d,p;
%p A213882     for c from 1 to 2*b-1 do
%p A213882         for d from 0 to 9 do
%p A213882             p := (10^c-d)*10^b-1 ;
%p A213882             if isprime(p) and isprime(p+2) then
%p A213882                 return true;
%p A213882             end if;
%p A213882         end do:
%p A213882     end do:
%p A213882     return false ;
%p A213882 end proc:
%p A213882 for n from 1 to 2000 do
%p A213882     if isA213882(n) then
%p A213882         printf("%d,\n",n);
%p A213882     end if;
%p A213882 end do; # _R. J. Mathar_, Jul 21 2012
%Y A213882 Cf. A213883, A213884.
%K A213882 nonn
%O A213882 1,2
%A A213882 _Pierre CAMI_, Jun 26 2012