OFFSET
1,2
COMMENTS
Such q certainly do not exist if p == 1 (mod 10).
Corresponding exponents of 6 (0 if a(n)=0): 0, 0, 2, 2, 0, 2, 2, 2, 2, 2, 0, 3, 0, 3, 4, 3, 3, 0.
LINKS
Zak Seidov, Table of n, a(n) for n = 1..162
EXAMPLE
n=2: 3+3=6^1, n=3: 5+31=6^2, n=4: 7+29=6^2, n=6: 13+23=6^2.
MATHEMATICA
s={0, 3}; Do[p=Prime[n]; If[Mod[p, 10]<2, AppendTo[s, 0]; Goto[ne]]; m=Ceiling[Log[6, p]]; While[!PrimeQ[q=6^m-p], m++]; AppendTo[s, q]; Label[ne], {n, 3, 162}]; s
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Aug 28 2012
STATUS
approved