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

Length of list created by n substitutions k -> Range[-abs(k+1), abs(k-1), 2] starting with {0}.
5

%I #23 Nov 16 2024 10:20:16

%S 1,2,4,10,24,66,172,498,1360,4066,11444,34970,100520,312066,911068,

%T 2862562,8457504,26824386,80006116,255680170,768464312,2471150402,

%U 7474561164,24161357010,73473471344,238552980386,728745517972

%N Length of list created by n substitutions k -> Range[-abs(k+1), abs(k-1), 2] starting with {0}.

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

%F a(2*n-1) = A027307(n), n >= 1.

%F a(n) = 2*A084075(n-1), n >= 1.

%F a(n) = ( 6*(35*n^2 -55*n -76)*a(n-1) + (275*n^4 -770*n^3 -203*n^2 +1736*n -912)*a(n-2) - 6*(5*n^2 +5*n -28)*a(n-3) + (n-4)*(n-2)*(25*n^2+5*n-48)*a(n-4) )/(n*(n+2)*(25*n^2 -45*n -28)), for n >= 4. - _G. C. Greubel_, Nov 24 2022

%F a(2*n) = A032349(n+1), n >= 0. - _Alexander Burstein_, Nov 19 2023

%e {0}, {-1,1}, {0,2,-2,0}, {-1,1,-3,-1,1,-1,1,3,-1,1}

%t Join[{1}, 2*Rest@CoefficientList[InverseSeries[Series[(-1 -6*n -8*n^2 + (1+ 2*n)^2*Sqrt[1+4*n])/(2*(n +4*n^2 +4*n^3)), {n, 0, 40}]], n]]

%t Length/@ Flatten/@ NestList[# /. k_Integer :> Range[-Abs[k+1], Abs[k-1], 2] &, {0}, 12]

%o (Magma) I:=[1,2,4,10]; [n le 4 select I[n] else (6*(35*n^2-125*n+14)*Self(n-1) + (275*n^4 -1870*n^3 +3757*n^2 -1268*n -1806)*Self(n-2) -6*(5*n^2-5*n-28)*Self(n-3) + (n-5)*(n-3)*(25*n^2-45*n-28)*Self(n-4))/((n-1)*(n+1)*(25*n^2-95*n+42)): n in [1..41]]; // _G. C. Greubel_, Nov 24 2022

%o (SageMath)

%o @CachedFunction

%o def a(n): # a = A084078

%o if (n<4): return (1,2,4,10)[n]

%o else: return (6*(35*n^2 -55*n -76)*a(n-1) +(275*n^4-770*n^3-203*n^2+1736*n-912)*a(n-2) -6*(5*n^2+5*n-28)*a(n-3) +(n-4)*(n-2)*(25*n^2+5*n-48)*a(n-4))/(n*(n+2)*(25*n^2-45*n-28))

%o [a(n) for n in range(41)] # _G. C. Greubel_, Nov 24 2022

%o (Python)

%o def replace(L): return [i for k in L for i in range(-abs(k + 1), 1 + abs(k - 1), 2)]

%o def aList(upto, L=[0]): return [1] + [len((L := replace(L))) for _ in range(upto)]

%o print(aList(12)) # _Peter Luschny_, Nov 16 2024

%Y Cf. A027307, A084075.

%K nonn

%O 0,2

%A _Wouter Meeussen_, May 11 2003