OFFSET
1,2
COMMENTS
The base 3 expansion of n may only contain 1's and 2's and if a 2 is present then 11 must also be present. These are the only restrictions.
LINKS
David Applegate, Table of n, a(n) for n = 1..300
PROG
(AWK) awk 'function g(s, v, n){if (n==0){if (index(s, "2")==0||index(s, "11")>0)print v; }else{g(s "1", v*3+1, n-1); g(s "2", v*3+2, n-1); }}BEGIN{for (i=1; i<=8; i++)g("", 0, i); }' # David Applegate
(C++) // See the Applegate link in A135463.
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
David Applegate and N. J. A. Sloane, Feb 07 2008
STATUS
approved