OFFSET
1,1
COMMENTS
Positive integers such that for every integer m==8 (mod 9) there exists a unique representation of m as a sum of the form a(l)+3a(s).
MATHEMATICA
fQ[n_] := Module[{d = Reverse[IntegerDigits[n, 3]], k = 3, ans = True}, While[k <= Length[d], If[d[[k]] > 0, ans = False]; k += 2]; ans && d[[1]] == 1]; aQ[n_] := Mod[n + 1, 3] == 0 && fQ[(n + 1)/3]; Select[Range[10000], aQ] (* Amiram Eldar, Dec 09 2018 *)
PROG
(PARI) isa(n) = {my(d=Vecrev(digits(n, 3)), k=3); while (k <= #d, if (d[k], return (0)); k += 2; ); d[1] == 1; } \\ A146085
isok(n) = !((n+1) % 3) && isa((n+1)/3); \\ Michel Marcus, Dec 09 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Oct 27 2008
EXTENSIONS
More terms from Michel Marcus, Dec 09 2018
STATUS
approved