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-10 of 10 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

A001140 Describe the previous term! (method A - initial term is 4).

Original entry on oeis.org

4, 14, 1114, 3114, 132114, 1113122114, 311311222114, 13211321322114, 1113122113121113222114, 31131122211311123113322114, 132113213221133112132123222114, 11131221131211132221232112111312111213322114, 31131122211311123113321112131221123113111231121123222114
Offset: 1

Views

Author

Keywords

Comments

Method A = 'frequency' followed by 'digit'-indication.
A001155, A001140, A001141, A001143, A001145, A001151 and A001154 are all identical apart from the last digit of each term (the seed). This is because digits other than 1, 2 and 3 never arise elsewhere in the terms (other than at the end of each of them) of look-and-say sequences of this type (as is mentioned by Carmine Suriano in A006751). - Chayim Lowen, Jul 16 2015
a(n+1) - a(n) is divisible by 10^5 for n > 5. - Altug Alkan, Dec 04 2015

Examples

			The term after 3114 is obtained by saying "one 3, two 1's, one 4", which gives 132114.
		

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 452-455.
  • I. Vardi, Computational Recreations in Mathematica. Addison-Wesley, Redwood City, CA, 1991, p. 4.

Crossrefs

Programs

  • Haskell
    cf. Josh Triplett's program for A005051.
    import Data.List (group)
    a001140 n = a001140_list !! (n-1)
    a001140_list = 4 : map say a001140_list where
       say = read . concatMap saygroup . group . show
             where saygroup s = (show $ length s) ++ [head s]
    -- Reinhard Zumkeller, Dec 15 2012
    
  • Mathematica
    RunLengthEncode[ x_List ] := (Through[ {First, Length}[ #1 ] ] &) /@ Split[ x ];
    LookAndSay[ n_, d_:1 ] := NestList[ Flatten[ Reverse /@ RunLengthEncode[ # ] ] &, {d}, n - 1 ];
    F[ n_ ] := LookAndSay[ n, 4 ][ [ n ] ];
    Table[ FromDigits[ F[ n ] ], {n, 1, 11} ] (* Zerinvary Lajos, Mar 21 2007 *)
  • Perl
    # This outputs the first n elements of the sequence, where n is given on the command line.
    $s = 4;
    for (2..shift @ARGV) {
        print "$s, ";
        $s =~ s/(.)\1*/(length $&).$1/eg;
    }
    print "$s\n";
    ## Arne 'Timwi' Heizmann (timwi(AT)gmx.net), Mar 12 2008

A168607 a(n) = 3^n + 2.

Original entry on oeis.org

3, 5, 11, 29, 83, 245, 731, 2189, 6563, 19685, 59051, 177149, 531443, 1594325, 4782971, 14348909, 43046723, 129140165, 387420491, 1162261469, 3486784403, 10460353205, 31381059611, 94143178829, 282429536483, 847288609445
Offset: 0

Views

Author

Vincenzo Librandi, Dec 01 2009

Keywords

Comments

Second bisection is A134752.
It appears that if s(n) is a first order rational sequence of the form s(1)=5, s(n)= (2*s(n-1)+1)/(s(n-1)+2),n>1, then s(n)= a(n)/(a(n)-4), n>1. - Gary Detlefs, Nov 16 2010
Mahler exhibits this sequence with n>=1 as a proof that there exists an infinite number of x coprime to 3, such that x belongs to A125293 and x^2 belongs to A005836. - Michel Marcus, Nov 12 2012

Crossrefs

Cf. A008776 (2*3^n), A005051 (8*3^n), A034472 (3^n+1), A000244 (powers of 3), A024023 (3^n-1), A168609 (3^n+4), A168610 (3^n+5), A134752 (3^(2*n-1)+2).

Programs

Formula

a(n) = 3*a(n-1) - 4, a(0) = 3.
a(n+1) - a(n) = A008776(n).
a(n+2) - a(n) = A005051(n).
a(n) = A034472(n)+1 = A000244(n)+2 = A024023(n)+3 = A168609(n)-2 = A168610(n)-3.
G.f.: (3 - 7*x)/((1 - x)*(1 - 3*x)).
a(n) = 4*a(n-1) - 3*a(n-2), a(0) = 3, a(1) = 5. - Vincenzo Librandi, Feb 06 2013
E.g.f.: exp(3*x) + 2*exp(x). - Elmo R. Oliveira, Nov 09 2023

Extensions

Edited by Klaus Brockhaus, Apr 13 2010
Further edited by N. J. A. Sloane, Aug 10 2010

A233155 T(n,k) = Number of n X k 0..2 arrays with no element x(i,j) adjacent to value 2-x(i,j) horizontally or antidiagonally.

Original entry on oeis.org

3, 6, 9, 12, 24, 27, 24, 72, 96, 81, 48, 216, 432, 384, 243, 96, 648, 1944, 2592, 1536, 729, 192, 1944, 8856, 17496, 15552, 6144, 2187, 384, 5832, 40392, 121176, 157464, 93312, 24576, 6561, 768, 17496, 184248, 842616, 1658232, 1417176, 559872, 98304, 19683
Offset: 1

Views

Author

R. H. Hardin, Dec 05 2013

Keywords

Comments

Table starts
.....3.......6........12.........24...........48.............96
.....9......24........72........216..........648...........1944
....27......96.......432.......1944.........8856..........40392
....81.....384......2592......17496.......121176.........842616
...243....1536.....15552.....157464......1658232.......17587584
...729....6144.....93312....1417176.....22692312......367125912
..2187...24576....559872...12754584....310536504.....7663517136
..6561...98304...3359232..114791256...4249585944...159971190624
.19683..393216..20155392.1033121304..58154132088..3339300422232
.59049.1572864.120932352.9298091736.795819434328.69705848287656

Examples

			Some solutions for n=4, k=4
..1..2..2..1....1..2..2..1....0..0..0..0....1..2..1..0....2..1..0..1
..2..1..2..2....2..1..0..1....1..0..1..2....1..0..0..0....0..1..0..1
..2..1..2..1....2..1..0..1....1..0..1..0....0..0..1..0....2..1..2..1
..0..1..2..2....0..1..0..0....1..0..0..1....0..0..0..0....2..1..0..0
		

Crossrefs

Column 1 is A000244.
Column 2 is A002023(n-1).
Column 3 is 2*A000400.
Column 4 is 3*A055275.
Row 1 is A003945.
Row 2 is A005051(n-1) for n>1.

Formula

Empirical for column k:
k=1: a(n) = 3*a(n-1).
k=2: a(n) = 4*a(n-1).
k=3: a(n) = 6*a(n-1).
k=4: a(n) = 9*a(n-1).
k=5: a(n) = 15*a(n-1) -18*a(n-2).
k=6: a(n) = 25*a(n-1) -90*a(n-2) +81*a(n-3).
k=7: a(n) = 42*a(n-1) -351*a(n-2) +972*a(n-3) -810*a(n-4).
Empirical for row n:
n=1: a(n) = 2*a(n-1).
n=2: a(n) = 3*a(n-1) for n>2.
n=3: a(n) = 5*a(n-1) -2*a(n-2) for n>4.
n=4: a(n) = 9*a(n-1) -15*a(n-2) +6*a(n-3) for n>7.
n=5: [order 7] for n>11.
n=6: [order 9] for n>15.
n=7: [order 27] for n>33.

A080923 First differences of A003946.

Original entry on oeis.org

1, 3, 8, 24, 72, 216, 648, 1944, 5832, 17496, 52488, 157464, 472392, 1417176, 4251528, 12754584, 38263752, 114791256, 344373768, 1033121304, 3099363912, 9298091736, 27894275208, 83682825624, 251048476872, 753145430616
Offset: 0

Views

Author

Paul Barry, Feb 26 2003

Keywords

Comments

Sum of consecutive pairs of elements of A025192.
The alternating sign sequence with g.f. (1-x^2)/(1+3x) gives the diagonal sums of A110168. - Paul Barry, Jul 14 2005
Let M = an infinite lower triangular matrix with the odd integers (1,3,5,...) in every column, with the leftmost column shifted up one row. Then A080923 = lim_{n->inf} M^n. - Gary W. Adamson, Feb 18 2010
a(n+1), n >= 0, with o.g.f. ((1-x^2)/(1-3*x)-1)/x = (3-x)/(1-3*x) provides the coefficients in the formal power series for tan(3*x)/tan(x) = (3-z)/(1-3*z) = Sum_{n>=0} a(n+1)*z^n, with z = tan(x)^2. Convergence holds for 0 <= z < 1/3, i.e., |x| < Pi/6, approximately 0.5235987758. For the numerator and denominator of this o.g.f. see A034867 and A034839, respectively. - Wolfdieter Lang, Jan 18 2013

Crossrefs

Essentially the same as A005051, A026097 and A083583.

Programs

  • Mathematica
    CoefficientList[Series[(1 - x^2) / (1 - 3 x), {x, 0, 20}], x] (* Vincenzo Librandi, Aug 05 2013 *)

Formula

G.f.: (1-x^2)/(1-3*x).
G.f.: 1/(1 - 3*x + x^2 - 3*x^3 + x^4 - 3*x^5 + ...). - Gary W. Adamson, Jan 06 2011
a(n) = 2^3*3^(n-2), n >= 2, a(0) = 1, a(1) = 3. - Wolfdieter Lang, Jan 18 2013

A199111 a(n) = 8*3^n + 1.

Original entry on oeis.org

9, 25, 73, 217, 649, 1945, 5833, 17497, 52489, 157465, 472393, 1417177, 4251529, 12754585, 38263753, 114791257, 344373769, 1033121305, 3099363913, 9298091737, 27894275209, 83682825625, 251048476873, 753145430617, 2259436291849, 6778308875545, 20334926626633, 61004779879897
Offset: 0

Views

Author

Vincenzo Librandi, Nov 03 2011

Keywords

Crossrefs

Cf. A000244, A005051, A160173. - Omar E. Pol, Nov 18 2011
Cf. A198644.

Programs

  • Magma
    [8*3^n+1: n in [0..30]];

Formula

a(n) = 3*a(n-1) - 2.
a(n) = 4*a(n-1) - 3*a(n-2).
G.f.: (9-11*x)/((1-x)*(1-3*x)). - Bruno Berselli, Nov 03 2011
a(n) = 8*A000244(n) + 1 = A005051(n) + 1. - Omar E. Pol, Nov 18 2011
From Elmo R. Oliveira, May 07 2025: (Start)
E.g.f.: exp(x)*(8*exp(2*x) + 1).
a(n) = A198644(n) + 2. (End)

A100852 Triangle read by rows: T(n,k) = 2^k * 3^n, 0 <= k <= n.

Original entry on oeis.org

1, 3, 6, 9, 18, 36, 27, 54, 108, 216, 81, 162, 324, 648, 1296, 243, 486, 972, 1944, 3888, 7776, 729, 1458, 2916, 5832, 11664, 23328, 46656, 2187, 4374, 8748, 17496, 34992, 69984, 139968, 279936, 6561, 13122, 26244, 52488, 104976, 209952, 419904, 839808
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 20 2004

Keywords

Comments

T(n,0) = A000244(n); T(n,n) = A000400(n) = A100851(n,n);
T(n,1) = A008776(n) for n>0;
T(n,2) = A003946(n+1) for n>1;
T(n,3) = A005051(n+1) for n>2;
T(n,n-1) = A081341(n+1) for n>0;
row sums give A016137.

Examples

			Triangle begins:
   1;
   3,   6;
   9,  18,  36;
  27,  54, 108, 216;
  81, 162, 324, 648, 1296;
...
		

Crossrefs

Cf. A100851, A003586, A065333(T(n, k))=1.

Programs

  • Mathematica
    Table[2^k*3^n, {n, 0, 140}, {k, 0, n}] // Flatten (* Michael De Vlieger, Mar 06 2017 *)
  • PARI
    for(n=0, 8, for(k=0, n, print1(2^k*3^n", "))) \\ Satish Bysany, Mar 06 2017

Formula

G.f.: 1/((1 - 3*x)(1 - 6*x*y)). - Ilya Gutkovskiy, Jun 03 2017

A026097 a(n) = number of (s(0), s(1), ..., s(n)) such that every s(i) is an integer, s(0) = 0, |s(i) - s(i-1)| = 1 for i = 1,2,3; |s(i) - s(i-1)| <= 1 for i >= 4. Also a(n) = sum of numbers in row n+1 of the array T defined in A026082 and a(n) = 24*3^(n-4) for n >= 4.

Original entry on oeis.org

1, 2, 4, 8, 24, 72, 216, 648, 1944, 5832, 17496, 52488, 157464, 472392, 1417176, 4251528, 12754584, 38263752, 114791256, 344373768, 1033121304, 3099363912, 9298091736, 27894275208, 83682825624, 251048476872, 753145430616, 2259436291848
Offset: 0

Views

Author

Keywords

Comments

Also length of successive strings generated by an alternating Kolakoski (2,4) rule starting at 4 (i.e. string begins with 2 if previous string ends with 4 and vice et versa) : 4-->2222-->44224422-->444422224422444422224422-->... and length of strings are 1,4,8,24,72,... - Benoit Cloitre, Oct 15 2005
Also number of words of length n over alphabet {1,2,3} with no fixed points (a fixed point is value i in position i). - Margaret Archibald, Jun 23 2020

References

  • M. Archibald, A. Blecher and A. Knopfmacher, Fixed points in compositions and words, accepted by the Journal of Integer Sequences.

Crossrefs

Essentially the same as A005051.

Programs

Formula

a(n) = 3*a(n-1) for n>3. G.f.: (4*x^3+2*x^2+x-1) / (3*x-1). - Colin Barker, Jun 15 2013
a(n) = floor( (4*n-2)/(n+1) )*a(n-1). Without the floor function the recursion gives the Catalan numbers (A000108). - Hauke Woerpel, Oct 16 2020

A083583 a(n) = (8*3^n - 5*0^n)/3.

Original entry on oeis.org

1, 8, 24, 72, 216, 648, 1944, 5832, 17496, 52488, 157464, 472392, 1417176, 4251528, 12754584, 38263752, 114791256, 344373768, 1033121304, 3099363912, 9298091736, 27894275208, 83682825624, 251048476872, 753145430616, 2259436291848
Offset: 0

Views

Author

Paul Barry, May 01 2003

Keywords

Crossrefs

Cf. A083854.

Programs

Formula

a(n) = (8*3^n - 5*0^n)/3.
G.f.: (1+5*x)/(1-3*x).
E.g.f.: (8*exp(3x) - 5*exp(0))/3.
a(n) = A005051(n-1), n > 0. - R. J. Mathar, Sep 17 2008

A258597 a(n) = 13*3^n.

Original entry on oeis.org

13, 39, 117, 351, 1053, 3159, 9477, 28431, 85293, 255879, 767637, 2302911, 6908733, 20726199, 62178597, 186535791, 559607373, 1678822119, 5036466357, 15109399071, 45328197213, 135984591639, 407953774917, 1223861324751, 3671583974253, 11014751922759
Offset: 0

Views

Author

Vincenzo Librandi, Jun 05 2015

Keywords

Comments

Also maximum leaf number of the (n+3)-Apollonian network for n >= 0. - Eric W. Weisstein, Jan 17 2018

Crossrefs

Cf. k*3^n: A000244 (k=1,3,9), A008776 (k=2,6), A003946 (k=4), A005030 (k=5), A005032 (k=7), A005051 (k=8), A005052 (k=10), A120354 (k=11), A003946 (k=12), this sequence (k=13), A258598 (k=17), A176413 (k=19).

Programs

  • Magma
    [13*3^n: n in [0..30]];
  • Mathematica
    Table[13 3^n, {n, 0, 30}]
    13 3^Range[0, 20] (* Eric W. Weisstein, Jan 17 2018 *)
    LinearRecurrence[{3}, {13}, 20] (* Eric W. Weisstein, Jan 17 2018 *)
    CoefficientList[Series[13/(1 - 3 x), {x, 0, 20}], x] (* Eric W. Weisstein, Jan 17 2018 *)

Formula

G.f.: 13/(1-3*x).
a(n) = 3*a(n-1).
a(n) = 13*A000244(n).
E.g.f.: 13*exp(3*x). - Elmo R. Oliveira, Aug 16 2024
Showing 1-10 of 10 results.