cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-20 of 98 results. Next

A287839 Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 9.

Original entry on oeis.org

1, 11, 117, 1247, 13289, 141619, 1509213, 16083463, 171399121, 1826575451, 19465548357, 207441511727, 2210673955769, 23558830139779, 251063019088173, 2675542001860183, 28512861152219041, 303857405535211691, 3238164083417650197, 34508642672922983807
Offset: 0

Views

Author

David Nacin, Jun 07 2017

Keywords

Comments

In general, the number of sequences on {0,1,...,10} such that no two consecutive terms have distance 6+k for k in {0,1,2,3,4} has generating function (-1 - x)/(-1 + 10*x + (2*k+1)*x^2).

Crossrefs

Programs

  • Maple
    a:=proc(n) option remember; if n=0 then 1 elif n=1 then 11 elif n=2 then 117 else 10*a(n-1)+7*a(n-2); fi; end: seq(a(n), n=0..30); # Wesley Ivan Hurt, Nov 25 2017
  • Mathematica
    LinearRecurrence[{10, 7}, {1, 11, 117}, 20]
  • PARI
    Vec((1 + x) / (1 - 10*x - 7*x^2) + O(x^30)) \\ Colin Barker, Nov 25 2017
  • Python
    def a(n):
     if n in [0,1,2]:
      return [1, 11, 117][n]
     return 10*a(n-1) + 7*a(n-2)
    

Formula

For n>2, a(n) = 10*a(n-1) + 7*a(n-2), a(0)=1, a(1)=11, a(2)=117.
G.f.: (-1 - x)/(-1 + 10 x + 7 x^2).
a(n) = (((5-4*sqrt(2))^n*(-3+2*sqrt(2)) + (3+2*sqrt(2))*(5+4*sqrt(2))^n)) / (4*sqrt(2)). - Colin Barker, Nov 25 2017

A167896 Number of reduced words of length n in Coxeter group on 5 generators S_i with relations (S_i)^2 = (S_i S_j)^16 = I.

Original entry on oeis.org

1, 5, 20, 80, 320, 1280, 5120, 20480, 81920, 327680, 1310720, 5242880, 20971520, 83886080, 335544320, 1342177280, 5368709110, 21474836400, 85899345450, 343597381200, 1374389522400, 5497558080000, 21990232281600, 87960928972800
Offset: 0

Views

Author

John Cannon and N. J. A. Sloane, Dec 03 2009

Keywords

Comments

The initial terms coincide with those of A003947, although the two sequences are eventually different.
Computed with MAGMA using commands similar to those used to compute A154638.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1+x)*(1-x^16)/(1-4*x+9*x^16-6*x^17) )); // G. C. Greubel, Dec 06 2024
    
  • Mathematica
    CoefficientList[Series[(1+t)*(1-t^16)/(1-4*t+9*t^16-6*t^17), {t,0,50}], t] (* G. C. Greubel, Jul 01 2016; Dec 06 2024 *)
    coxG[{16,6,-3,40}] (* The coxG program is at A169452 *) (* G. C. Greubel, Dec 06 2024 *)
  • SageMath
    def A167896_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1+x)*(1-x^16)/(1-4*x+9*x^16-6*x^17) ).list()
    print(A167896_list(40)) # G. C. Greubel, Dec 06 2024

Formula

G.f.: (t^16 + 2*t^15 + 2*t^14 + 2*t^13 + 2*t^12 + 2*t^11 + 2*t^10 + 2*t^9 + 2*t^8 + 2*t^7 + 2*t^6 + 2*t^5 + 2*t^4 + 2*t^3 + 2*t^2 + 2*t + 1)/ ( 6*t^16 - 3*t^15 - 3*t^14 - 3*t^13 - 3*t^12 - 3*t^11 - 3*t^10 - 3*t^9 - 3*t^8 - 3*t^7 - 3*t^6 - 3*t^5 - 3*t^4 - 3*t^3 - 3*t^2 - 3*t + 1).
From G. C. Greubel, Dec 06 2024: (Start)
a(n) = 3*Sum_{j=1..15} a(n-j) - 6*a(n-16).
G.f.: (1+x)*(1-x^16)/(1 - 4*x + 9*x^16 - 6*x^17). (End)

A223186 T(n,k) = Rolling icosahedron footprints: number of n X k 0..11 arrays starting with 0 where 0..11 label vertices of an icosahedron and every array movement to a horizontal, vertical or antidiagonal neighbor moves along an icosahedral edge.

