OFFSET
1,2
COMMENTS
Although the present sequence has not been thought of via "writing a(n) in base b", this could be seen as "base 5" version of A102039 (base 10) and A001651 (base 3), A047235 (base 6), A047350 (base 7) and A007612 (base 9). For 4 or 8 one would get a sequence constant from that (3rd resp. 4th) term on.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1).
FORMULA
a(n) = 2^(n-1 mod 4) + 10*floor((n-1)/4).
a(n) = (-10+(1+2*i)*(-i)^n+(1-2*i)*i^n+10*n)/4 where i=sqrt(-1). a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4). G.f.: x*(2*x^3+2*x^2+1) / ((x-1)^2*(x^2+1)). - Colin Barker, Jan 16 2014
MATHEMATICA
NestList[#+Mod[#, 5]&, 1, 80] (* Harvey P. Dale, Oct 20 2024 *)
PROG
(PARI) is_A235700(n) = bittest(278, n%10) \\ 278=2^1+2^2+2^4+2^8
(PARI) A235700 = n -> 2^((n-1)%4)+(n-1)\4*10
(PARI) print1(a=1); for(i=1, 99, print1(", "a+=a%5))
(PARI) Vec(x*(2*x^3+2*x^2+1)/((x-1)^2*(x^2+1)) + O(x^100)) \\ Colin Barker, Jan 16 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
M. F. Hasler, Jan 14 2014
STATUS
approved