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 18 results. Next

A027471 a(n) = (n-1)*3^(n-2), n > 0.

Original entry on oeis.org

0, 1, 6, 27, 108, 405, 1458, 5103, 17496, 59049, 196830, 649539, 2125764, 6908733, 22320522, 71744535, 229582512, 731794257, 2324522934, 7360989291, 23245229340, 73222472421, 230127770466, 721764371007, 2259436291848
Offset: 1

Views

Author

Keywords

Comments

Arithmetic derivative of 3^(n-1): a(n) = A003415(A000244(n-1)). - Reinhard Zumkeller, Feb 26 2002 [Offset corrected by Jianing Song, May 28 2024]
Binomial transform of A053220(n+1) is a(n+2). Binomial transform of A001787 is a(n+1). Binomial transform of A045883(n-1). - Michael Somos, Jul 10 2003
If X_1,X_2,...,X_n are 3-blocks of a (3n+1)-set X then, for n >= 1, a(n+2) is the number of (n+1)-subsets of X intersecting each X_i, (i=1,2,...,n). > - Milan Janjic, Nov 18 2007
Let S be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xSy if x is a subset of y. Then a(n+1) = the sum of the differences in size (i.e., |y|-|x|) for all (x, y) of S. - Ross La Haye, Nov 19 2007
Number of substrings 00 (or 11, or 22) in all ternary words of length n: a(3) = 6 because we have 000, 001, 002, 100, 200 (with 000 contributing two substrings). - Darrell Minor, Jul 17 2025

Crossrefs

Second column of A027465.
Partial sums of A081038.
Cf. A006234.