Original entry on oeis.org

1, 5, 5, 25, 20, 25, 125, 80, 80, 125, 625, 320, 400, 320, 625, 3125, 1280, 2080, 2080, 1280, 3125, 15625, 5120, 10880, 14560, 10880, 5120, 15625, 78125, 20480, 56960, 103520, 103520, 56960, 20480, 78125, 390625, 81920, 298240, 738720, 1018720
Offset: 1

Views

Author

R. H. Hardin Mar 18 2013

Keywords

Comments

Table starts
........1........5.........25.........125...........625.............3125
........5.......20.........80.........320..........1280.............5120
.......25.......80........400........2080.........10880............56960
......125......320.......2080.......14560........103520...........738720
......625.....1280......10880......103520.......1018720.........10117600
.....3125.....5120......56960......738720......10117600........141047120
....15625....20480.....298240.....5274720.....100734400.......1978496760
....78125....81920....1561600....37664800....1003652480......27809548920
...390625...327680....8176640...268947680...10001217120.....391129835720
..1953125..1310720...42813440..1920431520...99661921440....5502120113200
..9765625..5242880..224174080.13712917600..993129226400...77403634963000
.48828125.20971520.1173790720.97917648160.9896517562400.1088923059178480

Examples

			Some solutions for n=3, k=4
..0..7..5.10....0..6..2..0....0..7..3.11....0..6..2..8....0..7..1..3
..5..0..6..5....2..4..6..2....5.11..7..5....5..0..1..2....1..0..7..1
..6..5..0..7....6..2..0..1...10..5.11.10....6..2..0..1....7..1..3..8
Vertex neighbors:
0 -> 1 2 5 6 7
1 -> 0 2 3 7 8
2 -> 0 1 4 6 8
3 -> 1 7 8 9 11
4 -> 2 6 8 9 10
5 -> 0 6 7 10 11
6 -> 0 2 4 5 10
7 -> 0 1 3 5 11
8 -> 1 2 3 4 9
9 -> 3 4 8 10 11
10 -> 4 5 6 9 11
11 -> 3 5 7 9 10
		

Crossrefs

Column 1 is A000351(n-1).
Column 2 is A003947.

Formula

Empirical for column k:
k=1: a(n) = 5*a(n-1)
k=2: a(n) = 4*a(n-1)
k=3: a(n) = 6*a(n-1) -4*a(n-2) for n>3
k=4: a(n) = 10*a(n-1) -25*a(n-2) +36*a(n-3) -24*a(n-4) +4*a(n-5) for n>6
k=5: [order 12] for n>14
k=6: [order 34] for n>37
k=7: [order 88] for n>93

A265583 Array T(n,k) = k*(k-1)^(n-1) read by ascending antidiagonals; k,n >= 1.

Original entry on oeis.org

1, 0, 2, 0, 2, 3, 0, 2, 6, 4, 0, 2, 12, 12, 5, 0, 2, 24, 36, 20, 6, 0, 2, 48, 108, 80, 30, 7, 0, 2, 96, 324, 320, 150, 42, 8, 0, 2, 192, 972, 1280, 750, 252, 56, 9, 0, 2, 384, 2916, 5120, 3750, 1512, 392, 72, 10, 0, 2, 768, 8748, 20480, 18750, 9072, 2744, 576, 90, 11
Offset: 1

Views

Author

R. J. Mathar, Dec 10 2015

Keywords

Comments

T(n,k) is the number of n-letter words in a k-letter alphabet with no adjacent letters the same. The factor k represents the number of choices of the first letter, and the n-1 times repeated factor k-1 represents the choices of the next n-1 letters avoiding their predecessor.
The antidiagonal sums are s(d) = 1, 2, 5, 12, 31, 88, 275, 942, 3513, 14158, 61241, 282632, .. for d = n+k >= 2.

Examples

			      1       2       3       4       5       6       7
      0       2       6      12      20      30      42
      0       2      12      36      80     150     252
      0       2      24     108     320     750    1512
      0       2      48     324    1280    3750    9072
      0       2      96     972    5120   18750   54432
      0       2     192    2916   20480   93750  326592
T(3,3)=12 counts aba, abc, aca, acb, bab, bac, bca, bcb, cab, cac, cba, cbc. Words like aab or cbb are not counted.
		

