OFFSET
0,1
COMMENTS
Numbers represented as the palindrome 313 in number base n including base n=1, base 2 (binary) and base 3 with 'illegal' digit 3: 313_1=7, 313_2=17, 313_3=33, ... 313_9=255, 313_10=313, ...
LINKS
Index entries for linear recurrences with constant coefficients, signature (3, -3, 1).
FORMULA
EXAMPLE
313 in base 7 is 3*7^2 + 1*7 + 3 = 157.
MATHEMATICA
Array[3 #^2 + # + 3 &, 52, 0] (* Michael De Vlieger, Nov 15 2017 *)
LinearRecurrence[{3, -3, 1}, {3, 7, 17}, 52] (* or *)
CoefficientList[Series[-(5 x^2 - 2 x + 3)/(x - 1)^3, {x, 0, 51}], x] (* Robert G. Wilson v, Nov 29 2017 *)
PROG
(PARI) a(n) = 3*n^2 + n + 3; \\ Michel Marcus, Dec 15 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ron Knott, Nov 14 2017
STATUS
approved