OFFSET
1,1
COMMENTS
The ternary polynomials (having all coefficients in {0,1,2}) are enumerated at A207966. This sequence shows the numbers n for which p(n,-x)=-p(n,x).
MATHEMATICA
t = Table[IntegerDigits[n, 3], {n, 1, 4000}];
b[n_] := Reverse[Table[x^k, {k, 0, n}]]
p[n_, x_] := t[[n]].b[-1 + Length[t[[n]]]]
Table[p[n, x], {n, 1, 30}]
even = {}; Do[n++; If[(p[n, x] /. x -> -x) == p[n, x], AppendTo[even, n]], {n, 1600}];
even (* A037314 for n >= 2 *)
odd = {}; Do[n++; If[(p[n, x] /. x -> -x) == -p[n, x], AppendTo[odd, n]], {n, 3900}];
odd (* A208665 *)
PROG
(PARI) a(n) = 3*fromdigits(digits(n, 3), 9); \\ Kevin Ryde, Oct 17 2020
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Clark Kimberling, Feb 29 2012
STATUS
approved