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.

Showing 1-8 of 8 results.

A036561 Nicomachus triangle read by rows, T(n, k) = 2^(n - k)*3^k, for 0 <= k <= n.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 8, 12, 18, 27, 16, 24, 36, 54, 81, 32, 48, 72, 108, 162, 243, 64, 96, 144, 216, 324, 486, 729, 128, 192, 288, 432, 648, 972, 1458, 2187, 256, 384, 576, 864, 1296, 1944, 2916, 4374, 6561, 512, 768, 1152, 1728, 2592, 3888, 5832, 8748, 13122, 19683
Offset: 0

Views

Author

Keywords

Comments

The triangle pertaining to this sequence has the property that every row, every column and every diagonal contains a nontrivial geometric progression. More interestingly every line joining any two elements contains a nontrivial geometric progression. - Amarnath Murthy, Jan 02 2002
Kappraff states (pp. 148-149): "I shall refer to this as Nicomachus' table since an identical table of numbers appeared in the Arithmetic of Nicomachus of Gerasa (circa 150 A.D.)" The table was rediscovered during the Italian Renaissance by Leon Battista Alberti, who incorporated the numbers in dimensions of his buildings and in a system of musical proportions. Kappraff states "Therefore a room could exhibit a 4:6 or 6:9 ratio but not 4:9. This ensured that ratios of these lengths would embody musical ratios". - Gary W. Adamson, Aug 18 2003
After Nichomachus and Alberti several Renaissance authors described this table. See for instance Pierre de la Ramée in 1569 (facsimile of a page of his Arithmetic Treatise in Latin in the links section). - Olivier Gérard, Jul 04 2013
The triangle sums, see A180662 for their definitions, link Nicomachus's table with eleven different sequences, see the crossrefs. It is remarkable that these eleven sequences can be described with simple elegant formulas. The mirror of this triangle is A175840. - Johannes W. Meijer, Sep 22 2010
The diagonal sums Sum_{k} T(n - k, k) give A167762(n + 2). - Michael Somos, May 28 2012
Where d(n) is the divisor count function, then d(T(i,j)) = A003991, the rows of which sum to the tetrahedral numbers A000292(n+1). For example, the sum of the divisors of row 4 of this triangle (i = 4), gives d(16) + d(24) + d(36) + d(54) + d(81) = 5 + 8 + 9 + 8 + 5 = 35 = A000292(5). In fact, where p and q are distinct primes, the aforementioned relationship to the divisor function and tetrahedral numbers can be extended to any triangle of numbers in which the i-th row is of form {p^(i-j)*q^j, 0<=j<=i}; i >= 0 (e.g., A003593, A003595). - Raphie Frank, Nov 18 2012, corrected Dec 07 2012
Sequence (or tree) generated by these rules: 1 is in S, and if x is in S, then 2*x and 3*x are in S, and duplicates are deleted as they occur; see A232559. - Clark Kimberling, Nov 28 2013
Partial sums of rows produce Stirling numbers of the 2nd kind: A000392(n+2) = Sum_{m=1..(n^2+n)/2} a(m). - Fred Daniel Kline, Sep 22 2014
A permutation of A003586. - L. Edson Jeffery, Sep 22 2014
Form a word of length i by choosing a (possibly empty) word on alphabet {0,1} then concatenating a word of length j on alphabet {2,3,4}. T(i,j) is the number of such words. - Geoffrey Critzer, Jun 23 2016
Form of Zorach additive triangle (see A035312) where each number is sum of west and northwest numbers, with the additional condition that each number is GCD of the two numbers immediately below it. - Michel Lagneau, Dec 27 2018

Examples

			The start of the sequence as a triangular array read by rows:
   1
   2   3
   4   6   9
   8  12  18  27
  16  24  36  54  81
  32  48  72 108 162 243
  ...
The start of the sequence as a table T(n,k) n, k > 0:
    1    2    4    8   16   32 ...
    3    6   12   24   48   96 ...
    9   18   36   72  144  288 ...
   27   54  108  216  432  864 ...
   81  162  324  648 1296 2592 ...
  243  486  972 1944 3888 7776 ...
  ...
- _Boris Putievskiy_, Jan 08 2013
		

