%I #9 Apr 14 2020 21:28:53
%S 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,
%T 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,
%U -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
%N a(n) = ones digit minus tens digit of the square of a(n-1), with a(0) = 2.
%C 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).
%H Colin Barker, <a href="/A117606/b117606.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="http://www.natassessment.com/">National Assessment and Testing</a>, the sponsor of the contest from which this problem comes.
%H <a href="http://www.natassessment.com/2006_CPSC/2006_CPSC_Info.htm">The 2006 Collaborative Problem Solving Contest, 2006</a> is the source of this puzzle.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,1).
%F From _Colin Barker_, Oct 21 2017: (Start)
%F G.f.: (2 + 4*x + 5*x^2 + 3*x^3 + 7*x^4 - 11*x^5) / ((1 - x)*(1 + x)*(1 + x^2)).
%F a(n) = (5 + 9*(-1)^n + (2 - 5*i)*(-i)^n + (2+5*i)*i^n) / 2 for n>1.
%F a(n) = a(n-4) for n>6.
%F (End)
%e Since a(0) = 2, a(1) = 2^2 = 4 and since a(1) = 4, a(2) = the difference of the digits of 16 = 5.
%o (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
%K base,sign,easy
%O 0,1
%A _Joshua Zucker_, Apr 06 2006