OFFSET
1,1
COMMENTS
The first a few of a(n)=0 terms of this sequence appear on n=72030, 228439, 282059, 383424, 384204, 593477, 710787, 736541, 1057465, 1628226, 1831745, 1892512, 1922647, 2128995, 2244660, 2260650, 2276272, 2289706, 2374644, 2507484, 2633477, 2681747, 2695747, 2875824, 2889472, 2913659 up to n<=3000000.
LINKS
Lei Zhou, Table of n, a(n) for n = 1..10000
EXAMPLE
n=1: 6n+3=9. 9=(100)_bt. 1<=k<=(3-2)=1. When k=1, (6n+3)+/-3^1+/-1 = 5, 7, 11, 13, all primes. So a(1) = 4;
n=2: 6n+3=15. 15=(1TT0)_bt. 1<=k<=(4-2)=2. When k=1, (6n+3)+/-3^1+/-1 = 11, 13, 17, 19, all primes; when k=2, (6n+3)+/-3^2+/-1 = 5, 7, 23, 25, three primes. Totals 7. So a(2) = 7.
MATHEMATICA
BTDigits[m_Integer, g_] :=
Module[{n = m, d, sign, t = g},
If[n != 0, If[n > 0, sign = 1, sign = -1; n = -n];
d = Ceiling[Log[3, n]]; If[3^d - n <= ((3^d - 1)/2), d++];
While[Length[t] < d, PrependTo[t, 0]];
t[[Length[t] + 1 - d]] = sign;
t = BTDigits[sign*(n - 3^(d - 1)), t]]; t];
Table[trib = 6*n + 3; t = BTDigits[trib, {}]; l = Length[t]; ct = 0;
Do[If[PrimeQ[trib - 3^j - 1], ct++];
If[PrimeQ[trib - 3^j + 1], ct++]; If[PrimeQ[trib + 3^j + 1], ct++];
If[PrimeQ[trib + 3^j - 1], ct++], {j, 1, l - 2}]; ct, {n, 1, 111}]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Lei Zhou, Oct 20 2016
STATUS
approved