References

  • Jay Kappraff, Beyond Measure, World Scientific, 2002, p. 148.
  • Flora R. Levin, The Manual of Harmonics of Nicomachus the Pythagorean, Phanes Press, 1994, p. 114.

Crossrefs

Cf. A001047 (row sums), A000400 (central terms), A013620, A007318.
Triangle sums (see the comments): A001047 (Row1); A015441 (Row2); A005061 (Kn1, Kn4); A016133 (Kn2, Kn3); A016153 (Fi1, Fi2); A016140 (Ca1, Ca4); A180844 (Ca2, Ca3); A180845 (Gi1, Gi4); A180846 (Gi2, Gi3); A180847 (Ze1, Ze4); A016185 (Ze2, Ze3). - Johannes W. Meijer, Sep 22 2010, Sep 10 2011
Antidiagonal cumulative sum: A000392; square arrays cumulative sum: A160869. Antidiagonal products: 6^A000217; antidiagonal cumulative products: 6^A000292; square arrays products: 6^A005449; square array cumulative products: 6^A006002.

Programs

  • Haskell
    a036561 n k = a036561_tabf !! n !! k
    a036561_row n = a036561_tabf !! n
    a036561_tabf = iterate (\xs@(x:_) -> x * 2 : map (* 3) xs) [1]
    -- Reinhard Zumkeller, Jun 08 2013
    
  • Magma
    /* As triangle: */ [[(2^(i-j)*3^j)/3: j in [1..i]]: i in [1..10]]; // Vincenzo Librandi, Oct 17 2014
  • Maple
    A036561 := proc(n,k): 2^(n-k)*3^k end:
    seq(seq(A036561(n,k),k=0..n),n=0..9);
    T := proc(n,k) option remember: if k=0 then 2^n elif k>=1 then procname(n,k-1) + procname(n-1,k-1) fi: end: seq(seq(T(n,k),k=0..n),n=0..9);
    # Johannes W. Meijer, Sep 22 2010, Sep 10 2011
  • Mathematica
    Flatten[Table[ 2^(i-j) 3^j, {i, 0, 12}, {j, 0, i} ]] (* Flatten added by Harvey P. Dale, Jun 07 2011 *)
  • PARI
    for(i=0,9,for(j=0,i,print1(3^j<<(i-j)", "))) \\ Charles R Greathouse IV, Dec 22 2011
    
  • PARI
    {T(n, k) = if( k<0 || k>n, 0, 2^(n - k) * 3^k)} /* Michael Somos, May 28 2012 */
    

Formula

T(n,k) = A013620(n,k)/A007318(n,k). - Reinhard Zumkeller, May 14 2006
T(n,k) = T(n,k-1) + T(n-1,k-1) for n>=1 and 1<=k<=n with T(n,0) = 2^n for n>=0. - Johannes W. Meijer, Sep 22 2010
T(n,k) = 2^(k-1)*3^(n-1), n, k > 0 read by antidiagonals. - Boris Putievskiy, Jan 08 2013
a(n) = 2^(A004736(n)-1)*3^(A002260(n)-1), n > 0, or a(n) = 2^(j-1)*3^(i-1) n > 0, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor[(-1+sqrt(8*n-7))/2]. - Boris Putievskiy, Jan 08 2013
G.f.: 1/((1-2x)(1-3yx)). - Geoffrey Critzer, Jun 23 2016
T(n,k) = (-1)^n * Sum_{q=0..n} (-1)^q * C(k+3*q, q) * C(n+2*q, n-q). - Marko Riedel, Jul 01 2024

A016316 Expansion of 1/((1-2x)*(1-8x)*(1-9x)).

Original entry on oeis.org

1, 19, 255, 2975, 32231, 333759, 3353335, 32976175, 319155111, 3051352799, 28893830615, 271497720975, 2535105456391, 23548956856639, 217804673719095, 2007154559579375, 18439691005140071, 168959618797797279, 1544655767192730775, 14094055488835543375
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:=[1,19,255]; [n le 3 select I[n] else 19*Self(n-1)-106*Self(n-2)+144*Self(n-3): n in [1..20]]; // Vincenzo Librandi, Jun 26 2013
    
  • Magma
    m:=20; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-2*x)*(1-8*x)*(1-9*x)))); // Vincenzo Librandi, Jun 26 2013
  • Mathematica
    CoefficientList[Series[1 / ((1 - 2 x) (1 - 8 x) (1 - 9 x)), {x, 0, 20}], x] (* Vincenzo Librandi, Jun 26 2013 *)
    LinearRecurrence[{19,-106,144},{1,19,255},30] (* Harvey P. Dale, Dec 29 2021 *)
  • PARI
    a(n)=(9^n-2^n)/7-(8^n-2^n)/6 \\ Charles R Greathouse IV, Sep 24 2012
    
  • Sage
    [(9^n - 2^n)/7-(8^n - 2^n)/6 for n in range(2,20)] # Zerinvary Lajos, Jun 05 2009
    

