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-9 of 9 results.

A024023 a(n) = 3^n - 1.

Original entry on oeis.org

0, 2, 8, 26, 80, 242, 728, 2186, 6560, 19682, 59048, 177146, 531440, 1594322, 4782968, 14348906, 43046720, 129140162, 387420488, 1162261466, 3486784400, 10460353202, 31381059608, 94143178826, 282429536480, 847288609442, 2541865828328, 7625597484986, 22876792454960
Offset: 0

Views

Author

Keywords

Comments

Number of different directions along lines and hyper-diagonals in an n-dimensional cubic lattice for the attacking queens problem (A036464 in n=2, A068940 in n=3 and A068941 in n=4). The n-dimensional direction vectors have the a(n)+1 Cartesian coordinates (i,j,k,l,...) where i,j,k,l,... = -1, 0, or +1, excluding the zero-vector i=j=k=l=...=0. The corresponding hyper-line count is A003462. - R. J. Mathar, May 01 2006
Total number of sequences of length m=1,...,n with nonzero integer elements satisfying the condition Sum_{k=1..m} |n_k| <= n. See the K. A. Meissner link p. 6 (with a typo: it should be 3^([2a]-1)-1). - Wolfdieter Lang, Jan 21 2008
Let P(A) be the power set of an n-element set A and R be a relation on P(A) such that for all x, y of P(A), xRy if x and y are disjoint and either 0) x is a proper subset of y or y is a proper subset of x, or 1) x is not a subset of y and y is not a subset of x. Then a(n) = |R|. - Ross La Haye, Mar 19 2009
Number of neighbors in Moore's neighborhood in n dimensions. - Dmitry Zaitsev, Nov 30 2015
Number of terms in conjunctive normal form of Boolean expression with n variables. E.g., a(2) = 8: [~x, ~y, x, y, ~x|~y, ~x|y, x|~y, x|y]. - Yuchun Ji, May 12 2023
Number of rays of the Coxeter arrangement of type B_n. Equivalently, number of facets of the n-dimensional type B permutahedron. - Jose Bastidas, Sep 12 2023

Examples

			From _Zerinvary Lajos_, Jan 14 2007: (Start)
Ternary......decimal:
0...............0
2...............2
22..............8
222............26
2222...........80
22222.........242
222222........728
2222222......2186
22222222.....6560
222222222...19682
2222222222..59048
etc...........etc.
(End)
Sequence combinatorics: n=3: With length m=1: [1],[2],[3] each with 2 signs, with m=2: [1,1], [1,2], [2,1], each 2^2 = 4 times from choosing signs; m=3: [1,1,1] coming in 2^3 signed versions: 3*2 + 3*4 + 1*8 = 26 = a(3). The order is important, hence the M_0 multinomials A048996 enter as factors.
A027902 gives the 384 divisors of a(24). - _Reinhard Zumkeller_, Mar 11 2010
		

References

  • Mordechai Ben-Ari, Mathematical Logic for Computer Science, Third edition, 173-203.

Crossrefs

Cf. triangle A013609.
Cf. second column of A145901.

Programs

Formula

