cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A208665 Numbers that match odd ternary polynomials; see Comments.

This page as a plain text file.
%I A208665 #20 Oct 17 2020 04:22:17
%S A208665 3,6,27,30,33,54,57,60,243,246,249,270,273,276,297,300,303,486,489,
%T A208665 492,513,516,519,540,543,546,2187,2190,2193,2214,2217,2220,2241,2244,
%U A208665 2247,2430,2433,2436,2457,2460,2463,2484,2487,2490,2673,2676,2679
%N A208665 Numbers that match odd ternary polynomials; see Comments.
%C A208665 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).
%t A208665 t = Table[IntegerDigits[n, 3], {n, 1, 4000}];
%t A208665 b[n_] := Reverse[Table[x^k, {k, 0, n}]]
%t A208665 p[n_, x_] := t[[n]].b[-1 + Length[t[[n]]]]
%t A208665 Table[p[n, x], {n, 1, 30}]
%t A208665 even = {}; Do[n++; If[(p[n, x] /. x -> -x) == p[n, x], AppendTo[even, n]], {n, 1600}];
%t A208665 even     (* A037314 for n >= 2 *)
%t A208665 odd = {}; Do[n++; If[(p[n, x] /. x -> -x) == -p[n, x], AppendTo[odd, n]], {n, 3900}];
%t A208665 odd      (* A208665 *)
%o A208665 (PARI) a(n) = 3*fromdigits(digits(n,3),9); \\ _Kevin Ryde_, Oct 17 2020
%Y A208665 Cf. A037314, A207966, A338086 (ternary digit duplication).
%K A208665 base,nonn
%O A208665 1,1
%A A208665 _Clark Kimberling_, Feb 29 2012