Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Search: a085538 -id:a085538
     Sort: relevance | references | number | modified | created      Format: long | short | data
T(n,k) is the number of s in {1,...,n}^n having longest ending contiguous subsequence with the same value of length k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
+10
7
1, 0, 1, 0, 2, 2, 0, 18, 6, 3, 0, 192, 48, 12, 4, 0, 2500, 500, 100, 20, 5, 0, 38880, 6480, 1080, 180, 30, 6, 0, 705894, 100842, 14406, 2058, 294, 42, 7, 0, 14680064, 1835008, 229376, 28672, 3584, 448, 56, 8, 0, 344373768, 38263752, 4251528, 472392, 52488, 5832, 648, 72, 9
OFFSET
0,5
LINKS
FORMULA
T(0,0) = 1, else T(n,k) = 0 for k<1 or k>n, else T(n,n) = n, else T(n,k) = (n-1)*n^(n-k).
Sum_{k=0..n} T(n,k) = A000312(n).
Sum_{k=0..n} k*T(n,k) = A031972(n).
EXAMPLE
T(0,0) = 1: [].
T(1,1) = 1: [1].
T(2,1) = 2: [1,2], [2,1].
T(2,2) = 2: [1,1], [2,2].
T(3,1) = 18: [1,1,2], [1,1,3], [1,2,1], [1,2,3], [1,3,1], [1,3,2], [2,1,2], [2,1,3], [2,2,1], [2,2,3], [2,3,1], [2,3,2], [3,1,2], [3,1,3], [3,2,1], [3,2,3], [3,3,1], [3,3,2].
T(3,2) = 6: [1,2,2], [1,3,3], [2,1,1], [2,3,3], [3,1,1], [3,2,2].
T(3,3) = 3: [1,1,1], [2,2,2], [3,3,3].
Triangle T(n,k) begins:
1;
0, 1;
0, 2, 2;
0, 18, 6, 3;
0, 192, 48, 12, 4;
0, 2500, 500, 100, 20, 5;
0, 38880, 6480, 1080, 180, 30, 6;
0, 705894, 100842, 14406, 2058, 294, 42, 7;
0, 14680064, 1835008, 229376, 28672, 3584, 448, 56, 8;
MAPLE
T:= (n, k)-> `if`(n=0 and k=0, 1, `if`(k<1 or k>n, 0,
`if`(k=n, n, (n-1)*n^(n-k)))):
seq(seq(T(n, k), k=0..n), n=0..12);
MATHEMATICA
f[0, 0]=1;
f[n_, k_]:=Which[1<=k<=n-1, n^(n-k)*(n-1), k<1, 0, k==n, n, k>n, 0];
Table[Table[f[n, k], {k, 0, n}], {n, 0, 10}]//Grid (* Geoffrey Critzer, May 19 2014 *)
CROSSREFS
Row sums give: A000312.
Columns k=0-4 give: A000007, A066274(n) = 2*A081131(n) for n>1, A053506(n) for n>2, A055865(n-1) = A085389(n-1) for n>3, A085390(n-1) for n>4.
Main diagonal gives: A028310.
Lower diagonals include (offsets may differ): A002378, A045991, A085537, A085538, A085539.
KEYWORD
nonn,tabl,easy
AUTHOR
Alois P. Heinz, Aug 19 2013
STATUS
approved
Triangle read by rows in which row n lists n+1 terms, starting with n^5 and ending with n^6, such that the difference between successive terms is equal to n^5 - n^4.
+10
6
0, 1, 1, 32, 48, 64, 243, 405, 567, 729, 1024, 1792, 2560, 3328, 4096, 3125, 5625, 8125, 10625, 13125, 15625, 7776, 14256, 20736, 27216, 33696, 40176, 46656, 16807, 31213, 45619, 60025, 74431, 88837, 103243, 117649, 32768, 61440, 90112, 118784, 147456
OFFSET
0,4
COMMENTS
The first term of row n is A000584(n) and the last term of row n is A001014(n).
The main entry for this sequence is A159797. See also A163282, A163283 and A163284.
Row sums give A163275. - Omar E. Pol, Mar 18 2012
EXAMPLE
Triangle begins:
0;
1,1;
32,48,64;
243,405,567,729;
1024,1792,2560,3328,4096;
3125,5625,8125,10625,13125,15625;
7776,14256,20736,27216,33696,40176,46656;
16807,31213,45619,60025,74431,88837,103243,117649;
32768,61440,90112,118784,147456,176128,204800,233472,262144;
59049,111537,164025,216513,269001,321489,373977,426465,478953,531441;
100000,190000,280000,370000,460000,550000,640000,730000,820000,910000,1000000;
MATHEMATICA
rw[n_]:=Range[n^5, n^6, n^5-n^4]; Join[{0, 1}, Flatten[Array[rw, 10]]] (* Harvey P. Dale, Mar 18 2012 *)
PROG
(PARI) A163285(n, k)=n^5 +k*(n^5 -n^4) \\ G. C. Greubel, Dec 17 2016
KEYWORD
easy,nonn,tabl
AUTHOR
Omar E. Pol, Jul 24 2009
STATUS
approved
a(n) = n^7 - n^6.
+10
4
0, 0, 64, 1458, 12288, 62500, 233280, 705894, 1835008, 4251528, 9000000, 17715610, 32845824, 57921708, 97883968, 159468750, 251658240, 386201104, 578207808, 846825858, 1216000000, 1715322420, 2380977984, 3256789558, 4395368448, 5859375000, 7722894400, 10072932714
OFFSET
0,3
COMMENTS
For n>1 number of 7-digit positive integers in base n.
LINKS
FORMULA
a(n) = n^6*(n-1) = n^7 - n^6.
a(n) = A001015(n) - A001014(n).
G.f.: 2*(32*x^2 + 473*x^3 + 1208*x^4 + 718*x^5 + 88*x^6 + x^7)/(x - 1)^8. - Wesley Ivan Hurt, Aug 03 2014
Recurrence: a(n) = 8*a(n-1)-28*a(n-2)+56*a(n-3)-70*a(n-4)+56*a(n-5)-28*(n-6)+8*a(n-7)-a(n-8). - Wesley Ivan Hurt, Aug 03 2014
Sum_{n>=2} 1/a(n) = 6 - Sum_{k=2..6} zeta(k). - Amiram Eldar, Jul 05 2020
MAPLE
A240930:=n->n^7-n^6: seq(A240930(n), n=0..30); # Wesley Ivan Hurt, Aug 03 2014
MATHEMATICA
Table[n^7 - n^6, {n, 0, 30}] (* Wesley Ivan Hurt, Aug 03 2014 *)
CoefficientList[Series[2 (32*x^2 + 473*x^3 + 1208*x^4 + 718*x^5 + 88*x^6 + x^7)/(x - 1)^8, {x, 0, 30}], x] (* Wesley Ivan Hurt, Aug 03 2014 *)
PROG
(PARI) vector(100, n, (n-1)^7 - (n-1)^6) \\ Derek Orr, Aug 03 2014
(Magma) [n^7-n^6 : n in [0..30]]; // Wesley Ivan Hurt, Aug 03 2014
KEYWORD
nonn,easy
AUTHOR
Martin Renner, Aug 03 2014
STATUS
approved
a(n) = n^8 - n^7.
+10
4
0, 0, 128, 4374, 49152, 312500, 1399680, 4941258, 14680064, 38263752, 90000000, 194871710, 394149888, 752982204, 1370375552, 2392031250, 4026531840, 6565418768, 10407740544, 16089691302, 24320000000, 36021770820, 52381515648, 74906159834, 105488842752, 146484375000
OFFSET
0,3
COMMENTS
For n>1 number of 8-digit positive integers in base n.
LINKS
Index entries for linear recurrences with constant coefficients, signature (9,-36,84,-126,126,-84,36,-9,1).
FORMULA
a(n) = n^7*(n-1) = n^8 - n^7.
a(n) = A001016(n) - A001015(n).
G.f.: -2*x^2*(x^6+183*x^5+2682*x^4+8422*x^3+7197*x^2+1611*x+64) / (x-1)^9. - Colin Barker, Aug 08 2014
Sum_{n>=2} 1/a(n) = 7 - Sum_{k=2..7} zeta(k). - Amiram Eldar, Jul 05 2020
MAPLE
A240931:=n->n^8-n^7: seq(A240931(n), n=0..30); # Wesley Ivan Hurt, Aug 09 2014
MATHEMATICA
Table[n^8 - n^7, {n, 0, 30}] (* Wesley Ivan Hurt, Aug 09 2014 *)
LinearRecurrence[{9, -36, 84, -126, 126, -84, 36, -9, 1}, {0, 0, 128, 4374, 49152, 312500, 1399680, 4941258, 14680064}, 30] (* Harvey P. Dale, Apr 29 2016 *)
PROG
(PARI) vector(100, n, (n-1)^8 - (n-1)^7) \\ Derek Orr, Aug 03 2014
(PARI) concat([0, 0], Vec(-2*x^2*(x^6+183*x^5+2682*x^4+8422*x^3+7197*x^2+1611*x+64) / (x-1)^9 + O(x^100))) \\ Colin Barker, Aug 08 2014
(Magma) [n^8-n^7 : n in [0..30]]; // Wesley Ivan Hurt, Aug 09 2014
KEYWORD
nonn,easy
AUTHOR
Martin Renner, Aug 03 2014
STATUS
approved
a(n) = n^9 - n^8.
+10
4
0, 0, 256, 13122, 196608, 1562500, 8398080, 34588806, 117440512, 344373768, 900000000, 2143588810, 4729798656, 9788768652, 19185257728, 35880468750, 64424509440, 111612119056, 187339329792, 305704134738, 486400000000, 756457187220, 1152393344256, 1722841676182
OFFSET
0,3
COMMENTS
For n>1 number of 9-digit positive integers in base n.
LINKS
Index entries for linear recurrences with constant coefficients, signature (10,-45,120,-210,252,-210,120,-45,10,-1).
FORMULA
a(n) = n^8*(n-1) = n^9 - n^8.
a(n) = A001017(n) - A001016(n).
G.f.: 2*x^2*(x^7+374*x^6+9327*x^5+49780*x^4+78095*x^3+38454*x^2+5281*x+128) / (x-1)^10. - Colin Barker, Aug 08 2014
Sum_{n>=2} 1/a(n) = 8 - Sum_{k=2..8} zeta(k). - Amiram Eldar, Jul 05 2020
MATHEMATICA
Table[n^9 - n^8, {n, 0, 40}] (* Vincenzo Librandi, Aug 15 2016 *)
PROG
(PARI) vector(100, n, (n-1)^9 - (n-1)^8) \\ Derek Orr, Aug 03 2014
(Magma) [n^9-n^8: n in [0..40]]; // Vincenzo Librandi, Aug 15 2016
KEYWORD
nonn,easy
AUTHOR
Martin Renner, Aug 03 2014
STATUS
approved
a(n) = n^10 - n^9.
+10
4
0, 0, 512, 39366, 786432, 7812500, 50388480, 242121642, 939524096, 3099363912, 9000000000, 23579476910, 56757583872, 127253992476, 268593608192, 538207031250, 1030792151040, 1897406023952, 3372107936256, 5808378560022, 9728000000000, 15885600931620, 25352653573632
OFFSET
0,3
COMMENTS
For n>1 number of 10-digit positive integers in base n.
LINKS
FORMULA
a(n) = n^9*(n-1) = n^10 - n^9.
a(n) = A008454(n) - A001017(n). - Michel Marcus, Aug 03 2014
G.f.: 2*(256*x^2 + 16867*x^3 + 190783*x^4 + 621199*x^5 + 689155*x^6 + 264409*x^7 + 30973*x^8 + 757*x^9 + x^10)/(1 - x)^11. - Wesley Ivan Hurt, Aug 03 2014
Recurrence: a(n) = 11*a(n-1)-55*a(n-2)+165*a(n-3)-330*a(n-4)+462*a(n-5)-462*a(n-6)+330*a(n-7)-165*a(n-8)+55*a(n-9)-11*a(n-10)+a(n-11). - Wesley Ivan Hurt, Aug 03 2014
Sum_{n>=2} 1/a(n) = 9 - Sum_{k=2..9} zeta(k). - Amiram Eldar, Jul 05 2020
MAPLE
A240933:=n->n^10-n^9: seq(A240933(n), n=0..30); # Wesley Ivan Hurt, Aug 03 2014
MATHEMATICA
Table[n^10 - n^9, {n, 0, 30}] (* Wesley Ivan Hurt, Aug 03 2014 *)
CoefficientList[Series[2 (256*x^2 + 16867*x^3 + 190783*x^4 + 621199*x^5 + 689155*x^6 + 264409*x^7 + 30973*x^8 + 757*x^9 + x^10)/(1 - x)^11, {x, 0, 30}], x] (* Wesley Ivan Hurt, Aug 03 2014 *)
LinearRecurrence[{11, -55, 165, -330, 462, -462, 330, -165, 55, -11, 1}, {0, 0, 512, 39366, 786432, 7812500, 50388480, 242121642, 939524096, 3099363912, 9000000000}, 40] (* Harvey P. Dale, Oct 19 2022 *)
PROG
(PARI) vector(100, n, (n-1)^10 - (n-1)^9) \\ Derek Orr, Aug 03 2014
(Magma) [n^10-n^9 : n in [0..30]]; // Wesley Ivan Hurt, Aug 03 2014
KEYWORD
nonn,easy
AUTHOR
Martin Renner, Aug 03 2014
STATUS
approved

Search completed in 0.014 seconds