Formula

a(n) = 2^(n+1)/21 - 4*8^(n+1)/3 + 9^(n+2)/7; a(n) = A016133(n+1) - A016131(n+1). - Zerinvary Lajos, Jun 05 2009 [corrected by R. J. Mathar, Mar 14 2011]
From Vincenzo Librandi, Jun 26 2013: (Start)
a(n) = 19*a(n-1) - 106*a(n-2) + 144*a(n-3).
a(n) = 17*a(n-1) - 72*a(n-2) + 2^n. (End)
E.g.f.: exp(2*x)*(2 - 224*exp(6*x) + 243*exp(7*x))/21. - Stefano Spezia, Jul 30 2022

A016321 Expansion of 1/((1-2x)(1-9x)(1-10x)).

Original entry on oeis.org

1, 21, 313, 4065, 49081, 566721, 6350473, 69654225, 751887961, 8016991521, 84652923433, 886876310385, 9231886792441, 95586981129921, 985282830165193, 10117545471478545, 103557909243290521, 1057021183189581921
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [(175*10^n +2^n-2*9^(n+2))/14 : n in [0..20]]; // Vincenzo Librandi, Oct 09 2011
    
  • Mathematica
    CoefficientList[Series[1/((1-2x)(1-9x)(1-10x)),{x,0,20}],x] (* or *) LinearRecurrence[{21,-128,180},{1,21,313},20] (* Harvey P. Dale, Aug 18 2014 *)
  • PARI
    a(n) = (175*10^n+2^n-162*9^n)/14 \\ Charles R Greathouse IV, Sep 23 2012
  • Sage
    [(10^n - 2^n)/8-(9^n - 2^n)/7 for n in range(2,20)] # Zerinvary Lajos, Jun 05 2009
    

Formula

From Zerinvary Lajos, Jun 05 2009 [corrected by R. J. Mathar, Mar 14 2011]: (Start)
a(n) = 2^(n-1)/7 - 9^(n+2)/7 + 25*10^n/2.
a(n) = A016134(n+1) - A016133(n+1). (End)
From Vincenzo Librandi, Oct 09 2011: (Start)
a(n) = (175*10^n + 2^n - 2*9^(n+2))/14.
a(n) = 19*a(n-1) - 90*a(n-2) + 2^n.
a(n) = 21*a(n-1) - 128*a(n-2) + 180*a(n-3), n >= 3. (End)

A175840 Mirror image of Nicomachus' table: T(n,k) = 3^(n-k)*2^k for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 3, 2, 9, 6, 4, 27, 18, 12, 8, 81, 54, 36, 24, 16, 243, 162, 108, 72, 48, 32, 729, 486, 324, 216, 144, 96, 64, 2187, 1458, 972, 648, 432, 288, 192, 128, 6561, 4374, 2916, 1944, 1296, 864, 576, 384, 256, 19683, 13122, 8748, 5832, 3888, 2592, 1728, 1152, 768, 512
Offset: 0

Views

Author

Johannes W. Meijer, Sep 21 2010, Jul 13 2011, Jun 03 2012

Keywords

Comments

Lenstra calls these numbers the harmonic numbers of Philippe de Vitry (1291-1361). De Vitry wanted to find pairs of harmonic numbers that differ by one. Levi ben Gerson, also known as Gersonides, proved in 1342 that there are only four pairs with this property of the form 2^n*3^m. See also Peterson’s story ‘Medieval Harmony’.
This triangle is the mirror image of Nicomachus' table A036561. The triangle sums, see the crossrefs, mirror those of A036561. See A180662 for the definitions of these sums.

Examples

			1;