Crossrefs

Cf. A007283 (column 3), A003946 (column 4), A003947 (column 5), A002378 (row 2), A011379 (row 3), A179824 (row 4), A055897 (diagonal), A265584.

Programs

  • GAP
    T:= function(n,k)
        if (n=1 and k=1) then return 1;
        else return k*(k-1)^(n-k-1);
        fi;
      end;
    Flat(List([2..15], n-> List([1..n-1], k-> T(n,k) ))); # G. C. Greubel, Aug 10 2019
  • Magma
    T:= func< n,k | (n eq 1 and k eq 1) select 1 else k*(k-1)^(n-k-1) >;
    [T(n,k): k in [1..n-1], n in [2..15]]; // G. C. Greubel, Aug 10 2019
    
  • Maple
    A265583 := proc(n,k)
        k*(k-1)^(n-1) ;
    end proc:
    seq(seq( A265583(d-k,k),k=1..d-1),d=2..13) ;
  • Mathematica
    T[1,1] = 1; T[n_, k_] := If[k==1, 0, k*(k-1)^(n-1)]; Table[T[n-k,k], {n,2,12}, {k,1,n-1}] // Flatten (* Amiram Eldar, Dec 13 2018 *)
  • PARI
    T(n,k) = if(n==k==1, 1, k*(k-1)^(n-k-1) );
    for(n=2,15, for(k=1,n-1, print1(T(n,k), ", "))) \\ G. C. Greubel, Aug 10 2019
    
  • Sage
    def T(n, k):
        if (n==k==1): return 1
        else: return k*(k-1)^(n-k-1)
    [[T(n, k) for k in (1..n-1)] for n in (2..15)] # G. C. Greubel, Aug 10 2019
    

Formula

T(n,k) = k*A051129(n-1,k-1) = k*A003992(k-1,n-1).
G.f. for column k: k*x/(1-(k-1)*x). - R. J. Mathar, Dec 12 2015
G.f. for array: y/(y-1) - (1+1/x)*y*LerchPhi(y,1,-1/x). - Robert Israel, Dec 13 2018

A287831 Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 8.

Original entry on oeis.org

1, 10, 96, 924, 8892, 85572, 823500, 7924932, 76265388, 733938084, 7063035084, 67970944260, 654116708844, 6294876045156, 60578584659468, 582976518206148, 5610260171812140, 53990200655546148, 519573366930788172, 5000101506310370436, 48118353758378062956
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Comments

In general, the number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 5+k for k in {0,1,2,3,4} is given by a(n) = 9*a(n-1) + 2*k*a(n-2), a(0)=1, a(1)=10.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{9, 6}, {1, 10}, 30]
  • Python
    def a(n):
     if n in [0, 1]:
      return [1, 10][n]
     return 9*a(n-1)+6*a(n-2)

Formula

a(n) = 9*a(n-1) + 6*a(n-2), a(0)=1, a(1)=10.
G.f.: (-1 - x)/(-1 + 9*x + 6*x^2).
a(n) = ((1 - 11/sqrt(105))/2)*((9 - sqrt(105))/2)^n + ((1 + 11/sqrt(105))/2)*((9 + sqrt(105))/2)^n.

A053661 For n > 1: if n is present, 2n is not.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 9, 11, 12, 13, 15, 17, 19, 20, 21, 23, 25, 27, 28, 29, 31, 32, 33, 35, 36, 37, 39, 41, 43, 44, 45, 47, 48, 49, 51, 52, 53, 55, 57, 59, 60, 61, 63, 65, 67, 68, 69, 71, 73, 75, 76, 77, 79, 80, 81, 83, 84, 85, 87, 89, 91, 92, 93, 95, 97, 99, 100, 101, 103, 105
Offset: 1

Views

Author

Jeevan Chana Rai (Karanjit.Rai(AT)btinternet.com), Feb 16 2000

Keywords

Comments

The Name line gives a property of the sequence, not a definition. The sequence can be defined simultaneously with b(n) := A171945(n) via a(n) = mex{a(i), b(i) : 0 <= i < n} (n >= 0}, b(n)=2a(n). The two sequences are complementary, hence A053661 is identical to A171944 (except for the first terms). Furthmore, A053661 is the same as A003159 except for the replacement of vile by dopey powers of 2. - Aviezri S. Fraenkel, Apr 28 2011
For n >= 2, either n = 2^k where k is odd or n = 2^k*m where m > 1 is odd and k is even (found by Kirk Bresniker and Stan Wagon). [Robert Israel, Oct 10 2010]
Subsequence of A175880; A000040, A001749, A002001, A002042, A002063, A002089, A003947, A004171 and A081294 are subsequences.

