OFFSET
0,2
COMMENTS
Has an apparent fractal structure with the following properties:
a(n) for n = 0, 1, 3, 7, 15, ... are 1, 3, 9, 27, ....
Odd n-th terms are divisible by 3 (starting with n=1) creating the same sequence.
Then the result is relabeled with n=0,1,2,...; with the odds again divisible by 3, getting (1, 3, 8, 9, 23, ...); and so on.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
Given M = an infinite triangular matrix with (1, 3, 5, ...) in each column; shifted down twice for columns > 0. Then A176205 = lim_{n->infinity} M^n, the left shifted vector considered as a sequence.
a(2*n) = a(n) + 5*a(n-1) and a(2*n+1) = 3*a(n), with a(0) = 1. - G. C. Greubel, Mar 13 2020
MAPLE
a:= proc(n) option remember;
if n=0 then 1
elif `mod`(n, 2)=0 then a(n/2) + 5*a(n/2 -1)
else 3*a((n-1)/2)
fi; end:
seq( a(n), n=0..60); # G. C. Greubel, Mar 13 2020
MATHEMATICA
a[n_]:= If[n==0, 1, If[EvenQ[n], a[n/2] +5*a[n/2 -1], 3*a[(n-1)/2]]]; Table[a[n], {n, 0, 60}] (* G. C. Greubel, Mar 13 2020 *)
PROG
(Sage)
@CachedFunction
def a(n):
if (n==0): return 1
elif (n%2==0): return a(n/2) + 5*a(n/2 -1)
else: return 3*a((n-1)/2)
[a(n) for n in (0..60)] # G. C. Greubel, Mar 13 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Apr 11 2010
EXTENSIONS
Terms a(25) onward added by G. C. Greubel, Mar 13 2020
STATUS
approved