3, 2;
9, 6, 4;
27, 18, 12, 8;
81, 54, 36, 24, 16;
243, 162, 108, 72, 48, 32;
		

Crossrefs

Triangle sums: A001047 (Row1), A015441 (Row2), A016133 (Kn1 & Kn4), A005061 (Kn2 & Kn3), A016153 (Fi1& Fi2), A180844 (Ca1 & Ca4), A016140 (Ca2, Ca3), A180846 (Gi1 & Gi4), A180845 (Gi2 & Gi3), A016185 (Ze1 & Ze4), A180847 (Ze2 & Ze3).

Programs

  • Haskell
    a175840 n k = a175840_tabf !! n !! k
    a175840_row n = a175840_tabf !! n
    a175840_tabf = iterate (\xs@(x:_) -> x * 3 : map (* 2) xs) [1]
    -- Reinhard Zumkeller, Jun 08 2013
  • Maple
    A175840 := proc(n,k): 3^(n-k)*2^k end: seq(seq(A175840(n,k),k=0..n),n=0..9);
  • Mathematica
    Flatten[Table[3^(n-k) 2^k,{n,0,10},{k,0,n}]] (* Harvey P. Dale, May 08 2013 *)

Formula

T(n,k) = 3^(n-k)*2^k for n>=0 and 0<=k<=n.
T(n,n-k) = T(n,n-k+1) + T(n-1,n-k) for n>=1 and 1<=k<=n with T(n,n) = 2^n for n>=0.

A191465 a(n) = 9^n - 2^n.

Original entry on oeis.org

0, 7, 77, 721, 6545, 59017, 531377, 4782841, 43046465, 387419977, 3486783377, 31381057561, 282429532385, 2541865820137, 22876792438577, 205891132061881, 1853020188786305, 16677181699535497, 150094635296736977, 1350851717672467801, 12157665459055880225, 109418989131510262057
Offset: 0

Views

Author

Vincenzo Librandi, Jun 03 2011

Keywords

Comments

a(n) is the number of words of length n over the alphabet {1,2,...,9} where at least one letter >= 3 appears. - Joerg Arndt, Jan 18 2024

Crossrefs

Programs

  • Mathematica
    Table[9^n-2^n,{n,0,20}] (* Harvey P. Dale, Apr 16 2014 *)
  • PARI
    a(n)=9^n-1<Charles R Greathouse IV, Jun 08 2011

Formula

a(n) = 11*a(n-1) - 18*a(n-2).
G.f.: 7*x/((1-2*x)*(1-9*x)). - Vincenzo Librandi, Oct 04 2014
a(n) = 7*A016133(n-1). - R. J. Mathar, Mar 10 2022
E.g.f.: 2*exp(11*x/2)*sinh(7*x/2). - Elmo R. Oliveira, Mar 31 2025

A096042 Triangle read by rows: T(n,k) = (n+1,k)-th element of (M^8-M)/7, where M is the infinite lower Pascal's triangle matrix, 1<=k<=n.

Original entry on oeis.org

1, 9, 2, 73, 27, 3, 585, 292, 54, 4, 4681, 2925, 730, 90, 5, 37449, 28086, 8775, 1460, 135, 6, 299593, 262143, 98301, 20475, 2555, 189, 7, 2396745, 2396744, 1048572, 262136, 40950, 4088, 252, 8, 19173961, 21570705, 10785348, 3145716, 589806
Offset: 1

Views

Author

Gary W. Adamson, Jun 17 2004

Keywords

Examples

			Triangle begins:
1
9 2
73 27 3
585 292 54 4
4681 2925 730 90 5
37449 28086 8775 1460 135 6
		

Crossrefs

Cf. A007318. First column gives A023001. Row sums give A016133.