Crossrefs

Essentially identical to A171944 and the complement of A171945.

Programs

  • Haskell
    a053661 n = a053661_list !! (n-1)
    a053661_list = filter (> 0) a175880_list -- Reinhard Zumkeller, Feb 09 2011
  • Maple
    N:= 1000: # to get all terms <= N
    sort([1,seq(2^(2*i+1),i=0..(ilog2(N)-1)/2), seq(seq(2^(2*i)*(2*j+1),j=1..(N/2^(2*i)-1)/2),i=0..ilog2(N)/2)]); # Robert Israel, Jul 24 2015
  • Mathematica
    Clear[T]; nn = 105; T[n_, k_] := T[n, k] = If[n < 1 || k < 1, 0, If[n == 1 || k == 1, 1, If[k > n, T[k, n], If[n > k, T[k, Mod[n, k, 1]], -Product[T[n, i], {i, n - 1}]]]]]; DeleteCases[Table[If[T[n, n] == -1, n, ""], {n, 1, nn}], ""] (* Mats Granvik, Aug 25 2012 *)

Extensions

More terms from James Sellers, Feb 22 2000

A156760 5*4^n-1.

Original entry on oeis.org

4, 19, 79, 319, 1279, 5119, 20479, 81919, 327679, 1310719, 5242879, 20971519, 83886079, 335544319, 1342177279, 5368709119, 21474836479, 85899345919, 343597383679, 1374389534719, 5497558138879, 21990232555519, 87960930222079, 351843720888319
Offset: 0

Views

Author

Paul Curtz, Feb 15 2009

Keywords

Comments

Second column of the array A132207, or, if this array is flattened, a(n)=A132207(A007583(n)).

Examples

			Binary.......................................Decimal
100................................................4
10011.............................................19
1001111...........................................79
100111111........................................319
10011111111.....................................1279
1001111111111...................................5119
100111111111111................................20479
10011111111111111..............................81919
1001111111111111111...........................327679
100111111111111111111........................1310719
10011111111111111111111......................5242879
1001111111111111111111111...................20971519
100111111111111111111111111.................83886079
10011111111111111111111111111..............335544319
1001111111111111111111111111111...........1342177279
... - _Philippe Deléham_, Feb 23 2014
		

Programs

Formula

a(n) mod 9 = A070403(n+2).
a(n+1) = 10*A083420(n)+9 .
a(n) = 5*A000302(n)-1.
a(n) = ( A024036(n+1)+A140529(n) )/2.
a(n) = 4a(n-1)+3, a(0)=4.
a(n) = A003947(n+1)-1 = 5*a(n-1)-4*a(n-2). G.f.: (4-x)/((1-x)(1-4x)). - R. J. Mathar, Feb 23 2009
a(n) = A198693(n) + 2^(2n+1). - Bob Selcoe, Apr 20 2015

Extensions

Edited and extended by R. J. Mathar, Feb 23 2009

A169546 Number of reduced words of length n in Coxeter group on 5 generators S_i with relations (S_i)^2 = (S_i S_j)^35 = I.

Original entry on oeis.org

1, 5, 20, 80, 320, 1280, 5120, 20480, 81920, 327680, 1310720, 5242880, 20971520, 83886080, 335544320, 1342177280, 5368709120, 21474836480, 85899345920, 343597383680, 1374389534720, 5497558138880, 21990232555520, 87960930222080
Offset: 0

Views

Author

John Cannon and N. J. A. Sloane, Dec 03 2009

Keywords

Comments