a(n) = A000244(n) - 1.
a(n) = 2*A003462(n). - R. J. Mathar, May 01 2006
A128760(a(n)) > 0. - Reinhard Zumkeller, Mar 25 2007
G.f.: 2*x/((-1+x)*(-1+3*x)) = 1/(-1+x) - 1/(-1+3*x). - R. J. Mathar, Nov 19 2007
a(n) = Sum_{k=1..n} Sum_{m=1..k} binomial(k-1,m-1)*2^m, n >= 1. a(0)=0. From the sequence combinatorics mentioned above. Twice partial sums of powers of 3.
E.g.f.: e^(3*x) - e^x. - Mohammad K. Azarian, Jan 14 2009
a(n) = A024101(n)/A034472(n). - Reinhard Zumkeller, Feb 14 2009
a(n) = 3*a(n-1) + 2 (with a(0)=0). - Vincenzo Librandi, Nov 19 2010
E.g.f.: -E(0) where E(k) = 1 - 3^k/(1 - x/(x - 3^k*(k+1)/E(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 06 2012
a(n) = A227048(n,A020914(n)). - Reinhard Zumkeller, Jun 30 2013
Sum_{n>=1} 1/a(n) = A214369. - Amiram Eldar, Nov 11 2020
a(n) = Sum_{k=1..n} 2^k*binomial(n,k). - Ridouane Oudra, Jun 15 2025
From Peter Bala, Jul 01 2025: (Start)
For n >= 1, a(2*n)/a(n) = A034472(n) and a(3*n)/a(n) = A034513(n).
Modulo differences in offsets, exp( Sum_{n >= 1} a(k*n)/a(n)*x^n/n ) is the o.g.f. of A003462 (k = 2), A006100 (k = 3), A006101 (k = 4), A006102 (k = 5), A022196 (k = 6), A022197 (k = 7), A022198 (k = 8), A022199 (k = 9), A022200 (k = 10), A022201 (k = 11), A022202 (k = 12) and A022203 (k = 13).
The following are all examples of telescoping series:
Sum_{n >= 1} 3^n/(a(n)*a(n+1)) = 1/2^2; Sum_{n >= 1} 3^n/(a(n)*a(n+1)*a(n+2)) = 1/(2*8^2).
In general, for k >= 1, Sum_{n >= 1} 3^n/(a(n)*a(n+1)*...*a(n+k)) = 1/(a(1)*a(2)*...*a(k)*a(k)).
Sum_{n >= 1} 3^n/(a(n)*a(n+2)) = 5/64; Sum_{n >= 1} (-3)^n/(a(n)*a(n+2)) = -3/64.
Sum_{n >= 1} 3^n/(a(n)*a(n+4)) = 703/83200; Sum_{n >= 1} (-3)^n/(a(n)*a(n+4)) = - 417/83200. (End)

A022167 Triangle of Gaussian binomial coefficients [ n,k ] for q = 3.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 13, 13, 1, 1, 40, 130, 40, 1, 1, 121, 1210, 1210, 121, 1, 1, 364, 11011, 33880, 11011, 364, 1, 1, 1093, 99463, 925771, 925771, 99463, 1093, 1, 1, 3280, 896260, 25095280, 75913222, 25095280, 896260, 3280, 1
Offset: 0

Views

Author

Keywords

Comments

The coefficients of the matrix inverse are apparently given by T^(-1)(n,k) = (-1)^n*A157783(n,k). - R. J. Mathar, Mar 12 2013

Examples

			Triangle begins:
  1;
  1,    1;
  1,    4,      1;
  1,   13,     13,        1;
  1,   40,    130,       40,        1;
  1,  121,   1210,     1210,      121,        1;
  1,  364,  11011,    33880,    11011,      364,      1;
  1, 1093,  99463,   925771,   925771,    99463,   1093,    1;
  1, 3280, 896260, 25095280, 75913222, 25095280, 896260, 3280, 1;
		

References

  • F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier-North Holland, 1978, p. 698.
  • M. Sved, Gaussians and binomials, Ars. Combinatoria, 17A (1984), 325-351.

Crossrefs

Columns k=0..3 give A000012, A003462, A006100, A006101.
Cf. A006117 (row sums).

Programs

Formula

T(n,k) = T(n-1,k-1) + q^k * T(n-1,k). - Peter A. Lawrence, Jul 13 2017
T(n,k) = Sum_{j=0..k} C(n,j)*qStirling2(n-j,n-k,3)*(2)^(k-j),j,0,k), n >= k, where qStirling2(n,k,3) is triangle A333143. - Vladimir Kruchinin, Mar 07 2020
G.f. of column k: x^k * exp( Sum_{j>=1} f((k+1)*j)/f(j) * x^j/j ), where f(j) = 3^j - 1. - Seiichi Manyama, May 09 2025

A016142 Expansion of 1/((1-3*x)*(1-9*x)).

Original entry on oeis.org

1, 12, 117, 1080, 9801, 88452, 796797, 7173360, 64566801, 581120892, 5230147077, 47071500840, 423644039001, 3812797945332, 34315186290957, 308836690967520, 2779530261754401, 25015772484929772, 225141952751788437, 2026277575928357400, 18236498186842001001, 164128483692038362212
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of lattices L in Z^(n+1) such that the quotient group Z^(n+1) / L is C_9. - Álvar Ibeas, Nov 29 2015
In the game of SET with four attributes there are 1080 potential SETs. See A090245. In the generalized game of SET with different numbers of attributes, the number of potential SETs is a(n+1). - Robert Price, Oct 14 2017

Crossrefs

Programs

  • Magma
    [(1/6)*(9^(n+1)-3^(n+1)): n in [0..20]]; // Vincenzo Librandi, Feb 24 2014
  • Mathematica
    Join[{a=1,b=12},Table[c=12*b-27*a;a=b;b=c,{n,60}]] (* Vladimir Joseph Stephan Orlovsky, Jan 31 2011 *)
    CoefficientList[Series[1/((1-3x)(1-9x)),{x,0,20}],x] (* or *) Table[ (9^(n+1) -3^(n+1))/6,{n,0,20}]  (* Harvey P. Dale, Apr 03 2011 *)
    Table[ncards = 3^nattr; (ncards*(ncards - 1))/6, {nattr, 1, 20}] (* Robert Price, Oct 14 2017 *)
  • PARI
    Vec(1/((1-3*x)*(1-9*x))+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
    
  • PARI
    a(n) = (1/6)*(9^(n+1) - 3^(n+1)); \\ Joerg Arndt, Feb 23 2014
    
  • Sage
    [lucas_number1(n,12,27) for n in range(1, 20)] # Zerinvary Lajos, Apr 27 2009
    

Formula

a(n) = (1/6)*(9^(n+1) - 3^(n+1)).
a(n-1) = Sum_{i=1..n} binomial(n,i)*3^(n-i)*6^(i-1). - Sam Handler (sam_5_5_5_0(AT)yahoo.com), Jun 29 2004
a(n) = 12*a(n-1) - 27*a(n-2), a(0)=1, a(1)=12. - Vincenzo Librandi, Mar 14 2011
a(n) = A006100(n+2) - A006100(n+1), for n > 0. - Álvar Ibeas, Nov 29 2015
E.g.f.: exp(3*x)*(3*exp(3*x) - 1)/2. - Elmo R. Oliveira, Mar 08 2025

A203243 Second elementary symmetric function of the first n terms of (1,3,9,27,81,...).

Original entry on oeis.org

3, 39, 390, 3630, 33033, 298389, 2688780, 24208860, 217909263, 1961271939, 17651713170, 158866215690, 1429798332693, 12868192168689, 115813751041560, 1042323823944120, 9380914609207323, 84428232063996639, 759854090319361950
Offset: 2

Views

Author

Clark Kimberling, Dec 31 2011

Keywords

Crossrefs

Cf. A006100.

Programs

  • Mathematica
    f[k_] := 3^(k - 1); t[n_] := Table[f[k], {k, 1, n}]
    a[n_] := SymmetricPolynomial[2, t[n]]
    Table[a[n], {n, 2, 32}]    (* A203243 *)
    Table[a[n]/3, {n, 2, 32}]  (* A006100 *)
  • PARI
    Vec(-3*x^2/((x-1)*(3*x-1)*(9*x-1)) + O(x^100)) \\ Colin Barker, Aug 15 2014

Formula

a(n) = 3*A006100(n).
From Colin Barker, Aug 15 2014: (Start)
a(n) = (3-4*3^n+9^n)/16.
a(n) = 13*a(n-1)-39*a(n-2)+27*a(n-3).
G.f.: -3*x^2 / ((x-1)*(3*x-1)*(9*x-1)). (End)

A128119 Square array T(n,m) read by antidiagonals: number of sublattices of index m in generic n-dimensional lattice.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 7, 4, 1, 1, 15, 13, 7, 1, 1, 31, 40, 35, 6, 1, 1, 63, 121, 155, 31, 12, 1, 1, 127, 364, 651, 156, 91, 8, 1, 1, 255, 1093, 2667, 781, 600, 57, 15, 1, 1, 511, 3280, 10795, 3906, 3751, 400, 155, 13, 1, 1, 1023, 9841, 43435, 19531, 22932, 2801, 1395, 130, 18, 1
Offset: 1

Views

Author

Ralf Stephan, May 09 2007

Keywords

Comments

Differs from sum of divisors of m^(n-1) in 4th column!

Examples

			Array starts:
1,1,1,1,1,1,1,1,1,
1,3,4,7,6,12,8,15,13,
1,7,13,35,31,91,57,155,130,
1,15,40,155,156,600,400,1395,1210,
1,31,121,651,781,3751,2801,11811,11011,
1,63,364,2667,3906,22932,19608,97155,99463,
1,127,1093,10795,19531,138811,137257,788035,896260,
1,255,3280,43435,97656,836400,960800,6347715,8069620,
		

References

  • Günter Scheja, Uwe Storch, Lehrbuch der Algebra, Teil 2. BG Teubner, Stuttgart, 1988. [§63, Aufg. 13]

Crossrefs

Programs

  • Mathematica
    T[n_, m_] := If[m == 1, 1, Product[{p, e} = pe; (p^(e+j)-1)/(p^j-1), {pe, FactorInteger[m]}, {j, 1, n-1}]];
    Table[T[n-m+1, m], {n, 1, 11}, {m, 1, n}] // Flatten (* Jean-François Alcover, Dec 10 2018 *)
  • PARI
    T(n,m)=local(k,v);v=factor(m);k=matsize(v)[1];prod(i=1,k,prod(j=1,n-1,(v[i,1]^(v[i,2]+j)-1)/(v[i,1]^j-1)))

Formula

Dirichlet g.f. of n-th row: Product_{i=0..n-1} zeta(s-i).
If m is squarefree, T(n,m) = A000203(m^(n-1)). - Álvar Ibeas, Jan 17 2015
T(n, Product(p^e)) = Product(Gaussian_poly[e+n-1, e]p). - _Álvar Ibeas, Oct 31 2015

Extensions

Edited by Charles R Greathouse IV, Oct 28 2009

A021694 Expansion of 1/((1-x)(1-3x)(1-9x)(1-11x)).

Original entry on oeis.org

1, 24, 394, 5544, 71995, 891408, 10701748, 125788848, 1456313749, 16673208552, 189289198462, 2135136588312, 23963101915663, 267883518461856, 2985323286760936, 33185997429018336, 368172943255604137
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A006100, A018091 (first differences).

Programs

  • Magma
    m:=20; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-x)*(1-3*x)*(1-9*x)*(1-11*x)))); // Bruno Berselli, May 07 2013
  • Mathematica
    CoefficientList[Series[1/((1 - x) (1 - 3 x) (1 - 9 x) (1 - 11 x)), {x, 0, 20}], x] (* Bruno Berselli, May 07 2013 *)
    LinearRecurrence[{24,-182,456,-297},{1,24,394,5544},20] (* Harvey P. Dale, Mar 01 2022 *)
  • PARI
    Vec(1/((1-x)*(1-3*x)*(1-9*x)*(1-11*x))+O(x^20)) \\ Bruno Berselli, May 07 2013
    

