|
|
A117606
|
|
a(n) = ones digit minus tens digit of the square of a(n-1), with a(0) = 2.
|
|
1
|
|
|
2, 4, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7, 5, 3, 9, -7
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
From the 2006 Collaborative Problem Solving Contest, written by Tom Clymer. It repeats forever, obviously. If the terms are thought of as the absolute value of the difference of the digits, then the -7's should all be 7 instead, but the remaining terms are unchanged. (The original puzzle sequence had only 2,4,5,3,9 given).
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (2 + 4*x + 5*x^2 + 3*x^3 + 7*x^4 - 11*x^5) / ((1 - x)*(1 + x)*(1 + x^2)).
a(n) = (5 + 9*(-1)^n + (2 - 5*i)*(-i)^n + (2+5*i)*i^n) / 2 for n>1.
a(n) = a(n-4) for n>6.
(End)
|
|
EXAMPLE
|
Since a(0) = 2, a(1) = 2^2 = 4 and since a(1) = 4, a(2) = the difference of the digits of 16 = 5.
|
|
PROG
|
(PARI) Vec((2 + 4*x + 5*x^2 + 3*x^3 + 7*x^4 - 11*x^5) / ((1 - x)*(1 + x)*(1 + x^2)) + O(x^100)) \\ Colin Barker, Oct 21 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,sign,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|