login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Period 4: repeat [5, 9, 9, 5].
1

%I #24 Mar 15 2024 02:20:13

%S 5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,5,9,

%T 9,5,5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,

%U 5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,5,9,9,5,5

%N Period 4: repeat [5, 9, 9, 5].

%C Last digit of the number whose binary representation is the concatenation of n 1's, 2n-1 0's and n 1's.

%C a(n) is the final digit of A147539(n).

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1,1).

%F a(n+1) = 7-2*cos(Pi*n/2)+2*sin(Pi*n/2). - _R. J. Mathar_, Oct 08 2011

%F 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]

%F a(n) = a(n-4) for n>4. - _Wesley Ivan Hurt_, Jul 09 2016

%p A010879 := proc(n) n mod 10; end:

%p A147539 := proc(n) 2^n-1+2^(4*n-1)-2^(3*n-1); end:

%p A147818 := proc(n) A010879(A147539(n)); end: # _R. J. Mathar_, Jan 22 2009

%p seq(op([5, 9, 9, 5]), n=1..40); # _Wesley Ivan Hurt_, Jul 09 2016

%t PadRight[{}, 100, {5, 9, 9, 5}] (* _Wesley Ivan Hurt_, Jul 09 2016 *)

%o (Magma) &cat [[5, 9, 9, 5]^^30]; // _Wesley Ivan Hurt_, Jul 09 2016

%Y Cf. A138120, A147539.

%K base,easy,nonn

%O 1,1

%A _Omar E. Pol_, Nov 14 2008, Jan 25 2009

%E More terms from _R. J. Mathar_, Jan 22 2009