The initial terms coincide with those of A003947, although the two sequences are eventually different.
Computed with MAGMA using commands similar to those used to compute A154638.

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 25); Coefficients(R!( (1+x)*(1-x^35)/(1-4*x+9*x^35-6*x^36) )); // G. C. Greubel, Apr 25 2019
    
  • Mathematica
    coxG[{35,6,-3,30}] (* The coxG program is at A169452 *) (* Harvey P. Dale, Jan 16 2015 *)
    CoefficientList[Series[(1+x)*(1-x^35)/(1-4*x+9*x^35-6*x^36), {x, 0, 25}], x] (* G. C. Greubel, Apr 25 2019 *)
  • PARI
    my(x='x+O('x^25)); Vec((1+x)*(1-x^35)/(1-4*x+9*x^35-6*x^36)) \\ G. C. Greubel, Apr 25 2019
    
  • Sage
    ((1+x)*(1-x^35)/(1-4*x+9*x^35-6*x^36)).series(x, 25).coefficients(x, sparse=False) # G. C. Greubel, Apr 25 2019

Formula

G.f.: (t^35 + 2*t^34 + 2*t^33 + 2*t^32 + 2*t^31 + 2*t^30 + 2*t^29 + 2*t^28 + 2*t^27 + 2*t^26 + 2*t^25 + 2*t^24 + 2*t^23 + 2*t^22 + 2*t^21 + 2*t^20 + 2*t^19 + 2*t^18 + 2*t^17 + 2*t^16 + 2*t^15 + 2*t^14 + 2*t^13 + 2*t^12 + 2*t^11 + 2*t^10 + 2*t^9 + 2*t^8 + 2*t^7 + 2*t^6 + 2*t^5 + 2*t^4 + 2*t^3 + 2*t^2 + 2*t + 1)/(6*t^35 - 3*t^34 - 3*t^33 - 3*t^32 - 3*t^31 - 3*t^30 - 3*t^29 - 3*t^28 - 3*t^27 - 3*t^26 - 3*t^25 - 3*t^24 - 3*t^23 - 3*t^22 - 3*t^21 - 3*t^20 - 3*t^19 - 3*t^18 - 3*t^17 - 3*t^16 - 3*t^15 - 3*t^14 - 3*t^13 - 3*t^12 - 3*t^11 - 3*t^10 - 3*t^9 - 3*t^8 - 3*t^7 - 3*t^6 - 3*t^5 - 3*t^4 - 3*t^3 - 3*t^2 - 3*t + 1).
G.f.: (1+x)*(1-x^35)/(1 - 4*x + 9*x^35 - 6*x^36). - G. C. Greubel, Apr 25 2019

A002066 a(n) = 10*4^n.

Original entry on oeis.org

10, 40, 160, 640, 2560, 10240, 40960, 163840, 655360, 2621440, 10485760, 41943040, 167772160, 671088640, 2684354560, 10737418240, 42949672960, 171798691840, 687194767360, 2748779069440, 10995116277760, 43980465111040, 175921860444160, 703687441776640, 2814749767106560
Offset: 0

Views

Author

Keywords

Crossrefs

Pairwise sums of A081294.

Programs

Formula

From Philippe Deléham, Nov 23 2008: (Start)
a(n) = 4*a(n-1), n > 0; a(0)=10.
G.f.: 10/(1-4*x). (End)
From Elmo R. Oliveira, Apr 02 2025: (Start)
E.g.f.: 10*exp(4*x).
a(n) = 5*A004171(n) = 2*A003947(n+1) = A020714(n)*A000079(n+1). (End)

A158497 Triangle T(n,k) formed by the coordination sequences and the number of leaves for trees.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 6, 12, 1, 4, 12, 36, 108, 1, 5, 20, 80, 320, 1280, 1, 6, 30, 150, 750, 3750, 18750, 1, 7, 42, 252, 1512, 9072, 54432, 326592, 1, 8, 56, 392, 2744, 19208, 134456, 941192, 6588344, 1, 9, 72, 576, 4608, 36864, 294912, 2359296, 18874368, 150994944, 1, 10, 90, 810, 7290, 65610, 590490, 5314410, 47829690, 430467210, 3874204890
Offset: 0

Views

Author

Thomas Wieder, Mar 20 2009

Keywords

Comments

Consider the k-fold Cartesian products CP(n,k) of the vector A(n) = [1, 2, 3, ..., n].
An element of CP(n,k) is a n-tuple T_t of the form T_t = [i_1, i_2, i_3, ..., i_k] with t=1, .., n^k.
We count members T of CP(n,k) which satisfy some condition delta(T_t), so delta(.) is an indicator function which attains values of 1 or 0 depending on whether T_t is to be counted or not; the summation sum_{CP(n,k)} delta(T_t) over all elements T_t of CP produces the count.
For the triangle here we have delta(T_t) = 0 if for any two i_j, i_(j+1) in T_t one has i_j = i_(j+1): T(n,k) = Sum_{CP(n,k)} delta(T_t) = Sum_{CP(n,k)} delta(i_j = i_(j+1)).
The test on i_j > i_(j+1) generates A158498. One gets the Pascal triangle A007318 if the indicator function tests whether for any two i_j, i_(j+1) in T_t one has i_j >= i_(j+1).
Use of other indicator functions can also calculate the Bell numbers A000110, A000045 or A000108.

