login
A208665
Numbers that match odd ternary polynomials; see Comments.
5
3, 6, 27, 30, 33, 54, 57, 60, 243, 246, 249, 270, 273, 276, 297, 300, 303, 486, 489, 492, 513, 516, 519, 540, 543, 546, 2187, 2190, 2193, 2214, 2217, 2220, 2241, 2244, 2247, 2430, 2433, 2436, 2457, 2460, 2463, 2484, 2487, 2490, 2673, 2676, 2679
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
Cf. A037314, A207966, A338086 (ternary digit duplication).
Sequence in context: A304051 A128437 A200654 * A256762 A064283 A266857
KEYWORD
base,nonn
AUTHOR
Clark Kimberling, Feb 29 2012
STATUS
approved