OFFSET
1,2
COMMENTS
Theorem. An integer is in the sequence iff in its expansion on base 3 all digits at the k-th position from the end, k=3, 5, 7, ..., are zeros while the first digit from the end is 1. To get the decomposition of m==1(mod 3) as sum a(l)+3a(s), write m-3 as Sum b_j 3^j, then a(l) = 1 + Sum_{j odd} b_j 3^j.
EXAMPLE
If m=46, then we have 46=1*3^0+2*3^2+1*3^3, thus a(l)=1+1*3^3=28 and the required decomposition is: 46=28+3*4, such that a(s)=4. We see that l=4, s=2, i.e. "index coordinates" of 46 are (4, 2). Thus we have a one-to-one map of integers m==1(mod 3), m>=4, to the positive lattice points on the plane.
PROG
(PARI) isok(n) = {my(d=Vecrev(digits(n, 3)), k=3); while (k <= #d, if (d[k], return (0)); k += 2; ); d[1] == 1; } \\ 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