|
|
A033082
|
|
Numbers in which all pairs of consecutive base-4 digits differ by 2.
|
|
2
|
|
|
1, 2, 3, 7, 8, 13, 29, 34, 55, 119, 136, 221, 477, 546, 887, 1911, 2184, 3549, 7645, 8738, 14199, 30583, 34952, 56797, 122333, 139810, 227191, 489335, 559240, 908765, 1957341, 2236962, 3635063, 7829367, 8947848, 14540253, 31317469, 35791394, 58161015
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(x^5+3*x^3+3*x^2+2*x+1) / (4*x^9-x^6-4*x^3+1). - Colin Barker, May 31 2015
a(n) = 4*a(n-3) + a(n-6) - 4*a(n-9) for n > 9. - Colin Barker, Jun 01 2015
|
|
MAPLE
|
a:= proc(n) option remember; `if`(n<1, 0,
a(n-3)*4 +[1, 2, 3, 3, 0, 1][1+irem(n-1, 6)])
end:
|
|
MATHEMATICA
|
Join[{1, 2, 3}, Select[Range[230000], Union[Abs[Differences[ IntegerDigits[ #, 4]]]]=={2}&]] (* Harvey P. Dale, Sep 20 2011 *)
|
|
PROG
|
(PARI) Vec(x*(x^5+3*x^3+3*x^2+2*x+1)/(4*x^9-x^6-4*x^3+1) + O(x^100)) \\ Colin Barker, Jun 01 2015
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|