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.
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, 106, 128, 147, 176, 202, 267, 331, 458, 512, 555, 908, 942, 1004, 1123, 1374, 1386, 1467
Offset: 1
Keywords
Examples
(10^1-7)*10^1-1=29 prime 31 the twin prime so a(1)=1. (10^1-4)*10^2-1=599 prime 601 the twin prime so a(2)=2. (10^1-1)*10^3-1=8999 prime 9001 the twin prime so a(3)=3. (10^2-1)*10^4-1=989999 prime 990001 twin prime so a(4)=4. (10^3-1)*10^5-1=99899999 prime. (10^3-1)*10^5+1=99900001 twin prime so a(5)=5.
Programs
-
Maple
isA213882 := proc(b) local c,d,p; for c from 1 to 2*b-1 do for d from 0 to 9 do p := (10^c-d)*10^b-1 ; if isprime(p) and isprime(p+2) then return true; end if; end do: end do: return false ; end proc: for n from 1 to 2000 do if isA213882(n) then printf("%d,\n",n); end if; end do; # R. J. Mathar, Jul 21 2012
Comments