Programs

  • GAP
    List([1..40], n-> (n-1)*3^(n-2)); # Muniru A Asiru, Jul 15 2018
    
  • Magma
    [(n-1)*3^(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 09 2011
    
  • Maple
    seq((n-1)*3^(n-2), n=1..40); # Muniru A Asiru, Jul 15 2018
  • Mathematica
    Table[(n-1)3^(n-2),{n,30}] (* or *)
    LinearRecurrence[{6,-9},{0,1},30] (* Harvey P. Dale, Apr 14 2016 *)
    Range[0, 24]! CoefficientList[ Series[x*Exp[3 x], {x, 0, 24}], x] (* Robert G. Wilson v, Aug 03 2018 *)
  • PARI
    a(n)=if(n<1, 0, (n-1)*3^(n-2));
    
  • Sage
    [3^(n-2)*(n-1) for n in (1..30)] # G. C. Greubel, May 20 2021

Formula

From Wolfdieter Lang: (Start)
G.f.: (x/(1-3*x))^2.
E.g.f.: (1 + (3*x-1)*exp(3*x))/9.
a(n) = 3^(n-2)*(n-1) (convolution of A000244, powers of 3, with itself). (End)
a(n) = 6*a(n-1) - 9*a(n-2), n > 2, a(1)=0, a(2)=1. - Barry E. Williams, Jan 13 2000
a(n) = A036290(n-1)/3, for n>0. - Paul Barry, Feb 06 2004 [corrected by Jerzy R Borysowicz, Apr 03 2025]
a(n) = Sum_{k=0..n} 3^(n-k)*binomial(n-k+1, k)*binomial(1, (k+1)/2)*(1-(-1)^k)/2.
From Paul Barry, Feb 15 2005: (Start)
a(n) = (1/3)*Sum_{k=0..2n} T(n, k)*k, where T(n, k) is given by A027907.
a(n) = (1/3)*Sum_{k=0..n} Sum_{j=0..n} C(n, j)*C(j, k)*(j+k).
a(n) = Sum_{k=0..n} Sum_{j=0..n} C(n, j)*C(j, k)*(j-k).
a(n+1) = Sum_{k=0..n} Sum_{j=0..n} C(n, j)*C(j, k)*(j+k+1). (End)
Sum_{n>=2} 1/a(n) = 3*log(3/2). - Jaume Oliver Lafont, Sep 19 2009
a(n) = 3*a(n-1) + 3^(n-2) (with a(1)=0). - Vincenzo Librandi, Dec 30 2010
Sum_{n>=2} (-1)^n/a(n) = 3*log(4/3). - Amiram Eldar, Oct 28 2020

Extensions

Edited by Michael Somos, Jul 10 2003

A006234 a(n) = n*3^(n-4).

Original entry on oeis.org

1, 4, 15, 54, 189, 648, 2187, 7290, 24057, 78732, 255879, 826686, 2657205, 8503056, 27103491, 86093442, 272629233, 860934420, 2711943423, 8523250758, 26732013741, 83682825624, 261508830075, 815907549834, 2541865828329
Offset: 3

Views

Author

Keywords

Comments

For n >= 1 a(n) is also the determinant of the n-3 X n-3 matrix with 4's on the diagonal and 1's elsewhere. - Ahmed Fares (ahmedfares(AT)my-deja.com), May 06 2001
a(n+3) = det(M(n)) where M(n) is the n X n matrix with m(i,i) = 4, m(i,j) = i/j for i != j. - Benoit Cloitre, Feb 01 2003
Main diagonal of array defined by m(1,j) = j; m(i,1) = i and m(i,j) = m(i-1,j) + 2*m(i-1,j-1). - Benoit Cloitre, Jun 13 2003
a(n+3) is the number of words of length n on {A, B, C, D} with no D appearing anywhere to the right of an A. - Rob Pratt, Aug 04 2004
Number of spanning trees in the book graph of order n-2, i.e., S_{n-2} X P_2 (S_k = the star graph on k nodes) (conjectured). This conjecture is true - see Doslic (2013). - N. J. A. Sloane, Dec 28 2013
Conjecture: a(n+2) is the total number of parts used in the compositions of n if the parts can be runs of any length from 1 to n, and contain any integers from 1 to n. (The number of such compositions is given by A000244(n-1).) - Gregory L. Simay, May 27 2017
a(n+3) is the number of words of length n defined on 4 letters where one of the letters is used at most once. - Enrique Navarrete, Mar 14 2024

Examples

			For n=3, the total number of parts is (3+2)3^(3+2-4)=(5)(3)=15 (each part indicated by "[]"): [3]; [2,1]; [1,2]; [2],[1]; [1],[2]; [1,1,1]; [1,1],[1]; [1],[1,1]; [1],[1],[1]. Note that these 15 parts are arranged into 9 = A000244(3-1)compositions. - _Gregory L. Simay_, May 27 2017
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Binomial transform of A001792.

Programs

Formula

G.f.: (1-2*x)/(1-3*x)^2. - Simon Plouffe in his 1992 dissertation.
a(n+3) = Sum_{k=0..n} A112626(n, k). - Ross La Haye, Jan 11 2006
G.f.: Hypergeometric2F1([1,4],[3],3*x). - R. J. Mathar, Aug 09 2015
From Amiram Eldar, Jan 18 2021: (Start)
Sum_{n>=1} 1/a(n) = 81*log(3/2).
Sum_{n>=1} (-1)^(n+1)/a(n) = 81*log(4/3). (End)
E.g.f.: x*(exp(3*x) - 3*x - 1)/27. - Stefano Spezia, Mar 04 2023
E.g.f. (with offset 0): exp(3*x)*(1+x). - Enrique Navarrete, Mar 14 2024

A124647 a(n) = (2n + 1)*3^n.

Original entry on oeis.org

1, 9, 45, 189, 729, 2673, 9477, 32805, 111537, 373977, 1240029, 4074381, 13286025, 43046721, 138706101, 444816117, 1420541793, 4519905705, 14334558093, 45328197213, 142958160441, 449795187729, 1412147682405, 4424729404869, 13839047287569, 43211719081593, 134718888901437
Offset: 0

Views

Author

Gary W. Adamson, Dec 22 2006

Keywords

Comments

1 - 1/9 + 1/45 - 1/189 + ... = Pi/(2*sqrt(3)) = A093766. [Jolley eq 271].
If X_1,X_2,...,X_n are 3-blocks of a (4n+1)-set X then, for n>=1, a(n) is the number of (n+1)-subsets of X intersecting each X_i, (i=1,2,...,n). - Milan Janjic, Nov 23 2007
Sum_{k>=0} 1/a(k) = log(2+sqrt(3))*sqrt(3)/2 = 1.1405189944... - Jaume Oliver Lafont, Nov 30 2009

Examples

			a(3) = 189 = 7*(3^3).
		

References

  • L. B. W. Jolley, "Summation of Series", Dover Publications, 1961, p. 50

Crossrefs

Programs

  • Magma
    [ (2*n+1)*3^n: n in [0..23] ]; // Klaus Brockhaus, Sep 23 2009
    
  • Mathematica
    Table[3^n*(2*n+1), {n,0,30}] (* G. C. Greubel, May 01 2021 *)
  • Sage
    [3^n*(2*n+1) for n in (0..30)] # G. C. Greubel, May 01 2021

Formula

G.f.: (1+3*x)/(1-3*x)^2. - Jaume Oliver Lafont, Mar 07 2009
a(n) = 6*a(n-1) - 9*a(n-2) for n > 1; a(0) = 1, a(1) = 9. - Klaus Brockhaus, Sep 23 2009
a(n) = 9*A081038(n-1) for n > 0. - Klaus Brockhaus, Sep 23 2009
a(n) = Sum_{i=1..2*3^n-1} gcd(i,2*3^n) = A018804(2*3^n) -2*3^n. This is an application of the multiplicative property of the gcd sum-function A018804. So we get: 2*3^0 * phi(3^n) + ... + 2*3^(n-1) * phi(3^1) + 2*3^n * phi(3^0)+3^0 * phi(2*3^n) + ... + 3^n * phi(2*3^0) - gcd(2*3^n,2*3^n) = a(n), where phi=A000010 is Euler's totient. A general formula is Sum_{i=1..2*p^n-1} gcd(i,2*p^n) = n*3*p^n * n - 3*n*p^(n-1) + p^n, for p an odd prime. This sequence correspondes to p=3. - Jeffrey R. Goodwin, Nov 10 2011
E.g.f.: exp(3*x)*(1 + 6*x). - Stefano Spezia, May 07 2023

Extensions

More terms from Klaus Brockhaus, Sep 23 2009

A083679 Decimal expansion of log(4/3).

Original entry on oeis.org

2, 8, 7, 6, 8, 2, 0, 7, 2, 4, 5, 1, 7, 8, 0, 9, 2, 7, 4, 3, 9, 2, 1, 9, 0, 0, 5, 9, 9, 3, 8, 2, 7, 4, 3, 1, 5, 0, 3, 5, 0, 9, 7, 1, 0, 8, 9, 7, 7, 6, 1, 0, 5, 6, 5, 0, 6, 6, 6, 5, 6, 8, 5, 3, 4, 9, 2, 9, 2, 9, 5, 0, 7, 2, 0, 7, 8, 0, 4, 6, 4, 3, 3, 8, 1, 1, 0, 8, 9, 9, 1, 7, 9, 1, 0, 5, 2, 8, 6, 2, 9, 6, 0, 3
Offset: 0

Views

Author

Benoit Cloitre, Jun 15 2003

Keywords

Examples

			log(4/3) = 0.2876820724517809274392190059938274315035097108977610565....
		

Crossrefs

Programs

Formula

Limit of a special sum: log(4/3) = Sum_{k>=1} (Sum_{i=1..k} 1/(i*2^i))/2^(k+1).
Asymptotically: log(4/3) = Sum_{k=1..n} (Sum_{i=1..k} 1/(i*2^i))/2^(k+1) + log(2)/2^(n+1) + o(1/2^n).
From Amiram Eldar, Aug 07 2020: (Start)
Equals 2 * arctanh(1/7).
Equals Sum_{n>=1} 1/(n * 4^n) = Sum_{n>=1} 1/A018215(n).
Equals Sum_{n>=1} (-1)^(n+1)/(n * 3^n) = Sum_{n>=1} (-1)^(n+1)/A036290(n).
Equals Integral_{x=0..oo} 1/(3*exp(x) + 1) dx. (End)
log(4/3) = 2*Sum_{n >= 1} 1/(n*P(n, 7)*P(n-1, 7)), where P(n, x) denotes the n-th Legendre polynomial. The first 10 terms of the series gives the approximation log(4/3) = 0.28768207245178092743921(31...), correct to 23 decimal places. - Peter Bala, Mar 18 2024
Equals Sum_{n >= 1} (-1)^(n+1) * 7/(n*binomial(2*n, n)*12^n). The n-th term of the series is O(7*sqrt(Pi/n)*1/48^n). - Peter Bala, Mar 04 2025
Equals Integral_{x=0..1} (x^(1/3) - 1)/log(x) dx. - Kritsada Moomuang, May 27 2025

A050914 a(n) = n*3^n + 1.

Original entry on oeis.org

1, 4, 19, 82, 325, 1216, 4375, 15310, 52489, 177148, 590491, 1948618, 6377293, 20726200, 66961567, 215233606, 688747537, 2195382772, 6973568803, 22082967874, 69735688021, 219667417264, 690383311399, 2165293113022, 6778308875545, 21182215236076, 66088511536555, 205891132094650
Offset: 0

Views

Author

N. J. A. Sloane, Dec 30 1999

Keywords

Crossrefs

Equals A036290(n) + 1.

Programs

Formula

From Colin Barker, Oct 14 2012: (Start)
a(n) = 7*a(n-1) - 15*a(n-2) + 9*a(n-3).
G.f.: -(6*x^2 - 3*x + 1)/((x-1)*(3*x-1)^2). (End)
E.g.f.: exp(x)*(3*x*exp(2*x) + 1). - Elmo R. Oliveira, Sep 09 2024

A171607 Expressible as A*B^A in a nontrivial way.

Original entry on oeis.org

8, 18, 24, 32, 50, 64, 72, 81, 98, 128, 160, 162, 192, 200, 242, 288, 324, 338, 375, 384, 392, 450, 512, 578, 648, 722, 800, 882, 896, 968, 1024, 1029, 1058, 1152, 1215, 1250, 1352, 1458, 1536, 1568, 1682, 1800, 1922, 2048, 2178, 2187, 2312, 2450, 2500, 2592
Offset: 1

Views

Author

Robert Munafo, Dec 12 2009

Keywords

Examples

			8=2*2^2. 24=3*2^3. 375=3*5^3.
		

Crossrefs

Cf. A171606. Union of the "KN^K" sequences A001105, A117642, A141046, ... or of the "NK^N" sequences A036289, A036290, A018215, A036291, ... but omitting the trivial initial terms.

Programs

  • PARI
    is(n)=if(n<8, return(0)); for(a=2,logint(n\2,2), if(n%a==0 && ispower(n/a,a), return(1))); 0 \\ Charles R Greathouse IV, Feb 19 2017
    
  • PARI
    list(lim)=my(v=List()); if(lim<8,return([])); for(a=2,logint(lim\2,2), for(b=2,sqrtnint(lim\a,a), listput(v,a*b^a))); Set(v) \\ Charles R Greathouse IV, Feb 19 2017

Formula

a(n) = 2n^2 - O(n^(5/3)). - Charles R Greathouse IV, Feb 19 2017

A120906 Triangle read by rows: T(n,k) is the number of ternary words of length n on {0,1,2} having k drops (n>=0, k>=0). The drops of a ternary word on {0,1,2} are the subwords 10,20 and 21.

Original entry on oeis.org

1, 3, 6, 3, 10, 16, 1, 15, 51, 15, 21, 126, 90, 6, 28, 266, 357, 77, 1, 36, 504, 1107, 504, 36, 45, 882, 2907, 2304, 414, 9, 55, 1452, 6765, 8350, 2850, 210, 1, 66, 2277, 14355, 25653, 14355, 2277, 66, 78, 3432, 28314, 69576, 58278, 16236, 1221, 12, 91, 5005
Offset: 0

Views

Author

Emeric Deutsch, Jul 15 2006

Keywords

Comments

Row n has 1+floor(2n/3) terms. Row sums are the powers of 3 (A000244). T(n,0)=A000217(n+1) (the triangular numbers). Sum(k*T(n,k),k>=0)=(n-1)*3^(n-1)=A036290(n-1).

Examples

			T(5,3) = 6 because we have 1/02/1/0, 2/02/1/0, 2/1/01/0, 2/1/02/0, 2/12/1/0 and 2/1/02/1, the middle points of the drops being indicated by /.
Triangle starts:
1;
3;
6,    3;
10,  16,  1;
15,  51, 15;
21, 126, 90, 6;
		

Crossrefs

Programs

  • Maple
    G:=1/((1-z)^3-3*t*z^2+2*t*z^3-t^2*z^3): Gser:=simplify(series(G,z=0,15)): P[0]:=1: for n from 1 to 12 do P[n]:=sort(coeff(Gser,z^n)) od: for n from 0 to 12 do seq(coeff(P[n],t,j),j=0..floor(2*n/3)) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1, expand(
          add(b(n-1, j)*`if`(j (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)):
    seq(T(n), n=0..15);  # Alois P. Heinz, May 19 2014
  • Mathematica
    sol=Solve[{a==v z^2,b==v z^2,c==v(z^2+a z)},{a,b,c}];f[z_,u_]:=1/(1-3z-a-b-c)/.sol/.v->u-1;nn=10;Map[Select[#,#>0&]&,Level[CoefficientList[Series[f[z,u],{z,0,nn}],{z,u}],{2}]]//Grid (* Geoffrey Critzer, May 19 2014 *)

Formula

G.f.: G(t,z) = 1/[(1-z)^3-3tz^2+2tz^3-t^2*z^3].

A154715 Triangle interpolating between the subsets of an n-set (A000079) and the trees on n labeled nodes (A000272) (read by rows).

Original entry on oeis.org

1, 2, 3, 4, 18, 16, 8, 81, 192, 125, 16, 324, 1536, 2500, 1296, 32, 1215, 10240, 31250, 38880, 16807, 64, 4374, 61440, 312500, 699840, 705894, 262144, 128, 15309, 344064, 2734375, 9797760, 17294403, 14680064, 4782969
Offset: 0

Views

Author

Peter Luschny, Jan 14 2009

Keywords

Comments

Formatted as a square array:
1st row is A000079(n). Subsets of an n-set.
2nd row is A036290(n+1). Special (n+1)-subsets of a 3n-set partitioned into 3-blocks.
2nd column is A066274(n+1). Endofunctions of [n] such that 1 is not a fixed point.
1st column is A000272(n+2). Trees on n labeled nodes (Cayley's formula).
Alternating sum of rows in the triangle, Sum_{k=0..n} (-1)^(n-k) * T(n,k) = n! = A000142(n).
This triangle gives the coefficient of Sidi's polynomials D_{n,2,n}(-z)/(-z), for n >= 0. See [Sidi 1980]. - Wolfdieter Lang, Oct 27 2022

Examples

			Triangle begins as:
   1;
   2,    3;
   4,   18,    16;
   8,   81,   192,    125;
  16,  324,  1536,   2500,   1296;
  32, 1215, 10240,  31250,  38880,  16807;
  64, 4374, 61440, 312500, 699840, 705894, 262144;
		

Crossrefs

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n], k-> Binomial(n,k)*(k+2)^n ))); # G. C. Greubel, May 09 2019
  • Magma
    [[Binomial(n,k)*(k+2)^n: k in [0..n]]: n in [0..12]]; // G. C. Greubel, May 09 2019
    
  • Maple
    T := proc(n,k) binomial(n,k)*(k+2)^n end;
  • Mathematica
    Table[Binomial[n, k]*(k+2)^n, {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 09 2019 *)
  • PARI
    {T(n, k) = binomial(n,k)*(k+2)^n}; \\ G. C. Greubel, May 09 2019
    
  • Sage
    [[binomial(n,k)*(k+2)^n for k in (0..n)] for n in (0..12)] # G. C. Greubel, May 09 2019
    

Formula

T(n,k) = binomial(n,k)*(k+2)^n, where n >= 0, and k >= 0.
From Wolfdieter Lang, Oct 20 2022: (Start)
O.g.f. of column k: (-x)^k*(k + 2)^k/(1 - (k + 2)*x)^(k+1), for k >= 0. See |A075513| with offset 0.
E.g.f. of column k: exp((k+2)*x)*((k+2)*x)^k/k!, for k >= 0. (End)
E.g.f. of triangle (of row polynomials in y): exp(2*x)*substitute(z = x*y*exp(x), LambertW(-z)^2/(-z)*2*(1 + LambertW(-z)))). - Wolfdieter Lang, Oct 24 2022

A158749 a(n) = n*9^n.

Original entry on oeis.org

0, 9, 162, 2187, 26244, 295245, 3188646, 33480783, 344373768, 3486784401, 34867844010, 345191655699, 3389154437772, 33044255768277, 320275094369454, 3088366981419735, 29648323021629456, 283512088894331673, 2701703435345984178, 25666182635786849691, 243153309181138576020
Offset: 0

Views

Author

Zerinvary Lajos, Mar 25 2009

Keywords

Crossrefs

Programs

Formula

a(n) = n*9^n.
From R. J. Mathar, Mar 26 2009: (Start)
a(n) = 18*a(n-1) - 81*a(n-2) = A038299(n,1).
G.f.: 9*x/(1-9*x)^2. (End)
a(n) = A001019(n)*n. - Omar E. Pol, Mar 26 2009
From Amiram Eldar, Jul 20 2020: (Start)
Sum_{n>=1} 1/a(n) = log(9/8).
Sum_{n>=1} (-1)^(n+1)/a(n) = log(10/9). (End)
E.g.f.: 9*x*exp(9*x). - Elmo R. Oliveira, Sep 09 2024

A217536 Square array read by antidiagonals, where the top row is the nonnegative integers and the other numbers are the sum of the neighbors in the preceding row.

Original entry on oeis.org

0, 1, 1, 2, 3, 4, 3, 6, 10, 14, 4, 9, 18, 32, 46, 5, 12, 27, 55, 101, 147, 6, 15, 36, 81, 168, 315, 462, 7, 18, 45, 108, 244, 513, 975, 1437, 8, 21, 54, 135, 324, 736, 1564, 3001, 4438, 9, 24, 63, 162, 405, 973, 2222, 4761, 9199, 13637, 10, 27, 72, 189, 486, 1215, 2924, 6710, 14472, 28109, 41746
Offset: 0

Views

Author

WG Zeist, Oct 06 2012

Keywords

Comments

Each number in the top row of the array is determined by the pre-defined sequence (in this case, the nonnegative integers). Each number in lower rows is the sum of the numbers vertically or diagonally above it (so, the number at the left end of each row is the sum of two numbers, and all other numbers the sum of three).
Replacing the top row with A000012 (the all 1's sequence) and constructing the rest of the array the same way produces A062105. Similarly, replacing the top row with A000007 (a(n) = 0^n) produces A020474. - WG Zeist, Aug 24 2024
For any array constructed with this method, regardless of the sequence chosen for the top row, the sequence in the first column of the array can be computed from the sequence in the top row as follows: let a(0), a(1), a(2), ... be the terms in the top row, and b(0), b(1), b(2), ... the terms in the first column. Then b(n) = Sum_{k=0..n} A064189(n,k) * a(k). The inverse operation, to compute the top row from the first column, is given by a(n) = Sum_{k=0..n} A104562(n,k) * b(k). - WG Zeist, Aug 26 2024

Examples

			The array starts:
  0  1  2  3
  1  3  6  9
  4  10 18 27
  14 32 55 81
		

Crossrefs

Main diagonal gives A036290. First column gives A330796.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(k<0, 0,
         `if`(n=0, k, add(A(n-1, k+i), i=-1..1)))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Aug 24 2024

Formula

T(m+1,n) = sum(T(m,k), |k-n| <= 1) (and T(0,n)=n), m, n >= 0. - M. F. Hasler, Oct 09 2012

Extensions

Offset 0 from Alois P. Heinz, Aug 24 2024
Showing 1-10 of 18 results. Next