OFFSET
0,2
COMMENTS
10^(Floor[n/4]) | a(n). The first term of each value cycles the pattern {1, 2, 4, 8}. - G. C. Greubel, Sep 10 2018
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..2500
Index entries for linear recurrences with constant coefficients, signature (0,0,0,10).
FORMULA
a(n) = 2^(n mod 4)*10^floor(n/4). - M. F. Hasler, Jun 22 2018
From Chai Wah Wu, Sep 03 2020: (Start)
a(n) = 10*a(n-4) for n > 3.
G.f.: -(2*x + 1)*(4*x^2 + 1)/(10*x^4 - 1). (End)
MATHEMATICA
Table[FromDigits[IntegerDigits[2^n, 16]], {n, 50}] (* G. C. Greubel, Sep 11 2018 *)
PROG
(PARI) apply( a(n)=2^(n%4)*10^(n\4), [0..30]) \\ M. F. Hasler, Jun 22 2018
(Magma) [Seqint(Intseq(2^n, 16)): n in [0..30]]; // G. C. Greubel, Sep 10 2018
(Python)
def A004655(n): return 10**(n>>2)<<(n&3) # Chai Wah Wu, Jan 27 2023
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved