%I #14 Oct 30 2022 15:27:14
%S 1,4,0,9,1,6,4,5,9,6,6,9,5,4,6,1,9,0,4,1,1,4,0,9,1,6,4,5,9,6,6,9,5,4,
%T 6,1,9,0,4,1,1,4,0,9,1,6,4,5,9,6,6,9,5,4,6,1,9,0,4,1,1,4,0,9,1,6,4,5,
%U 9,6,6,9,5,4,6,1,9,0,4,1,1,4,0,9,1,6
%N Period 20, repeat [1, 4, 0, 9, 1, 6, 4, 5, 9, 6, 6, 9, 5, 4, 6, 1, 9, 0, 4, 1].
%C Units digits of the centered triangular numbers A005448(n).
%C The cyclic part of this sequence is palindromic.
%H <a href="/index/Rec#order_15">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,1,0,0,0,0,-1,0,0,0,0,1).
%F a(n) = A010879(A005448(n)).
%F a(n) = a(n-5)-a(n-10)+a(n-15).
%F a(n) = a(n-20).
%F a(n) = 45-a(n-1)-a(n-2)-a(n-3)-a(n-4)-a(n-10)-a(n-11)-a(n-12)-a(n-13)-a(n-14).
%F a(n) = 90 - Sum_{i=1..19} a(n-i), with n > 19.
%F a(n) = (3n^2/2+3n/2+1) mod 10.
%F G.f.: (1+x+x^2)*(1+3*x-4*x^2+10*x^3-5*x^4+5*x^6-5*x^8+10*x^9-4*x^10+3*x^11+x^12) / ((1-x)*(1+x^2)*(1+x+x^2+x^3+x^4)*(1-x^2+x^4-x^6+x^8)). - _Bruno Berselli_, Jun 13 2012
%e As the seventh centered triangular number is A005448(7)=64, which has units’ digit 4, then a(7)=4
%t Mod[1/2(3#^2-3#+2),10] &/@Range[86]
%o (PARI) a(n)=(3*n^2+3*n+2)/2%10 \\ _Charles R Greathouse IV_, Jul 21 2015
%Y Cf. A010879, A005448.
%K nonn,easy
%O 0,2
%A _Ant King_, Jun 12 2012