OFFSET
1,5
COMMENTS
Sign nonadjacent form notation is defined by the publications listed in the reference.
We use abbreviation SNF for "signed nonadjacent form" notation.
REFERENCES
Joerg Arndt, Matters Computational - Ideas, Algorithms, Source Code, 2011, Springer, pp. 61-62.
LINKS
H. Prodinger, On binary representations of integers with digits -1,0,1, Integers 0 (2000), #A08.
EXAMPLE
It needs at least 5 digits to have three or more nonzero digits in SNF notation. So a(1)=a(2)=a(3)=a(4)=0.
In 5-digit SNF numbers, 10T0T = 11 base 10, 10T01 = 13, and 10101 = 19 are primes with three nonzero digits in SNF notation. So a(5)=3. Another prime with 5 SNF digits, 10001 = 17 has only 2 SNF digits, so is excluded.
MATHEMATICA
Table[s1=2^(n-1); ct=0; If[n>=5, Do[s2=2^i; If[PrimeQ[s1+s2+1], ct++]; If[PrimeQ[s1+s2-1], ct++]; If[PrimeQ[s1-s2+1], ct++]; If
[PrimeQ[s1-s2-1], ct++], {i, 2, n-3}]]; ct, {n, 1, 73}]
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Lei Zhou, Aug 17 2020
STATUS
approved