Formula

G.f.: 1/((1-x)*(1-3*x)*(1-9*x)*(1-11*x)).
a(n) = -1/160 +3^(n+2)/32 -3^(2n+5)/32 +11^(n+3)/160. [Bruno Berselli, May 07 2013]
a(n)-11*a(n-1) = A006100(n+2). [Bruno Berselli, May 08 2013]

A099583 a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k-1)*2^(n-k-1)*(3/2)^(k-1).

Original entry on oeis.org

0, 0, 1, 2, 10, 26, 91, 260, 820, 2420, 7381, 22022, 66430, 198926, 597871, 1792520, 5380840, 16139240, 48427561, 145272842, 435848050, 1307514626, 3922632451, 11767808780, 35303692060, 105910810460, 317733228541, 953198888462
Offset: 0

Views

Author

Paul Barry, Oct 23 2004

Keywords

Comments

In general, a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k-1)*u^(n-k-1)*(v/u)^(k-1) has g.f. x^2/((1-v*x^2)(1-u*x-v*x^2)) and satisfies the recurrence a(n) = u*a(n-1) + 2v*a(n-2) - u*v*a(n-3) - v^2*a(n-4).

Crossrefs

Programs

  • Magma
    I:=[0,0,1,2]; [n le 4 select I[n] else 2*Self(n-1) +6*Self(n-2) -6*Self(n-3) -9*Self(n-4): n in [1..41]]; // G. C. Greubel, Jul 22 2022
    
  • Mathematica
    LinearRecurrence[{2,6,-6,-9}, {0,0,1,2}, 40] (* G. C. Greubel, Jul 22 2022 *)
  • PARI
    a(n) = sum(k=0, n\2, binomial(n-k, k-1)*2^(n-k-1)*(3/2)^(k-1)); \\ Michel Marcus, Jan 20 2018
    
  • SageMath
    [(1/8)*(3^n -(-1)^n -2*(1-(-1)^n)*3^((n-1)/2)) for n in (0..40)] # G. C. Greubel, Jul 22 2022

