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

A084078
Length of list created by n substitutions k -> Range[-abs(k+1), abs(k-1), 2] starting with {0}.
5
1, 2, 4, 10, 24, 66, 172, 498, 1360, 4066, 11444, 34970, 100520, 312066, 911068, 2862562, 8457504, 26824386, 80006116, 255680170, 768464312, 2471150402, 7474561164, 24161357010, 73473471344, 238552980386, 728745517972
OFFSET
0,2
LINKS
FORMULA
a(2*n-1) = A027307(n), n >= 1.
a(n) = 2*A084075(n-1), n >= 1.
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
a(2*n) = A032349(n+1), n >= 0. - Alexander Burstein, Nov 19 2023
EXAMPLE
{0}, {-1,1}, {0,2,-2,0}, {-1,1,-3,-1,1,-1,1,3,-1,1}
MATHEMATICA
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]]
Length/@ Flatten/@ NestList[# /. k_Integer :> Range[-Abs[k+1], Abs[k-1], 2] &, {0}, 12]
PROG
(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
(SageMath)
@CachedFunction
def a(n): # a = A084078
if (n<4): return (1, 2, 4, 10)[n]
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))
[a(n) for n in range(41)] # G. C. Greubel, Nov 24 2022
(Python)
def replace(L): return [i for k in L for i in range(-abs(k + 1), 1 + abs(k - 1), 2)]
def aList(upto, L=[0]): return [1] + [len((L := replace(L))) for _ in range(upto)]
print(aList(12)) # Peter Luschny, Nov 16 2024
CROSSREFS
Sequence in context: A354733 A336419 A049131 * A137842 A049146 A000682
KEYWORD
nonn
AUTHOR
Wouter Meeussen, May 11 2003
STATUS
approved