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”).

Coefficients of S(x) which satisfies S(x) = (1 + 3*x + 5*x^2)*S(x^2).
1

%I #14 Feb 16 2022 23:22:52

%S 1,3,8,9,23,24,49,27,68,69,139,72,169,147,272,81,203,204,409,207,484,

%T 417,767,216,529,507,992,441,1007,816,1441,243,608,609,1219,612,1429,

%U 1227,2252,621,1519,1452,2837,1251,2852,2301,4051,648,1609,1587,3152,1521,3527,2976,5401,1323,3212,3021,5851,2448

%N Coefficients of S(x) which satisfies S(x) = (1 + 3*x + 5*x^2)*S(x^2).

%C Has an apparent fractal structure with the following properties:

%C a(n) for n = 0, 1, 3, 7, 15, ... are 1, 3, 9, 27, ....

%C Odd n-th terms are divisible by 3 (starting with n=1) creating the same sequence.

%C 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.

%H G. C. Greubel, <a href="/A176205/b176205.txt">Table of n, a(n) for n = 0..1000</a>

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

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

%p a:= proc(n) option remember;

%p if n=0 then 1

%p elif `mod`(n,2)=0 then a(n/2) + 5*a(n/2 -1)

%p else 3*a((n-1)/2)

%p fi; end:

%p seq( a(n), n=0..60); # _G. C. Greubel_, Mar 13 2020

%t 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 *)

%o (Sage)

%o @CachedFunction

%o def a(n):

%o if (n==0): return 1

%o elif (n%2==0): return a(n/2) + 5*a(n/2 -1)

%o else: return 3*a((n-1)/2)

%o [a(n) for n in (0..60)] # _G. C. Greubel_, Mar 13 2020

%K nonn

%O 0,2

%A _Gary W. Adamson_, Apr 11 2010

%E Terms a(25) onward added by _G. C. Greubel_, Mar 13 2020