Formula

G.f.: x^2/((1-3*x^2)*(1-2*x-3*x^2)).
a(n) = 2*a(n-1) + 6*a(n-2) - 6*a(n-3) - 9*a(n-4).
a(n) = A002452(n/2) if n even; a(n) = 2*A006100((n+1)/2) if n odd. - R. J. Mathar, Jun 06 2010
a(0)=0, a(1)=0; a(2)=1; a(n) = 2*a(n-1) + 3*a(n-2) if n is odd; a(n) = 2*a(n-1) + 3*a(n-2) + 3^m (m=1,2,3...) if n is even. - Vincenzo Librandi, Jun 26 2010
From G. C. Greubel, Jul 22 2022: (Start)
a(n) = (1/8)*(3^n - (-1)^n - 2*(1-(-1)^n)*3^((n-1)/2) ).
E.g.f.: (1/12)*(3*exp(x)*sinh(2*x) - 2*sqrt(3)*sinh(sqrt(3)*x)). (End)

A109774 a(n) = (3^(n-1) - 1) * (3^n - 1)/2.

Original entry on oeis.org

0, 8, 104, 1040, 9680, 88088, 795704, 7170080, 64556960, 581091368, 5230058504, 47071235120, 423643241840, 3812795553848, 34315179116504, 308836669444160, 2779530197184320, 25015772291219528, 225141952170657704, 2026277574184965200, 18236498181611824400
Offset: 1

