Search: a026596 -id:a026596
|
|
A026584
|
|
Irregular triangular array T read by rows: T(i,0) = T(i,2i) = 1 for i >= 0; T(i,1) = T(i,2i-1) = floor(i/2) for i >= 1; and for i >= 2 and j = 2..2i-2, T(i,j) = T(i-1,j-2) + T(i-1,j-1) + T(i-1,j) if i+j is odd, and T(i,j) = T(i-1,j-2) + T(i-1,j) if i+j is even.
|
|
+10
26
|
|
|
1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 1, 4, 2, 4, 1, 1, 1, 2, 5, 7, 8, 7, 5, 2, 1, 1, 2, 8, 9, 20, 14, 20, 9, 8, 2, 1, 1, 3, 9, 19, 28, 43, 40, 43, 28, 19, 9, 3, 1, 1, 3, 13, 22, 56, 62, 111, 86, 111, 62, 56, 22, 13, 3, 1, 1, 4, 14, 38, 69, 140, 167, 259, 222, 259, 167, 140, 69, 38, 14, 4, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,7
|
|
COMMENTS
|
T(n, k) = number of integer strings s(0)..s(n) such that s(0) = 0, s(n) = n-k, |s(i)-s(i-1)| <= 1 if s(i-1) odd, |s(i)-s(i-1)| = 1 if s(i-1) is even, for i = 1..n.
|
|
LINKS
|
|
|
FORMULA
|
T(n, k) = T(n-1, k-2) + T(n-1, k) if ( (n+k) mod 2 ) = 0, otherwise T(n-1, k-2) + T(n-1, k-1) + T(n-1, k), where T(n, 0) = T(n, 2*n) = 1, T(n, 1) = T(n, 2*n-1) = floor(n/2).
|
|
EXAMPLE
|
First 5 rows:
1
1 0 1
1 1 2 1 1
1 1 4 2 4 1 1
1 2 5 7 8 7 5 2 1
|
|
MATHEMATICA
|
z = 12; t[n_, 0] := 1; t[n_, k_] := 1 /; k == 2 n; t[n_, 1] := Floor[n/2]; t[n_, k_] := Floor[n/2] /; k == 2 n - 1; t[n_, k_] := t[n, k] = If[EvenQ[n + k], t[n - 1, k - 2] + t[n - 1, k], t[n - 1, k - 2] + t[n - 1, k - 1] + t[n - 1, k]]; u = Table[t[n, k], {n, 0, z}, {k, 0, 2 n}];
v = Flatten[u] (* A026584 sequence *)
|
|
PROG
|
(Sage)
@CachedFunction
def T(n, k):
if (k==0 or k==2*n): return 1
elif (k==1 or k==2*n-1): return (n//2)
else: return T(n-1, k-2) + T(n-1, k) if ((n+k)%2==0) else T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)
flatten([[T(n, k) for k in (0..2*n)] for n in (0..12)]) # G. C. Greubel, Dec 11 2021
|
|
CROSSREFS
|
Cf. A026585, A026587, A026589, A026590, A026591, A026592, A026593, A026594, A026595, A026596, A026597, A026598, A026599.
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A026585
|
|
a(n) = T(n,n), T given by A026584. Also a(n) is the number of integer strings s(0), ..., s(n) counted by T, such that s(n)=0.
|
|
+10
21
|
|
|
1, 0, 2, 2, 8, 14, 40, 86, 222, 518, 1296, 3130, 7770, 19066, 47324, 117094, 291260, 724302, 1806220, 4507230, 11266718, 28188070, 70609316, 177023466, 444231564, 1115639586, 2803975860, 7052132546, 17748069294, 44693162266
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
The signed sequence 1,0,2,-2,8,-14,... is the inverse binomial transform of A026569. - Paul Barry, Sep 09 2004
Hankel transform of a(n) is 2^n. Hankel transform of a(n+1) is {0, -4, 0, 16, 0, -64, 0, 256, 0, ...} or -2^(n+1)*[x^n](x/(1+x^2)). Hankel transform of a(n+2) is 2^(n+1)*A109613(n+1). - Paul Barry, Mar 23 2011
|
|
LINKS
|
|
|
FORMULA
|
G.f.: 1/(1 -2*x^2/(1 -x -x^2/(1 -x^2/(1 -x -x^2/(1 -x^2/(1 -x -x^2/(1 - ... (continued fraction).
a(0) = 1, a(n) = Sum_{k=0..floor(n/2)} (k/(n-k))*C(n-k,k)*A000984(k). (End)
a(n) = Sum_{k=0..floor(n/2)} C(n-k-1,n-2*k)*A000984(k).
a(n) = Sum_{k=0..floor(n/2)} C(n-k-1,n-2*k)*C(2*k,k). (End)
D-finite with recurrence n*a(n) +2*(-n+1)*a(n-1) +(-3*n+2)*a(n-2) +2*(2*n-5)*a(n-3) = 0. - R. J. Mathar, Nov 24 2012
a(n) ~ (sqrt(17)+1)^(n-1/2) / (17^(1/4) * sqrt(Pi*n) * 2^(n-3/2)). - Vaclav Kotesovec, Feb 12 2014
|
|
MATHEMATICA
|
CoefficientList[Series[Sqrt[(1-x)/(1-x-4*x^2)], {x, 0, 40}], x] (* Vaclav Kotesovec, Feb 12 2014 *)
|
|
PROG
|
(Magma) [(&+[Binomial(n-j-1, n-2*j)*Binomial(2*j, j): j in [0..Floor(n/2)]]): n in [0..40]]; // G. C. Greubel, Dec 12 2021
(Sage) [sum(binomial(n-j-1, n-2*j)*binomial(2*j, j) for j in (0..(n//2))) for n in [0..40]] # G. C. Greubel, Dec 12 2021
|
|
CROSSREFS
|
Cf. A026584, A026587, A026589, A026590, A026591, A026592, A026593, A026594, A026595, A026596, A026597, A026598, A026599, A027282, A027283, A027284, A027285, A027286.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
|
|
1, 3, 9, 23, 61, 155, 401, 1023, 2629, 6723, 17241, 44135, 113101, 289643, 742049, 1900623, 4868821, 12471315, 31946601, 81831863, 209618269, 536945723, 1375418801, 3523201695, 9024876901, 23117683683, 59217191289, 151687926023
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (1+x)/((1-x)*(1-x-4*x^2)). - Ralf Stephan, Feb 04 2004
a(n) = 2*a(n-1) + 3*a(n-2) - 4*a(n-3).
a(n) = Sum_{j=0..n} A026597(j). (End)
a(n) = 2^n*(Fibonacci(n+2, 1/2) + Fibonacci(n+1, 1/2)) - 1/2. - G. C. Greubel, Dec 15 2021
|
|
MATHEMATICA
|
LinearRecurrence[{2, 3, -4}, {1, 3, 9}, 40] (* G. C. Greubel, Dec 15 2021 *)
|
|
PROG
|
(Magma) [n le 3 select 3^(n-1) else 2*Self(n-1) +3*Self(n-2) -4*Self(n-3): n in [1..41]]; // G. C. Greubel, Dec 15 2021
(Sage) [( (1+x)/((1-x)*(1-x-4*x^2)) ).series(x, n+1).list()[n] for n in (0..40)] # G. C. Greubel, Dec 15 2021
|
|
CROSSREFS
|
Cf. A026584, A026585, A026587, A026589, A026590, A026591, A026592, A026593, A026594, A026595, A026596, A026597 (first differences), A026598, A027282, A027283, A027284, A027285, A027286.
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
|
|
1, 1, 1, 1, 5, 8, 19, 22, 69, 121, 341, 406, 1203, 2155, 6336, 7624, 22593, 40717, 121483, 147001, 438533, 792351, 2381512, 2892044, 8677763, 15703156, 47419503, 57728737, 173984792, 315180458, 954961034, 1164727748, 3522101709
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
T[n_, k_]:= T[n, k]= If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[n/2], If[EvenQ[n+k], T[n-1, k-2] + T[n-1, k], T[n-1, k-2] + T[n-1, k-1] + T[n-1, k] ]]]; (* T = A026584 *)
Table[T[n, Floor[n/2]], {n, 0, 40}] (* G. C. Greubel, Dec 13 2021 *)
|
|
PROG
|
(Sage)
@CachedFunction
if (k==0 or k==2*n): return 1
elif (k==1 or k==2*n-1): return (n//2)
else: return T(n-1, k-2) + T(n-1, k) if ((n+k)%2==0) else T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)
|
|
CROSSREFS
|
Cf. A026584, A026585, A026587, A026589, A026590, A026591, A026592, A026593, A026594, A026596, A026597, A026598, A026599, A027282, A027283, A027284, A027285, A027286.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A026587
|
|
a(n) = T(n, n-2), T given by A026584. Also a(n) = number of integer strings s(0),...,s(n) counted by T, such that s(n)=2.
|
|
+10
17
|
|
|
1, 1, 5, 9, 28, 62, 167, 399, 1024, 2518, 6359, 15819, 39759, 99427, 249699, 626203, 1573524, 3953446, 9943905, 25019005, 62994733, 158680545, 399936573, 1008438757, 2543992514, 6420413940, 16210331727, 40943722115, 103453402718
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,3
|
|
LINKS
|
|
|
FORMULA
|
Conjecture: (n+2)*a(n) = (3*n+2)*a(n-1) +(3*n+2)*a(n-2) -(11*n-16)*a(n-3) -2*(n-3)*a(n-4) +4*(2*n-9)*a(n-5). - R. J. Mathar, Jun 23 2013
|
|
MATHEMATICA
|
T[n_, k_]:= T[n, k]= If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[n/2], If[EvenQ[n+k], T[n-1, k-2] + T[n-1, k], T[n-1, k-2] + T[n-1, k-1] + T[n-1, k] ]]]; (* T = A026584 *)
|
|
PROG
|
(Sage)
@CachedFunction
if (k==0 or k==2*n): return 1
elif (k==1 or k==2*n-1): return (n//2)
else: return T(n-1, k-2) + T(n-1, k) if ((n+k)%2==0) else T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)
|
|
CROSSREFS
|
Cf. A026584, A026585, A026589, A026590, A026591, A026592, A026593, A026594, A026595, A026596, A026597, A026598, A026599, A027282, A027283, A027284, A027285, A027286.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A026589
|
|
a(n) = T(n,n-4), T given by A026584. Also a(n) = number of integer strings s(0),...,s(n) counted by T, such that s(n)=4.
|
|
+10
17
|
|
|
1, 2, 9, 22, 69, 178, 497, 1294, 3452, 8964, 23430, 60556, 156663, 403214, 1037191, 2660978, 6821200, 17459732, 44657246, 114117628, 291449047, 743904326, 1897956899, 4840429962, 12340947855, 31455453822, 80158533099
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
4,2
|
|
LINKS
|
|
|
FORMULA
|
Conjecture: -(n+4)*(65*n-269)*a(n) +(-65*n^2+140*n+1933)*a(n-1) +(809*n^2-2431*n-4514)*a(n-2) +(-123*n^2+2496*n-205)*a(n-3) +2*(-726*n^2+3737*n-4395)*a(n-4) +8*(56*n-215)*(2*n-9)*a(n-5) = 0. - R. J. Mathar, Jun 23 2013
|
|
MATHEMATICA
|
T[n_, k_]:= T[n, k]= If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[n/2], If[EvenQ[n+k], T[n-1, k-2] + T[n-1, k], T[n-1, k-2] + T[n-1, k-1] + T[n-1, k] ]]]; (* T = A026584 *)
|
|
PROG
|
(Sage)
@CachedFunction
if (k==0 or k==2*n): return 1
elif (k==1 or k==2*n-1): return (n//2)
else: return T(n-1, k-2) + T(n-1, k) if ((n+k)%2==0) else T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)
|
|
CROSSREFS
|
Cf. A026584, A026585, A026587, A026590, A026591, A026592, A026593, A026594, A026595, A026596, A026597, A026598, A026599, A027282, A027283, A027284, A027285, A027286.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
|
|
1, 1, 5, 19, 69, 341, 1203, 6336, 22593, 121483, 438533, 2381512, 8677763, 47419503, 173984792, 954961034, 3522101709, 19397198595, 71831252031, 396646918211, 1473610012405, 8154682794333, 30376120747792, 168394714422722, 628648474795879, 3490216221862041, 13053833414221023, 72566287730964469
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
T[n_, k_]:= T[n, k]= If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[n/2], If[EvenQ[n+k], T[n-1, k-2] + T[n-1, k], T[n-1, k-2] + T[n-1, k-1] + T[n-1, k] ]]]; (* T = A026584 *)
a[n_]:= a[n]= Block[{$RecursionLimit= Infinity}, T[2*n, n]];
|
|
PROG
|
(Sage)
@CachedFunction
if (k==0 or k==2*n): return 1
elif (k==1 or k==2*n-1): return (n//2)
else: return T(n-1, k-2) + T(n-1, k) if ((n+k)%2==0) else T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)
|
|
CROSSREFS
|
Cf. A026584, A026585, A026587, A026589, A026591, A026592, A026593, A026594, A026595, A026596, A026597, A026598, A026599, A027282, A027283, A027284, A027285, A027286.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
|
|
1, 2, 9, 38, 140, 701, 2534, 13294, 48369, 258430, 947694, 5114572, 18872399, 102539204, 380143356, 2075658454, 7723000261, 42330184638, 157951859953, 868376395790, 3247811317907, 17899895038348, 67075896452000, 370442993383238, 1390392820937920, 7692166179956366, 28910883325637649, 160184255555687056
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
T[n_, k_]:= T[n, k]= If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[n/2], If[EvenQ[n+k], T[n-1, k-2] + T[n-1, k], T[n-1, k-2] + T[n-1, k-1] + T[n-1, k] ]]]; (* T = A026584 *)
a[n_]:= a[n]= Block[{$RecursionLimit= Infinity}, T[2*n, n-1]];
|
|
PROG
|
(Sage)
@CachedFunction
if (k==0 or k==2*n): return 1
elif (k==1 or k==2*n-1): return (n//2)
else: return T(n-1, k-2) + T(n-1, k) if ((n+k)%2==0) else T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)
|
|
CROSSREFS
|
Cf. A026584, A026585, A026587, A026589, A026590, A026592, A026593, A026594, A026595, A026596, A026597, A026598, A026599, A027282, A027283, A027284, A027285, A027286.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
|
|
1, 3, 14, 65, 251, 1288, 4830, 25518, 95388, 510532, 1910821, 10309234, 38656462, 209766714, 787912030, 4294635438, 16155375825, 88371236851, 332859949946, 1826080683788, 6885797551334, 37867515477338, 142929375411104, 787637258527505, 2975423924172735, 16425495119248041, 62096233990615140, 343318987947145114
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
T[n_, k_]:= T[n, k]= If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[n/2], If[EvenQ[n+k], T[n-1, k-2] + T[n-1, k], T[n-1, k-2] + T[n-1, k-1] + T[n-1, k] ]]]; (* T = A026584 *)
a[n_]:= a[n]= Block[{$RecursionLimit= Infinity}, T[2*n, n-2]];
|
|
PROG
|
(Sage)
@CachedFunction
if (k==0 or k==2*n): return 1
elif (k==1 or k==2*n-1): return (n//2)
else: return T(n-1, k-2) + T(n-1, k) if ((n+k)%2==0) else T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)
|
|
CROSSREFS
|
Cf. A026584, A026585, A026587, A026589, A026590, A026591, A026593, A026594, A026595, A026596, A026597, A026598, A026599, A027282, A027283, A027284, A027285, A027286.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
|
|
1, 1, 8, 22, 121, 406, 2155, 7624, 40717, 147001, 792351, 2892044, 15703156, 57728737, 315180458, 1164727748, 6385672193, 23691834033, 130316812494, 485018155062, 2674846358141, 9980763478121, 55161813337474, 206262229900060, 1142020843590221, 4277853480389546, 23721423518350124, 88991782850212510
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
T[n_, k_]:= T[n, k]= If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[n/2], If[EvenQ[n+k], T[n-1, k-2] + T[n-1, k], T[n-1, k-2] + T[n-1, k-1] + T[n-1, k] ]]]; (* T = A026584 *)
a[n_]:= a[n]= Block[{$RecursionLimit= Infinity}, T[2*n-1, n-1]];
|
|
PROG
|
(Sage)
@CachedFunction
if (k==0 or k==2*n): return 1
elif (k==1 or k==2*n-1): return (n//2)
else: return T(n-1, k-2) + T(n-1, k) if ((n+k)%2==0) else T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)
|
|
CROSSREFS
|
Cf. A026584, A026585, A026587, A026589, A026590, A026591, A026592, A026594, A026595, A026596, A026597, A026598, A026599, A027282, A027283, A027284, A027285, A027286.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.013 seconds
|