[go: up one dir, main page]

login
Search: a137688 -id:a137688
     Sort: relevance | references | number | modified | created      Format: long | short | data
A triangle formed like Pascal's triangle, but with n^2 on the left border and 2^n on the right border instead of 1.
+10
32
0, 1, 2, 4, 3, 4, 9, 7, 7, 8, 16, 16, 14, 15, 16, 25, 32, 30, 29, 31, 32, 36, 57, 62, 59, 60, 63, 64, 49, 93, 119, 121, 119, 123, 127, 128, 64, 142, 212, 240, 240, 242, 250, 255, 256, 81, 206, 354, 452, 480, 482, 492, 505, 511, 512, 100, 287, 560, 806, 932, 962, 974, 997, 1016, 1023, 1024
OFFSET
1,3
COMMENTS
The third row is (n^4 - n^2 + 24*n + 24)/12.
For a closed-form formula for generalized Pascal's triangle see A228576. - Boris Putievskiy, Sep 04 2013
FORMULA
T(n,0) = n^2, n>0; T(0,k) = 2^k; T(n, k) = T(n-1, k-1) + T(n-1, k) for n,k >0. [corrected by G. C. Greubel, Nov 12 2019]
Closed-form formula for general case. Let L(m) and R(m) be the left border and the right border of Pascal like triangle, respectively. We denote binomial(n,k) by C(n,k).
As table read by antidiagonals T(n,k) = Sum_{m1=1..n} R(m1)*C(n+k-m1-1, n-m1) + Sum_{m2=1..k} L(m2)*C(n+k-m2-1, k-m2); n,k >=0.
As linear sequence a(n) = Sum_{m1=1..i} R(m1)*C(i+j-m1-1, i-m1) + Sum_{m2=1..j} L(m2)*C(i+j-m2-1, j-m2), where i=n-t*(t+1)/2-1, j=(t*t+3*t+4)/2-n-1, t=floor((-1+sqrt(8*n-7))/2); n>0.
Some special cases. If L(m)={b,b,b...} b*A000012, then the second sum takes form b*C(n+k-1,j). If L(m) is {0,b,2b,...} b*A001477, then the second sum takes form b*C(n+k,n-1). Similarly for R(m) and the first sum.
For this sequence L(m)=m^2 and R(m)=2^m.
As table read by antidiagonals T(n,k) = Sum_{m1=1..n} (2^m1)*C(n+k-m1-1, n-m1) + Sum_{m2=1..k} (m2^2)*C(n+k-m2-1, k-m2); n,k >=0.
As linear sequence a(n) = Sum_{m1=1..i} (2^m1)*C(i+j-m1-1, i-m1) + Sum_{m2=1..j} (m2^2)*C(i+j-m2-1, j-m2), where i=n-t*(t+1)/2-1, j=(t*t+3*t+4)/2-n-1, t=floor((-1+sqrt(8*n-7))/2).
As a triangular array read by rows, T(n,k) = Sum_{i=1..n-k} i^2*C(n-1-i, n-k-i) + Sum_{i=1..k} 2^i*C(n-1-i, k-i); n,k >=0. - Greg Dresden, Aug 06 2022
EXAMPLE
The start of the sequence as a triangular array read by rows:
0;
1, 2;
4, 3, 4;
9, 7, 7, 8;
16, 16, 14, 15, 16;
25, 32, 30, 29, 31, 32;
36, 57, 62, 59, 60, 63, 64;
MAPLE
T:= proc(n, k) option remember;
if k=0 then n^2
elif k=n then 2^k
else T(n-1, k-1) + T(n-1, k)
fi
end:
seq(seq(T(n, k), k=0..n), n=0..10); # G. C. Greubel, Nov 12 2019
MATHEMATICA
T[n_, k_]:= T[n, k] = If[k==0, n^2, If[k==n, 2^k, T[n-1, k-1] + T[n-1, k]]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 12 2019 *)
Flatten[Table[Sum[i^2 Binomial[n-1-i, n-k-i], {i, 1, n-k}] + Sum[2^i Binomial[n-1-i, k-i], {i, 1, k}], {n, 0, 10}, {k, 0, n}]] (* Greg Dresden, Aug 06 2022 *)
PROG
(Python)
def funcL(n):
q = n**2
return q
def funcR(n):
q = 2**n
return q
for n in range (1, 9871):
t=int((math.sqrt(8*n-7) - 1)/ 2)
i=n-t*(t+1)/2-1
j=(t*t+3*t+4)/2-n-1
sum1=0
sum2=0
for m1 in range (1, i+1):
sum1=sum1+funcR(m1)*binomial(i+j-m1-1, i-m1)
for m2 in range (1, j+1):
sum2=sum2+funcL(m2)*binomial(i+j-m2-1, j-m2)
sum=sum1+sum2
(PARI) T(n, k) = if(k==0, n^2, if(k==n, 2^k, T(n-1, k-1) + T(n-1, k) )); \\ G. C. Greubel, Nov 12 2019
(Sage)
@CachedFunction
def T(n, k):
if (k==0): return n^2
elif (k==n): return 2^n
else: return T(n-1, k-1) + T(n-1, k)
[[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 12 2019
(GAP)
T:= function(n, k)
if k=0 then return n^2;
elif k=n then return 2^n;
else return T(n-1, k-1) + T(n-1, k);
fi;
end;
Flat(List([0..12], n-> List([0..n], k-> T(n, k) ))); # G. C. Greubel, Nov 12 2019
CROSSREFS
Cf. We denote Pascal-like triangle with L(n) on the left border and R(n) on the right border by (L(n),R(n)). A007318 (1,1), A008949 (1,2^n), A029600 (2,3), A029618 (3,2), A029635 (1,2), A029653 (2,1), A037027 (Fibonacci(n),1), A051601 (n,n) n>=0, A051597 (n,n) n>0, A051666 (n^2,n^2), A071919 (1,0), A074829 (Fibonacci(n), Fibonacci(n)), A074909 (1,n), A093560 (3,1), A093561 (4,1), A093562 (5,1), A093563 (6,1), A093564 (7,1), A093565 (8,1), A093644 (9,1), A093645 (10,1), A095660 (1,3), A095666 (1,4), A096940 (1,5), A096956 (1,6), A106516 (3^n,1), A108561(1,(-1)^n), A132200 (4,4), A134636 (2n+1,2n+1), A137688 (2^n,2^n), A160760 (3^(n-1),1), A164844(1,10^n), A164847 (100^n,1), A164855 (101*100^n,1), A164866 (101^n,1), A172171 (1,9), A172185 (9,11), A172283 (-9,11), A177954 (int(n/2),1), A193820 (1,2^n), A214292 (n,-n), A227074 (4^n,4^n), A227075 (3^n,3^n), A227076 (5^n,5^n), A227550 (n!,n!), A228053 ((-1)^n,(-1)^n), A228074 (Fibonacci(n), n).
Cf. A000290 (row 1), A153056 (row 2), A000079 (column 1), A000225 (column 2), A132753 (column 3), A118885 (row sums of triangle array + 1), A228576 (generalized Pascal's triangle).
KEYWORD
nonn,tabl
AUTHOR
Boris Putievskiy, Aug 15 2013
EXTENSIONS
Cross-references corrected and extended by Philippe Deléham, Dec 27 2013
STATUS
approved
Reve's puzzle: number of moves needed to solve the Towers of Hanoi puzzle with 4 pegs and n disks, according to the Frame-Stewart algorithm.
(Formerly M2449)
+10
13
0, 1, 3, 5, 9, 13, 17, 25, 33, 41, 49, 65, 81, 97, 113, 129, 161, 193, 225, 257, 289, 321, 385, 449, 513, 577, 641, 705, 769, 897, 1025, 1153, 1281, 1409, 1537, 1665, 1793, 2049, 2305, 2561, 2817, 3073, 3329, 3585, 3841, 4097, 4609, 5121, 5633
OFFSET
0,3
COMMENTS
The Frame-Stewart algorithm minimizes the number of moves a(n) needed to first move k disks to an intermediate peg (requiring a(k) moves), then moving the remaining n-k disks to the destination peg without touching the k smallest disks (requiring 2^(n-k)-1 moves) and finally moving the k smaller disks to the destination.
This leads to the given recursive formula a(n) = min{...}. It follows that the sequence of first differences is A137688 = (1,2,2,4,4,4,...) = 2^A003056(n), which in turn gives the explicit formulas for a(n) as partial sums of A137688.
"Numerous others have rediscovered this algorithm over the years [several references omitted]; many of these failed to derive the correct value for the parameter i, most mistakenly thought that they had actually proved optimality and almost none contributed anything new to what was done by Frame and Stewart". [Stockmeyer]
Numbers of the form 2^k+1 appear for n = 2, 3, 4, 6, 8, 11, 15, 15+4 = 19, 19+5 = 24, 24+6 = 30, 30+7 = 37, 37+8 = 45, ... - Max Alekseyev, Feb 06 2008
The Frame-Stewart algorithm indeed gives the optimal solution, i.e., the minimal possible number of moves for the case of four pegs [Bousch, 2014]. - Andrey Zabolotskiy, Sep 18 2017
REFERENCES
A. Brousseau, Tower of Hanoi with more pegs, J. Recreational Math., 8 (1975-1976), 169-176.
Paul Cull and E. F. Ecklund, On the Towers of Hanoi and generalized Towers of Hanoi problems. Proceedings of the thirteenth Southeastern conference on combinatorics, graph theory and computing (Boca Raton, Fla., 1982). Congr. Numer. 35 (1982), 229-238. MR0725883(85a:68059).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
D. Wood, Towers of Brahma and Hanoi revisited, J. Recreational Math., 14 (1981), 17-24.
LINKS
Gheorghe Coserea, Table of n, a(n) for n = 0..10012 (first 1001 terms from M. F. Hasler)
J.-P. Allouche, Note on the cyclic towers of Hanoi, Theoret. Comput. Sci., 123 (1994), 3-7.
T. Bousch, La quatrième tour de Hanoi, Bull. Belg. Math. Soc. Simon Stevin 21 (2014) 895-912.
A. Brousseau, Tower of Hanoi with more pegs, J. Recreational Math 8.3 (1975-6), 169-176. (Annotated scanned copy)
A. M. Hinz, An iterative algorithm for the Tower of Hanoi with four pegs, Computing, June 1989, Volume 42, Issue 2-3, pp. 133-140.
A. M. Hinz, S. Klavžar, U. Milutinović, and C. Petr, The Tower of Hanoi - Myths and Maths, Birkhäuser 2013.
B. Houston and H. Masum, Explorations in 4-peg Tower of Hanoi. [Paper]
B. Houston and H. Masum, Explorations in 4-peg Tower of Hanoi. [Web site]
S. Klavzar, U. Milutinovic and C. Petr, On the Frame-Stewart algorithm for the multi-peg Tower of Hanoi problem, Discrete Appl. Math. 120, 1-3 (2002), 141 - 157.
B. M. Stewart, Advanced Problem 3918, Amer. Math. Monthly, 46 (1939), 363.
B. M. Stewart & J. S. Frame, Solution to Problem 3918, Amer. Math. Monthly, 48 (1941), 217-219.
P. Stockmeyer, Variations on the Four-Post Tower of Hanoi Puzzle, Congressus Numerantium 102 (1994), pp. 3-12. [Has extensive bibliography]
Eric Weisstein's World of Mathematics, Towers of Hanoi.
FORMULA
a(n) = min{ 2 a(k) + 2^(n-k) - 1; k < n}, which is always odd. - M. F. Hasler, Feb 06 2008
a(n) = Sum_{i=0..n-1} 2^A003056(i). - Daniele Parisse, May 09 2003
a(n) = 1 + (n + A003056(n) - 1 - A003056(n)*(A003056(n) + 1)/2)*2^A003056(n). - Daniele Parisse, Feb 06 2001
a(n) = 1 + (n - 1 - A003056(n)*(A003056(n) - 1)/2)*2^A003056(n). - Daniele Parisse, Jul 07 2007
MAPLE
A007664:=proc(n) option remember; min(seq(2*A007664(k)+2^(n-k)-1, k=0..n-1)) end; A007664(0):=0; # M. F. Hasler, Feb 06 2008
A007664 := n -> 1 + (n - 1 - A003056(n)*(A003056(n) - 1)/2)*2^A003056(n); A003056 := n -> round(sqrt(2*n+2))-1; # M. F. Hasler, Feb 06 2008
MATHEMATICA
a[n_] := a[n] = Min[ Table[ 2*a[k] + 2^(n-k) - 1, {k, 0, n-1}]]; a[0] = 0; Table[a[n], {n, 0, 48}] (* Jean-François Alcover, Dec 06 2011, after M. F. Hasler *)
Join[{0}, Accumulate[2^Flatten[Table[PadRight[{}, n+1, n], {n, 0, 12}]]]] (* Harvey P. Dale, Jul 03 2021 *)
PROG
(PARI) A007664(n) = (n - 1 - (n=A003056(n))*(n-1)/2)*2^n +1
A003056(n) = (sqrt(2*n+2)-.5)\1 \\ M. F. Hasler, Feb 06 2008
(PARI) print_7664(n, s=0, t=1, c=1, d=1)=while(n-->=0, print1(s+=t, ", "); c--&next; c=d++; t<<=1)
(PARI) A007664(n, c=1, d=1, t=1)=sum(i=c, n, i>c&(t<<=1)&c+=d++; t) \\ M. F. Hasler, Feb 06 2008
(Haskell)
a007664 = sum . map (a000079 . a003056) . enumFromTo 0 . subtract 1
-- Reinhard Zumkeller, Feb 17 2013
(Python)
from math import isqrt
def A007664(n): return (1<<(r:=(k:=isqrt(m:=n+1<<1))+int(m>=k*(k+1)+1)-1))*(n-1-(r*(r-1)>>1))+1 # Chai Wah Wu, Oct 17 2022
CROSSREFS
Cf. A007665, A182058, A003056, A000225 (analog for 3 pegs), A137688 (first differences).
KEYWORD
nonn,nice
EXTENSIONS
Edited, corrected and extended by M. F. Hasler, Feb 06 2008
Further edits by N. J. A. Sloane, Feb 08 2008
Upper bound updated with a reference by Max Alekseyev, Nov 23 2008
STATUS
approved
Repeat 2^n n times.
+10
8
2, 4, 4, 8, 8, 8, 16, 16, 16, 16, 32, 32, 32, 32, 32, 64, 64, 64, 64, 64, 64, 128, 128, 128, 128, 128, 128, 128, 256, 256, 256, 256, 256, 256, 256, 256, 512, 512, 512, 512, 512, 512, 512, 512, 512, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024
OFFSET
0,1
LINKS
Sajed Haque, Chapter 2.6.2 of Discriminators of Integer Sequences, 2017, See p. 34.
FORMULA
a(n) = 2*A137688(n).
a(n) = A018900(n+1) - A059268(n). - Reinhard Zumkeller, Jun 24 2009
From Reinhard Zumkeller, Feb 28 2010: (Start)
Seen as a triangle read by rows: T(n,k)=2^n, 1 <= k <= n.
T(n,k) = A173786(n-1,k-1) + A173787(n-1,k-1), 1 <= k <= n. (End)
Sum_{n>=0} 1/a(n) = 2. - Amiram Eldar, Aug 16 2022
MATHEMATICA
t={}; Do[r={}; Do[If[k==0||k==n, m=2^n, m=t[[n, k]] + t[[n, k + 1]]]; r=AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 10}]; t=Flatten[2 t] (* Vincenzo Librandi, Feb 17 2018 *)
Table[Table[2^n, n], {n, 10}]//Flatten (* Harvey P. Dale, Dec 04 2018 *)
PROG
(Haskell)
a140513 n k = a140513_tabl !! (n-1) !! (k-1)
a140513_row n = a140513_tabl !! (n-1)
a140513_tabl = iterate (\xs@(x:_) -> map (* 2) (x:xs)) [2]
a140513_list = concat a140513_tabl
-- Reinhard Zumkeller, Nov 14 2015
(Python)
from math import isqrt
def A140513(n): return 1<<(m:=isqrt(k:=n+1<<1))+(k>m*(m+1)) # Chai Wah Wu, Nov 07 2024
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Paul Curtz, Jul 01 2008
STATUS
approved
A triangle formed like Pascal's triangle, but with 3^n on the borders instead of 1.
+10
6
1, 3, 3, 9, 6, 9, 27, 15, 15, 27, 81, 42, 30, 42, 81, 243, 123, 72, 72, 123, 243, 729, 366, 195, 144, 195, 366, 729, 2187, 1095, 561, 339, 339, 561, 1095, 2187, 6561, 3282, 1656, 900, 678, 900, 1656, 3282, 6561, 19683, 9843, 4938, 2556, 1578, 1578, 2556, 4938
OFFSET
0,2
COMMENTS
All rows except the zeroth are divisible by 3. Is there a closed-form formula for these numbers, like for binomial coefficients?
Let b=3 and T(n,k) = A(n-k,k) be the associated reading of the symmetric array A by antidiagonals, then A(n,k) = sum_{r=1..n} b^r*A178300(n-r,k) + sum_{c=1..k} b^c*A178300(k-c,n). Similarly with b=4 and b=5 for A227074 and A227076. - R. J. Mathar, Aug 10 2013
EXAMPLE
Triangle:
1,
3, 3,
9, 6, 9,
27, 15, 15, 27,
81, 42, 30, 42, 81,
243, 123, 72, 72, 123, 243,
729, 366, 195, 144, 195, 366, 729,
2187, 1095, 561, 339, 339, 561, 1095, 2187,
6561, 3282, 1656, 900, 678, 900, 1656, 3282, 6561
MATHEMATICA
t = {}; Do[r = {}; Do[If[k == 0 || k == n, m = 3^n, m = t[[n, k]] + t[[n, k + 1]]]; r = AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 10}]; t = Flatten[t]
CROSSREFS
Cf. A007318 (Pascal's triangle), A228053 ((-1)^n on the borders).
Cf. A051601 (n on the borders), A137688 (2^n on borders).
Cf. A166060 (row sums: 4*3^n - 3*2^n), A227074 (4^n edges), A227076 (5^n edges).
KEYWORD
nonn,tabl
AUTHOR
T. D. Noe, Aug 01 2013
STATUS
approved
A triangle formed like Pascal's triangle, but with factorial(n) on the borders instead of 1.
+10
6
1, 1, 1, 2, 2, 2, 6, 4, 4, 6, 24, 10, 8, 10, 24, 120, 34, 18, 18, 34, 120, 720, 154, 52, 36, 52, 154, 720, 5040, 874, 206, 88, 88, 206, 874, 5040, 40320, 5914, 1080, 294, 176, 294, 1080, 5914, 40320, 362880, 46234, 6994, 1374, 470, 470, 1374, 6994, 46234, 362880, 3628800
OFFSET
0,4
COMMENTS
A003422 gives the second column (after 0).
LINKS
Vincenzo Librandi, Rows n = 0..70, flattened
FORMULA
From G. C. Greubel, May 02 2021: (Start)
T(n, k) = T(n-1, k-1) + T(n-1, k) with T(n, 0) = T(n, n) = n!.
Sum_{k=0..n} T(n, k) = 2^n * (1 +Sum_{j=1..n-1} j*j!/2^j) = A140710(n). (End)
EXAMPLE
Triangle begins:
1;
1, 1;
2, 2, 2;
6, 4, 4, 6;
24, 10, 8, 10, 24;
120, 34, 18, 18, 34, 120;
720, 154, 52, 36, 52, 154, 720;
5040, 874, 206, 88, 88, 206, 874, 5040;
40320, 5914, 1080, 294, 176, 294, 1080, 5914, 40320;
362880, 46234, 6994, 1374, 470, 470, 1374, 6994, 46234, 362880;
MATHEMATICA
t = {}; Do[r = {}; Do[If[k == 0||k == n, m = n!, m = t[[n, k]] + t[[n, k + 1]]]; r = AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 10}]; t = Flatten[t]
PROG
(Haskell)
a227550 n k = a227550_tabl !! n !! k
a227550_row n = a227550_tabl !! n
a227550_tabl = map fst $ iterate
(\(vs, w:ws) -> (zipWith (+) ([w] ++ vs) (vs ++ [w]), ws))
([1], a001563_list)
-- Reinhard Zumkeller, Aug 05 2013
(Magma)
function T(n, k)
if k eq 0 or k eq n then return Factorial(n);
else return T(n-1, k-1) + T(n-1, k);
end if; return T;
end function;
[T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, May 02 2021
(Sage)
def T(n, k): return factorial(n) if (k==0 or k==n) else T(n-1, k-1) + T(n-1, k)
flatten([[T(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 02 2021
CROSSREFS
Cf. similar triangles with t on the borders: A007318 (t = 1), A028326 (t = 2), A051599 (t = prime(n)), A051601 (t = n), A051666 (t = n^2), A108617 (t = fibonacci(n)), A134636 (t = 2n+1), A137688 (t = 2^n), A227075 (t = 3^n).
Cf. A003422.
Cf. A227791 (central terms), A001563, A074911.
KEYWORD
nonn,tabl
AUTHOR
Vincenzo Librandi, Aug 04 2013
STATUS
approved
A triangle formed like Pascal's triangle, but with (-1)^(n+1) on the borders instead of 1.
+10
6
-1, 1, 1, -1, 2, -1, 1, 1, 1, 1, -1, 2, 2, 2, -1, 1, 1, 4, 4, 1, 1, -1, 2, 5, 8, 5, 2, -1, 1, 1, 7, 13, 13, 7, 1, 1, -1, 2, 8, 20, 26, 20, 8, 2, -1, 1, 1, 10, 28, 46, 46, 28, 10, 1, 1, -1, 2, 11, 38, 74, 92, 74, 38, 11, 2, -1, 1, 1, 13, 49, 112, 166, 166, 112
OFFSET
0,5
COMMENTS
This sequence is almost the same as A026637.
T(n,k) = A026637(n-2,k-1) for n > 3, 1 < k < n-1. - Reinhard Zumkeller, Aug 08 2013
EXAMPLE
Example:
-1,
1, 1,
-1, 2, -1,
1, 1, 1, 1,
-1, 2, 2, 2, -1,
1, 1, 4, 4, 1, 1,
-1, 2, 5, 8, 5, 2, -1,
1, 1, 7, 13, 13, 7, 1, 1,
-1, 2, 8, 20, 26, 20, 8, 2, -1,
1, 1, 10, 28, 46, 46, 28, 10, 1, 1,
-1, 2, 11, 38, 74, 92, 74, 38, 11, 2, -1
MATHEMATICA
t = {}; Do[r = {}; Do[If[k == 0 || k == n, m = (-1)^(n+1), m = t[[n, k]] + t[[n, k + 1]]]; r = AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 10}]; t = Flatten[t]
PROG
(Haskell)
a228053 n k = a228053_tabl !! n !! k
a228053_row n = a228053_tabl !! n
a228053_tabl = iterate (\row@(i:_) -> zipWith (+)
([- i] ++ tail row ++ [0]) ([0] ++ init row ++ [- i])) [- 1]
-- Reinhard Zumkeller, Aug 08 2013
CROSSREFS
Cf. A007318 (Pascal's triangle), A026637 (many terms in common).
Cf. A051601 (n on the borders), A137688 (2^n on borders).
Cf. A097073 (row sums).
Cf. A227074 (4^n edges), A227075 (3^n edges), A227076 (5^n edges).
KEYWORD
sign,tabl
AUTHOR
T. D. Noe, Aug 07 2013
STATUS
approved
A triangle formed like Pascal's triangle, but with 4^n on the borders instead of 1.
+10
5
1, 4, 4, 16, 8, 16, 64, 24, 24, 64, 256, 88, 48, 88, 256, 1024, 344, 136, 136, 344, 1024, 4096, 1368, 480, 272, 480, 1368, 4096, 16384, 5464, 1848, 752, 752, 1848, 5464, 16384, 65536, 21848, 7312, 2600, 1504, 2600, 7312, 21848, 65536, 262144, 87384, 29160
OFFSET
0,2
COMMENTS
All rows except the zeroth are divisible by 4. Is there a closed-form formula for these numbers, like for binomial coefficients?
EXAMPLE
Example:
1,
4, 4,
16, 8, 16,
64, 24, 24, 64,
256, 88, 48, 88, 256,
1024, 344, 136, 136, 344, 1024,
4096, 1368, 480, 272, 480, 1368, 4096,
16384, 5464, 1848, 752, 752, 1848, 5464, 16384,
65536, 21848, 7312, 2600, 1504, 2600, 7312, 21848, 65536
MATHEMATICA
t = {}; Do[r = {}; Do[If[k == 0 || k == n, m = 4^n, m = t[[n, k]] + t[[n, k + 1]]]; r = AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 10}]; t = Flatten[t]
CROSSREFS
Cf. A007318 (Pascal's triangle), A228053 ((-1)^n on the borders).
Cf. A051601 (n on the borders), A137688 (2^n on borders).
Cf. A165665 (row sums: 3*4^n - 2*2^n), A227075 (3^n edges), A227076 (5^n edges).
KEYWORD
nonn,tabl
AUTHOR
T. D. Noe, Aug 06 2013
STATUS
approved
A triangle formed like Pascal's triangle, but with 5^n on the borders instead of 1.
+10
5
1, 5, 5, 25, 10, 25, 125, 35, 35, 125, 625, 160, 70, 160, 625, 3125, 785, 230, 230, 785, 3125, 15625, 3910, 1015, 460, 1015, 3910, 15625, 78125, 19535, 4925, 1475, 1475, 4925, 19535, 78125, 390625, 97660, 24460, 6400, 2950, 6400, 24460, 97660, 390625
OFFSET
0,2
COMMENTS
All rows except the zeroth are divisible by 5. Is there a closed-form formula for these numbers, like for binomial coefficients?
FORMULA
T(n,0) = 5^n. T(n,1) = 5*A047850(n-1). T(n,2) = 5*(5^n/80 + 3*n/4 + 51/16). T(n,3) = 5*(5^n/320 + 45*n/16 + 3*n^2/8 + 819/64). - R. J. Mathar, Aug 09 2013
EXAMPLE
Example:
1,
5, 5,
25, 10, 25,
125, 35, 35, 125,
625, 160, 70, 160, 625,
3125, 785, 230, 230, 785, 3125,
15625, 3910, 1015, 460, 1015, 3910, 15625,
78125, 19535, 4925, 1475, 1475, 4925, 19535, 78125,
390625, 97660, 24460, 6400, 2950, 6400, 24460, 97660, 390625
MAPLE
A227076 := proc(n, k)
if k = 0 or k = n then
5^n ;
elif k < 0 or k > n then
0;
else
procname(n-1, k)+procname(n-1, k-1) ;
end if;
end proc: # R. J. Mathar, Aug 09 2013
MATHEMATICA
t = {}; Do[r = {}; Do[If[k == 0 || k == n, m = 5^n, m = t[[n, k]] + t[[n, k + 1]]]; r = AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 10}]; t = Flatten[t]
CROSSREFS
Cf. A007318 (Pascal's triangle), A228053 ((-1)^n on the borders).
Cf. A051601 (n on the borders), A137688 (2^n on borders).
Cf. A083585 (row sums: (8*5^n - 5*2^n)/3), A227074 (4^n edges), A227075 (3^n edges).
KEYWORD
nonn,tabl
AUTHOR
T. D. Noe, Aug 06 2013
STATUS
approved
Multiplication table of the powers of three read by antidiagonals.
+10
3
1, 3, 3, 9, 9, 9, 27, 27, 27, 27, 81, 81, 81, 81, 81, 243, 243, 243, 243, 243, 243, 729, 729, 729, 729, 729, 729, 729, 2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187, 6561, 6561, 6561, 6561, 6561, 6561, 6561, 6561, 6561, 19683, 19683, 19683, 19683, 19683, 19683
OFFSET
0,2
COMMENTS
3^A003056: 3^n appears n+1 times.
LINKS
EXAMPLE
1; 3,3; 9,9,9; 27,27,27,27;
MATHEMATICA
Flatten[Table[3^x, {x, 0, 13}, {y, 0, x}]] (* Alonso del Arte, Nov 29 2011 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Douglas Stones (dssto1(AT)student.monash.edu.au), Sep 04 2004
STATUS
approved
a(n) = max_{k <= n} A347696(k).
+10
2
0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11
OFFSET
0,5
COMMENTS
The n-th run of consecutive equal terms appears to have length A137688(n). - Rémy Sigrist, Oct 11 2021
PROG
(C) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 11 2021
EXTENSIONS
More terms from Rémy Sigrist, Oct 11 2021
STATUS
approved

Search completed in 0.017 seconds