OFFSET
1,1
COMMENTS
Last digit of the number whose binary representation is the concatenation of n 1's, 2n-1 0's and n 1's.
a(n) is the final digit of A147539(n).
LINKS
FORMULA
a(n+1) = 7-2*cos(Pi*n/2)+2*sin(Pi*n/2). - R. J. Mathar, Oct 08 2011
a(n) = a(n-1)-a(n-2)+a(n-3) for n>3. G.f.: x*(5*x^2+4*x+5)/((1-x)*(x^2+1)). [Colin Barker, Nov 04 2012]
a(n) = a(n-4) for n>4. - Wesley Ivan Hurt, Jul 09 2016
MAPLE
A010879 := proc(n) n mod 10; end:
A147539 := proc(n) 2^n-1+2^(4*n-1)-2^(3*n-1); end:
seq(op([5, 9, 9, 5]), n=1..40); # Wesley Ivan Hurt, Jul 09 2016
MATHEMATICA
PadRight[{}, 100, {5, 9, 9, 5}] (* Wesley Ivan Hurt, Jul 09 2016 *)
PROG
(Magma) &cat [[5, 9, 9, 5]^^30]; // Wesley Ivan Hurt, Jul 09 2016
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Omar E. Pol, Nov 14 2008, Jan 25 2009
EXTENSIONS
More terms from R. J. Mathar, Jan 22 2009
STATUS
approved