Programs

  • Maple
    P:= proc(n) option remember; local M; M:= Matrix(n, (i, j)-> binomial(i-1, j-1)); (M^8-M)/7 end: T:= (n, k)-> P(n+1)[n+1, k]: seq(seq(T(n, k), k=1..n), n=1..11); # Alois P. Heinz, Oct 07 2009
  • Mathematica
    P[n_] := P[n] = With[{M = Array[Binomial[#1-1, #2-1]&, {n, n}]}, (MatrixPower[M, 8] - M)/7]; T[n_, k_] := P[n+1][[n+1, k]]; Table[ Table[T[n, k], {k, 1, n}], {n, 1, 11}] // Flatten (* Jean-François Alcover, Jan 28 2015, after Alois P. Heinz *)

Extensions

Edited with more terms by Alois P. Heinz, Oct 07 2009

A109498 Number of closed walks of length 2n on the Heawood graph from a given node.

Original entry on oeis.org

1, 3, 15, 111, 951, 8463, 75975, 683391, 6149751, 55346223, 498112935, 4483010271, 40347080151, 363123696783, 3268113221895, 29413018898751, 264717169892151, 2382454528636143, 21442090756938855
Offset: 0

Views

Author

Mitch Harris, Jun 30 2005

Keywords

Programs

  • Magma
    I:=[1,3]; [n le 2 select I[n] else 11*Self(n-1) - 18*Self(n-2): n in [1..30]]; // G. C. Greubel, Dec 30 2017
  • Mathematica
    CoefficientList[Series[(1 - 8*x)/((9*x - 1)*(2*x - 1)), {x,0,50}], x] (* or *) LinearRecurrence[{11,-18}, {1,3}, 30] (* G. C. Greubel, Dec 30 2017 *)
  • PARI
    x='x+O('x^30); Vec((1 - 8*x)/((9*x - 1)*(2*x - 1))) \\ G. C. Greubel, Dec 30 2017
    

Formula

O.g.f.: ( 1-8*x ) / ( (9*x-1)*(2*x-1) ).
a(n) = (9^n + 6*2^n)/7.
a(n) = A106133(n) - 8*A016133(n-1).

A135247 a(n) = 3*a(n-1) + 2*a(n-2) - 6*a(n-3).

Original entry on oeis.org

1, 3, 11, 33, 103, 309, 935, 2805, 8431, 25293, 75911, 227733, 683263, 2049789, 6149495, 18448485, 55345711, 166037133, 498111911, 1494335733, 4483008223, 13449024669, 40347076055, 121041228165, 363123688591, 1089371065773, 3268113205511, 9804339616533
Offset: 0

Views

Author

Paul Curtz, Feb 15 2008

Keywords

Comments

This sequence interleaves A016133 and 3*A016133, see formulas. - Mathew Englander, Jan 08 2024
a(n) is the number of partitions of n into parts 1 (in three colors) and 2 (in two colors) where the order of colors matters. For example, the a(2)=11 such partitions (using parts 1, 1', 1'', 2, and 2') are 2, 2', 1+1, 1+1', 1+1'', 1'+1, 1'+1', 1'+1'', 1''+1, 1''+1', 1''+1''. For such partitions where the order of colors does not matter see A002624. - Joerg Arndt, Jan 18 2024

Crossrefs

Cf. A016133.

Programs

  • GAP
    a:=[1,3,11];; for n in [4..30] do a[n]:=3*a[n-1]+2*a[n-2]-6*a[n-3]; od; a; # G. C. Greubel, Nov 20 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( 1/(1-3*x-2*x^2+6*x^3) )); // G. C. Greubel, Nov 20 2019
    
  • Maple
    seq(coeff(series(1/(1-3*x-2*x^2+6*x^3), x, n+1), x, n), n = 0..30); # G. C. Greubel, Nov 20 2019
  • Mathematica
    LinearRecurrence[{3,2,-6},{1,3,11},30] (* Harvey P. Dale, Jun 27 2015 *)
  • PARI
    my(x='x+O('x^30)); Vec(1/(1-3*x-2*x^2+6*x^3)) \\ G. C. Greubel, Nov 20 2019
    
  • Sage
    def A135247_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( 1/(1-3*x-2*x^2+6*x^3) ).list()
    A135247_list(30) # G. C. Greubel, Nov 20 2019
    

Formula

G.f.: 1/((1-3*x)*(1-2*x^2)). - G. C. Greubel, Oct 04 2016
From Mathew Englander, Jan 08 2024: (Start)
a(n) = A010684(n) * A016133(floor(n/2)).
a(n) = 3*a(n-1) + A077957(n) for n >= 1.
a(n) = (A000244(n+2) - A164073(n+3))/7.
(End)

Extensions

More terms from Harvey P. Dale, Jun 27 2015
Dropped two leading terms = 0. - Joerg Arndt, Jan 18 2024
Showing 1-8 of 8 results.