Views

Author

R. K. Guy, Aug 14 2005

Keywords

Crossrefs

Cf. A006100.

Programs

Formula

From R. J. Mathar, Nov 07 2015: (Start)
G.f.: -8*x^2/((x - 1)*(3*x - 1)*(9*x - 1)).
a(n) = 8*A006100(n). (End)
E.g.f.: exp(x)*(3 - 4*exp(2*x) + exp(8*x))/6. - Stefano Spezia, Apr 03 2023

Extensions

a(21) from Stefano Spezia, Apr 03 2023

A177730 Expansion of (6*x + 1) / ((x - 1)*(2*x - 1)*(4*x - 1)*(8*x - 1)).

Original entry on oeis.org

1, 21, 245, 2325, 20181, 168021, 1370965, 11075925, 89042261, 714081621, 5719635285, 45785027925, 366392038741, 2931583636821, 23454458533205, 187642826282325, 1501171242849621, 12009484474209621, 96076333921424725, 768612503886583125, 6148907361161794901
Offset: 0

Views

Author

Roger L. Bagula, May 12 2010

Keywords

Crossrefs

Programs

  • GAP
    a := List([0..200],n->((2^(n+1)-1)^2*(2^(n+2)-1))/3); # Muniru A Asiru, Jan 27 2018
    
  • Maple
    a := seq(((2^(n+1)-1)^2 * (2^(n+2)-1))/3, n = 0..200); # Muniru A Asiru, Jan 27 2018
  • Mathematica
    CoefficientList[Series[(6x+1)/((x-1)(2x-1)(4x-1)(8x-1)),{x,0,30}],x] (* or *) LinearRecurrence[{15,-70,120,-64},{1,21,245,2325},30] (* Harvey P. Dale, Jul 16 2018 *)
  • PARI
    Vec((6*x + 1) / ((x - 1)*(2*x - 1)*(4*x - 1)*(8*x - 1)) + O(x^30)) \\ Colin Barker, Jan 27 2018

Formula

From Colin Barker, Jan 27 2018: (Start)
a(n) = ((2^(n+1)-1)^2 * (2^(n+2)-1)) / 3.
a(n) = 15*a(n-1) - 70*a(n-2) + 120*a(n-3) - 64*a(n-4) for n>3.
(End)

Extensions

Heavily edited, with the blessing of Michel Marcus and Joerg Arndt, by Colin Barker, Jan 27 2018
Showing 1-9 of 9 results.