Examples

			Array, A(n, k) = n*(n-1)^(k-1) for n > 1, A(n, k) = 1 otherwise, begins as:
  1,  1,   1,    1,     1,      1,       1,        1,        1, ... A000012;
  1,  1,   1,    1,     1,      1,       1,        1,        1, ... A000012;
  1,  2,   2,    2,     2,      2,       2,        2,        2, ... A040000;
  1,  3,   6,   12,    24,     48,      96,      192,      384, ... A003945;
  1,  4,  12,   36,   108,    324,     972,     2916,     8748, ... A003946;
  1,  5,  20,   80,   320,   1280,    5120,    20480,    81920, ... A003947;
  1,  6,  30,  150,   750,   3750,   18750,    93750,   468750, ... A003948;
  1,  7,  42,  252,  1512,   9072,   54432,   326592,  1959552, ... A003949;
  1,  8,  56,  392,  2744,  19208,  134456,   941192,  6588344, ... A003950;
  1,  9,  72,  576,  4608,  36864,  294912,  2359296, 18874368, ... A003951;
  1, 10,  90,  810,  7290,  65610,  590490,  5314410, 47829690, ... A003952;
  1, 11, 110, 1100, 11000, 110000, 1100000, 11000000, ............. A003953;
  1, 12, 132, 1452, 15972, 175692, 1932612, 21258732, ............. A003954;
  1, 13, 156, 1872, 22464, 269568, 3234816, 38817792, ............. A170732;
  ... ;
The triangle begins as:
  1
  1, 1;
  1, 2,  2;
  1, 3,  6,  12;
  1, 4, 12,  36,  108;
  1, 5, 20,  80,  320,  1280;
  1, 6, 30, 150,  750,  3750,  18750;
  1, 7, 42, 252, 1512,  9072,  54432, 326592;
  1, 8, 56, 392, 2744, 19208, 134456, 941192, 6588344;
  ...;
T(3,3) = 12 counts the triples (1,2,1), (1,2,3), (1,3,1), (1,3,2), (2,1,2), (2,1,3), (2,3,1), (2,3,2), (3,1,2), (3,1,3), (3,2,1), (3,2,3) out of a total of 3^3 = 27 triples in the CP(3,3).
		

Crossrefs

Array rows n: A170733 (n=14), ..., A170769 (n=50).
Columns k: A000012(n) (k=0), A000027(n) (k=1), A002378(n-1) (k=2), A011379(n-1) (k=3), A179824(n) (k=4), A101362(n-1) (k=5), 2*A168351(n-1) (k=6), 2*A168526(n-1) (k=7), 2*A168635(n-1) (k=8), 2*A168675(n-1) (k=9), 2*A170783(n-1) (k=10), 2*A170793(n-1) (k=11).
Diagonals k: A055897 (k=n), A055541 (k=n-1), A373395 (k=n-2), A379612 (k=n-3).
Sums: (-1)^n*A065440(n) (signed row).

Programs

  • Magma
    A158497:= func< n,k | k le 1 select n^k else n*(n-1)^(k-1) >;
    [A158497(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 18 2025
    
  • Mathematica
    A158497[n_, k_]:= If[n<2 || k==0, 1, n*(n-1)^(k-1)];
    Table[A158497[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Mar 18 2025 *)
  • SageMath
    def A158497(n,k): return n^k if k<2 else n*(n-1)^(k-1)
    print(flatten([[A158497(n,k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Mar 18 2025

Formula

T(n, k) = (n-1)^(k-1) + (n-1)^k = n*A079901(n-1,k-1), k > 0.
Sum_{k=0..n} T(n,k) = (n*(n-1)^n - 2)/(n-2), n > 2.

Extensions

Edited by R. J. Mathar, Mar 31 2009
More terms added by G. C. Greubel, Mar 18 2025
Previous Showing 11-20 of 98 results. Next