OFFSET
1,3
COMMENTS
It appears that sign(a(n+1) - a(n)) gives A102283. - Filip Zaludek, Oct 29 2016
This is clear: a(n) = 1 for n == 1 or 2 (mod 3), and a(n) >= 7 for n == 0 (mod 3): see comment by Franklin T. Adams-Watters on A037314. - Robert Israel, Nov 06 2016
LINKS
Michel Marcus, Table of n, a(n) for n = 1..2000
FORMULA
It appears that the sequence is given by the following recursion: a(n)=1 if n=1, a(n)=9a(3^(k-1))-2 if n=3^k for some k>0, a(n)=a(n-3^(k-1)) if 3^(k-1)<n<3^k for some k>0. This recursion formula has been verified for n<=2000.
a(n) = A066443(A007949(n)). (This is equivalent to the conjectured recursion above; that recursion is correct.) - Franklin T. Adams-Watters, Jul 24 2006
G.f. g(x) satisfies g(x) = 9 g(x^3) + x*(1+2*x)/(1+x+x^2). - Robert Israel, Nov 06 2016
MAPLE
MATHEMATICA
Differences@ Table[FromDigits[RealDigits[n, 3], 9], {n, 1, 100}] (* Michael De Vlieger, Nov 10 2016, after Clark Kimberling at A037314 *)
PROG
(PARI) a037314(n) = {my(d = digits(n, 3)); subst(Pol(d), x, 9); }
a(n) = a037314(n) - a037314(n-1); \\ Michel Marcus, Oct 30 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
John W. Layman, Jul 17 2006
STATUS
approved