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

A007051 a(n) = (3^n + 1)/2.

Original entry on oeis.org

1, 2, 5, 14, 41, 122, 365, 1094, 3281, 9842, 29525, 88574, 265721, 797162, 2391485, 7174454, 21523361, 64570082, 193710245, 581130734, 1743392201, 5230176602, 15690529805, 47071589414, 141214768241, 423644304722, 1270932914165, 3812798742494, 11438396227481
Offset: 0

Views

Author

Keywords

Comments

Number of ordered trees with n edges and height at most 4.
Number of palindromic structures using a maximum of three different symbols. - Marks R. Nester
Number of compositions of all even natural numbers into n parts <= 2 (0 is counted as a part), see example. - Adi Dani, May 14 2011
Consider the mapping f(a/b) = (a + 2*b)/(2*a + b). Taking a = 1, b = 2 to start with, and carrying out this mapping repeatedly on each new (reduced) rational number gives the sequence 1/2, 4/5, 13/14, 40/41, ... converging to 1. The sequence contains the denominators = (3^n+1)/2. The same mapping for N, i.e., f(a/b) = (a + N*b)/(a+b) gives fractions converging to N^(1/2). - Amarnath Murthy, Mar 22 2003
Second binomial transform of the expansion of cosh(x). - Paul Barry, Apr 05 2003
The sequence (1, 1, 2, 5, ...) = 3^n/6 + 1/2 + 0^n/3 has binomial transform A007581. - Paul Barry, Jul 20 2003
Number of (s(0), s(1), ..., s(2n+2)) such that 0 < s(i) < 6 and |s(i) - s(i-1)| = 1 for i = 1, 2, ..., 2n+2, s(0) = 1, s(2n+2) = 1. - Herbert Kociemba, Jun 10 2004
Density of regular language L over {1,2,3}^* (i.e., number of strings of length n in L) described by regular expression 11*+11*2(1+2)*+11*2(1+2)*3(1+2+3)*. - Nelma Moreira, Oct 10 2004
Sums of rows of the triangle in A119258. - Reinhard Zumkeller, May 11 2006
Number of n-words from the alphabet A = {a,b,c} which contain an even number of a's. - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Aug 30 2006
Let P(A) be the power set of an n-element set A. Then a(n) = the number of pairs of elements {x,y} of P(A) for which either 0) x and y are disjoint and for which x is not a subset of y and y is not a subset of x, or 1) x = y. - Ross La Haye, Jan 10 2008
a(n+1) gives the number of primitive periodic multiplex juggling sequences of length n with base state <2>. - Steve Butler, Jan 21 2008
a(n) is also the number of idempotent order-preserving and order-decreasing partial transformations (of an n-chain). - Abdullahi Umar, Oct 02 2008
Equals row sums of triangle A147292. - Gary W. Adamson, Nov 05 2008
Equals leftmost column of A071919^3. - Gary W. Adamson, Apr 13 2009
A010888(a(n))=5 for n >= 2, that is, the digital root of the terms >= 5 equals 5. - Parthasarathy Nambi, Jun 03 2009
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=5, (i>1), A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n-1)=(-1)^n*charpoly(A,2). - Milan Janjic, Jan 27 2010
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=6, (i>1), A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n)=(-1)^(n-1)*charpoly(A,3). - Milan Janjic, Feb 21 2010
It appears that if s(n) is a rational sequence of the form s(1)=2, s(n)= (2*s(n-1)+1)/(s(n-1)+2), n>1 then s(n)=a(n)/(a(n-1)-1).
Form an array with m(1,n)=1 and m(i,j) = Sum_{k=1..i-1} m(k,j) + Sum_{k=1..j-1} m(i,k), which is the sum of the terms to the left of m(i,j) plus the sum above m(i,j). The sum of the terms in antidiagonal(n-1) = a(n). - J. M. Bergot, Jul 16 2013
From Peter Bala, Oct 29 2013: (Start)
An Engel expansion of 3 to the base b := 3/2 as defined in A181565, with the associated series expansion 3 = b + b^2/2 + b^3/(2*5) + b^4/(2*5*14) + .... Cf. A034472.
More generally, for a positive integer n >= 3, the sequence [1, n - 1, n^2 - n - 1, ..., ( (n - 2)*n^k + 1 )/(n - 1), ...] is an Engel expansion of n/(n - 2) to the base n/(n - 1). Cases include A007583 (n = 4), A083065 (n = 5) and A083066 (n = 6). (End)
Diagonal elements (and one more than antidiagonal elements) of the matrix A^n where A=(2,1;1,2). - David Neil McGrath, Aug 17 2014
From M. Sinan Kul, Sep 07 2016: (Start)
a(n) is equal to the number of integer solutions to the following equation when x is equal to the product of n distinct primes: 1/x = 1/y + 1/z where 0 < x < y <= z.
If z = k*y where k is a fraction >= 1 then the solutions can be given as: y = ((k+1)/k)*x and z = (k+1)*x.
Here k can be equal to any divisor of x or to the ratio of two divisors.
For example for x = 2*3*5 = 30 (product of three distinct primes), k would have the following 14 values: 1, 6/5, 3/2, 5/3, 2, 5/2, 3, 10/3, 5, 6, 15/2, 10, 15, 30.
As an example for k = 10/3, we would have y=39, z=130 and 1/39 + 1/130 = 1/30.
Here finding the number of fractions would be equivalent to distributing n balls (distinct primes) to two bins (numerator and denominator) with no empty bins which can be found using Stirling numbers of the second kind. So another definition for a(n) is: a(n) = 2^n + Sum_{i=2..n} Stirling2(i,2)*binomial(n,i).
(End)
a(n+1) is the smallest i for which the Catalan number C(i) (see A000108) is divisible by 3^n for n > 0. This follows from the rule given by Franklin T. Adams-Watters for determining the multiplicity with which a prime divides C(n). We need to find the smallest number in base 3 to achieve a given count. Applied to prime 3, 1 is the smallest digit that counts but requires to be followed by 2 which cannot be at the end to count. Therefore the number in base 3 of the form 1{n-1 times}20 = (3^(n+1) + 1)/2 + 1 = a(n+1)+1 is the smallest number to achieve count n which implies the claim. - Peter Schorn, Mar 06 2020
Let A be a Toeplitz matrix of order n, defined by: A[i,j]=1, if ij; A[i,i]=2. Then, for n>=1, a(n) = det A. - Dmitry Efimov, Oct 28 2021
a(n) is the least number k such that A065363(k) = -(n-1), for n > 0. - Amiram Eldar, Sep 03 2022

Examples

			From _Adi Dani_, May 14 2011: (Start)
a(3)=14 because all compositions of even natural numbers into 3 parts <=2 are
for 0: (0,0,0)
for 2: (0,1,1), (1,0,1), (1,1,0), (0,0,2), (0,2,0), (2,0,0)
for 4: (0,2,2), (2,0.2), (2,2,0), (1,1,2), (1,2,1), (2,1,1)
for 6: (2,2,2).
(End)
		

References

  • J. M. Borwein, D. H. Bailey and R. Girgensohn, Experimentation in Mathematics, A K Peters, Ltd., Natick, MA, 2004. x+357 pp. See p. 47.
  • Adi Dani, Quasicompositions of natural numbers, Proceedings of III congress of mathematicians of Macedonia, Struga Macedonia 29 IX -2 X 2005 pages 225-238.
  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section E11.
  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]
  • P. Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 60.
  • P. Ribenboim, The Little Book of Big Primes, Springer-Verlag, NY, 1991, p. 53.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

Formula

a(n) = 3*a(n-1) - 1.
Binomial transform of Chebyshev coefficients A011782. - Paul Barry, Mar 16 2003
From Paul Barry, Mar 16 2003: (Start)
a(n) = 4*a(n-1) - 3*a(n-2) for n > 1, a(0)=1, a(1)=2.
G.f.: (1 - 2*x)/((1 - x)*(1 - 3*x)). (End)
E.g.f.: exp(2*x)*cosh(x). - Paul Barry, Apr 05 2003
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2*k)*2^(n-2*k). - Paul Barry, May 08 2003
This sequence is also the partial sums of the first 3 Stirling numbers of second kind: a(n) = S(n+1, 1) + S(n+1, 2) + S(n+1, 3) for n >= 0; alternatively it is the number of partitions of [n+1] into 3 or fewer parts. - Mike Zabrocki, Jun 21 2004
For c=3, a(n) = (c^n)/c! + Sum_{k=1..c-2}((k^n)/k!*(Sum_{j=2..c-k}(((-1)^j)/j!))) or = Sum_{k=1..c} g(k, c)*k^n where g(1, 1) = 1, g(1, c) = g(1, c-1) + ((-1)^(c-1))/(c-1)! for c > 1, and g(k, c) = g(k-1, c-1)/k for c > 1 and 2 <= k <= c. - Nelma Moreira, Oct 10 2004
The i-th term of the sequence is the entry (1, 1) in the i-th power of the 2 X 2 matrix M = ((2, 1), (1, 2)). - Simone Severini, Oct 15 2005
If p[i]=fibonacci(2i-3) and if A is the Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n-1)= det A. - Milan Janjic, May 08 2010
INVERT transform of A001519: [1, 1, 2, 5, 13, 34, ...]. - Gary W. Adamson, Jun 13 2011
a(n) = M^n*[1,1,1,0,0,0,...], leftmost column term; where M = an infinite bidiagonal matrix with all 1's in the superdiagonal and (1,2,3,...) in the main diagonal and the rest zeros. - Gary W. Adamson, Jun 23 2011
a(n) = M^n*[1,1,1,0,0,0,...], top entry term; where M is an infinite bidiagonal matrix with all 1's in the superdiagonal, (1,2,3,...) as the main diagonal, and the rest zeros. - Gary W. Adamson, Jun 24 2011
a(n) = A201730(n,0). - Philippe Deléham, Dec 05 2011
a(n) = A006342(n) + A006342(n-1). - Yuchun Ji, Sep 19 2018
From Dmitry Efimov, Oct 29 2021: (Start)
a(2*m+1) = Product_{k=-m..m} (2+i*tan(Pi*k/(2*m+1))),
a(2*m) = Product_{k=-m..m-1} (2+i*tan(Pi*(2*k+1)/(4*m))),
where i is the imaginary unit. (End)

A108411 a(n) = 3^floor(n/2). Powers of 3 repeated.

Original entry on oeis.org

1, 1, 3, 3, 9, 9, 27, 27, 81, 81, 243, 243, 729, 729, 2187, 2187, 6561, 6561, 19683, 19683, 59049, 59049, 177147, 177147, 531441, 531441, 1594323, 1594323, 4782969, 4782969, 14348907, 14348907, 43046721, 43046721, 129140163, 129140163, 387420489, 387420489, 1162261467
Offset: 0

Views

Author

Ralf Stephan, Jun 05 2005

Keywords

Comments

a(n) is the Parker sequence for the automorphism group of the limit of the class of oriented graphs; a(n) counts the finite circulant structures in that class. - N-E. Fahssi, Feb 18 2008
Complete sequence: every positive integer is the sum of members of this sequence. - Charles R Greathouse IV, Jul 19 2012
Conjecture: a(n+1) is the number of distinct subsets S of {0,1,2,...,n} such that the sumset S+S does not contain n. - Michael Chu, Oct 05 2021. Andrew Howroyd, Nov 20 2021: The conjecture is true: If there are m pairs of numbers that add to n then inclusion/exclusion gives sum(k=0, m, binomial(m,k)*(-1)^k*2^(2*m-2*k)) as the number of sets that don't contain any of those pairs which equals 3^m. For even n , n/2 cannot be included in any set.
Also, number of walks of length n in the graph K_{1,3} (the graph with edges {1,2}, {1,3}, {1,4}) starting at one of the degree 1 vertices. - Sean A. Irvine, May 30 2025

Examples

			a(6) = 27; 3^floor(6/2) = 3^floor(3) = 3^3 = 27.
		

Crossrefs

Essentially the same as A056449 and A162436.

Programs

Formula

O.g.f.: (1+x)/(1-3*x^2). - R. J. Mathar, Apr 01 2008
a(n) = 3^(n/2)*((1+(-1)^n)/2+(1-(-1)^n)/(2*sqrt(3))). - Paul Barry, Nov 12 2009
a(n+3) = a(n+2)*a(n+1)/a(n). - Reinhard Zumkeller, Mar 04 2011
a(n) = (-1)^n*sum(A158020(n,k)*2^k, 0<=k<=n). - Philippe Deléham, Dec 01 2011
a(n) = sum(A152815(n,k)*2^k, 0<=k<=n). - Philippe Deléham, Apr 22 2013
a(n) = 3^A004526(n). - Michel Marcus, Aug 30 2014
E.g.f.: cosh(sqrt(3)*x) + sinh(sqrt(3)*x)/sqrt(3). - Stefano Spezia, Dec 31 2022

Extensions

Incorrect formula removed by Michel Marcus, Oct 06 2021

A162436 a(n) = 3*a(n-2) for n > 2; a(1) = 1, a(2) = 3.

Original entry on oeis.org

1, 3, 3, 9, 9, 27, 27, 81, 81, 243, 243, 729, 729, 2187, 2187, 6561, 6561, 19683, 19683, 59049, 59049, 177147, 177147, 531441, 531441, 1594323, 1594323, 4782969, 4782969, 14348907, 14348907, 43046721, 43046721, 129140163, 129140163, 387420489, 387420489, 1162261467
Offset: 1

Views

Author

Klaus Brockhaus, Jul 03 2009, Jul 05 2009

Keywords

Comments

Interleaving of A000244 and 3*A000244.
Unsigned version of A128019.
Partial sums are in A164123.
Apparently a(n) = A056449(n-1) for n > 1. a(n) = A108411(n) for n >= 1.
Binomial transform is A026150 without initial 1, second binomial transform is A001834, third binomial transform is A030192, fourth binomial transform is A161728, fifth binomial transform is A162272.

Crossrefs

Cf. A000244 (powers of 3), A128019 (expansion of (1-3x)/(1+3x^2)), A164123, A026150, A001834, A030192, A161728, A162272.
Essentially the same as A056449 (3^floor((n+1)/2)) and A108411 (powers of 3 repeated).

Programs

  • Magma
    [ n le 2 select 2*n-1 else 3*Self(n-2): n in [1..35] ];
    
  • Mathematica
    CoefficientList[Series[(-3*x - 1)/(3*x^2 - 1), {x, 0, 200}], x] (* Vladimir Joseph Stephan Orlovsky, Jun 10 2011 *)
    Transpose[NestList[{Last[#],3*First[#]}&,{1,3},40]][[1]] (* or *) With[{c= 3^Range[20]},Join[{1},Riffle[c,c]]](* Harvey P. Dale, Feb 17 2012 *)
  • PARI
    a(n)=3^(n>>1) \\ Charles R Greathouse IV, Jul 15 2011

Formula

a(n) = 3^((1/4)*(2*n - 1 + (-1)^n)).
G.f.: x*(1 + 3*x)/(1 - 3*x^2).
a(n+3) = a(n+2)*a(n+1)/a(n). - Reinhard Zumkeller, Mar 04 2011
E.g.f.: cosh(sqrt(3)*x) - 1 + sinh(sqrt(3)*x)/sqrt(3). - Stefano Spezia, Dec 31 2022

Extensions

G.f. corrected, formula simplified, comments added by Klaus Brockhaus, Sep 18 2009

A032120 Number of reversible strings with n beads of 3 colors.

Original entry on oeis.org

1, 3, 6, 18, 45, 135, 378, 1134, 3321, 9963, 29646, 88938, 266085, 798255, 2392578, 7177734, 21526641, 64579923, 193720086, 581160258, 1743421725, 5230265175, 15690618378, 47071855134, 141215033961, 423645101883
Offset: 0

Views

Author

Keywords

Comments

"BIK" (reversible, indistinct, unlabeled) transform of 3, 0, 0, 0, ...
a(n) is the dimension of the homogeneous component of degree n of the free unital special Jordan algebra on 3 generators (this follows from Cohn 1959). Note that this is no longer true for 4 generators and further. - Vladimir Dotsenko, Mar 31 2025

Examples

			For a(2)=6, the three achiral strings are AA, BB, CC; the three (equivalent) chiral pairs are AB-BA, AC-CA, BC-CB.
In the language of special Jordan algebras, the three latter correspond to the Jordan products (AB+BA)/2, (AC+CA)/2, (BC+CB)/2.
		

Crossrefs

Column 3 of A277504.
Cf. A000244 (oriented), A032086(n>1) (chiral), A056449 (achiral), A382233 (free Jordan algebras).

Programs

  • Magma
    I:=[1, 3, 6]; [n le 3 select I[n] else 3*Self(n-1)+3*Self(n-2)-9*Self(n-3): n in [1..25]]; // Vincenzo Librandi, Apr 22 2012
    
  • Mathematica
    f[n_] := If[EvenQ[n], (3^n + 3^(n/2))/2, (3^n + 3^Ceiling[n/2])/2];
    Table[f[n],{n,0,25}] (* Geoffrey Critzer, Apr 24 2011 *)
    CoefficientList[Series[(1-6x^2)/((1-3x) (1-3x^2)), {x, 0, 30}], x] (* Vincenzo Librandi, Apr 22 2012 *) (* Adapted to offset 0 by Robert A. Russell, Nov 10 2018 *)
    Table[(1/2) ((2 - (-1)^n) 3^Floor[n/2] + 3^n), {n, 0, 25}] (* Bruno Berselli, Apr 22 2012 *)
    LinearRecurrence[{3, 3, -9}, {1, 3, 6}, 31] (* Robert A. Russell, Nov 10 2018 *)
  • PARI
    a(n) = (3^n + 3^(ceil(n/2)))/2; \\ Andrew Howroyd, Oct 10 2017

Formula

a(n) = (1/2)*((2-(-1)^n)*3^floor(n/2) + 3^n). - Ralf Stephan, May 11 2004
For n>0, a(n) = 3 * A001444(n-1). - N. J. A. Sloane, Sep 22 2004
From Colin Barker, Apr 02 2012: (Start)
a(n) = 3*a(n-1) + 3*a(n-2) - 9*a(n-3).
G.f.: (1-6x^2) / ((1-3x)*(1-3x^2)). (End) [Adapted to offset 0 by Robert A. Russell, Nov 10 2018]
a(n) = (1/2)*(3^(ceiling(n/2)) + 3^n). - Andrew Howroyd, Oct 10 2017
a(n) = (A000244(n) + A056449(n)) / 2. - Robert A. Russell, Nov 10 2018

Extensions

a(0)=1 prepended by Robert A. Russell, Nov 10 2018

A056454 Number of palindromes of length n using exactly three different symbols.

Original entry on oeis.org

0, 0, 0, 0, 6, 6, 36, 36, 150, 150, 540, 540, 1806, 1806, 5796, 5796, 18150, 18150, 55980, 55980, 171006, 171006, 519156, 519156, 1569750, 1569750, 4733820, 4733820, 14250606, 14250606, 42850116, 42850116, 128746950, 128746950, 386634060, 386634060, 1160688606
Offset: 1

Views

Author

Keywords

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2.]

Crossrefs

Programs

  • Magma
    [StirlingSecond((n+1) div 2, 3)*Factorial(3): n in [1..40]]; // Vincenzo Librandi, Sep 26 2018
  • Maple
    A056454:= n-> 3!*Stirling2(floor((n+1)/2),3); # (C. Ronaldo)
  • Mathematica
    LinearRecurrence[{1,5,-5,-6,6},{0,0,0,0,6},40] (* Harvey P. Dale, Sep 02 2016 *)
    k=3; Table[k! StirlingS2[Ceiling[n/2],k],{n,1,30}] (* Robert A. Russell, Sep 25 2018 *)
  • PARI
    a(n) = 3!*stirling((n+1)\2, 3, 2); \\ Altug Alkan, Sep 25 2018
    

Formula

a(n) = 3! * Stirling2( [(n+1)/2], 3).
G.f.: 6*x^5/((1-x)*(1-2*x^2)*(1-3*x^2)). - Colin Barker, May 05 2012
G.f.: k!(x^(2k-1)+x^(2k))/Product_{i=1..k}(1-i*x^2), where k=3 is the number of symbols. - Robert A. Russell, Sep 25 2018

A321391 Array read by antidiagonals: T(n,k) is the number of achiral rows of n colors using up to k colors.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 2, 1, 0, 1, 4, 3, 4, 1, 0, 1, 5, 4, 9, 4, 1, 0, 1, 6, 5, 16, 9, 8, 1, 0, 1, 7, 6, 25, 16, 27, 8, 1, 0, 1, 8, 7, 36, 25, 64, 27, 16, 1, 0, 1, 9, 8, 49, 36, 125, 64, 81, 16, 1, 0, 1, 10, 9, 64, 49, 216, 125, 256, 81, 32, 1, 0
Offset: 0

Views

Author

Robert A. Russell, Nov 08 2018

Keywords

Comments

The antidiagonals go from top-right to bottom-left.

Examples

			The array begins with T(0,0):
1 1  1   1    1     1     1      1      1      1       1       1 ...
0 1  2   3    4     5     6      7      8      9      10      11 ...
0 1  2   3    4     5     6      7      8      9      10      11 ...
0 1  4   9   16    25    36     49     64     81     100     121 ...
0 1  4   9   16    25    36     49     64     81     100     121 ...
0 1  8  27   64   125   216    343    512    729    1000    1331 ...
0 1  8  27   64   125   216    343    512    729    1000    1331 ...
0 1 16  81  256   625  1296   2401   4096   6561   10000   14641 ...
0 1 16  81  256   625  1296   2401   4096   6561   10000   14641 ...
0 1 32 243 1024  3125  7776  16807  32768  59049  100000  161051 ...
0 1 32 243 1024  3125  7776  16807  32768  59049  100000  161051 ...
0 1 64 729 4096 15625 46656 117649 262144 531441 1000000 1771561 ...
For T(3,3)=9, the rows are AAA, ABA, ACA, BAB, BBB, BCB, CAC, CBC, and CCC.
		

Crossrefs

Cf. A003992 (oriented), A277504 (unoriented), A293500 (chiral).

Programs

  • Mathematica
    Table[If[n>0, (n-k)^Ceiling[k/2], 1], {n, 0, 12}, {k, 0, n}] // Flatten

Formula

T(n,k) = [n==0] + [n>0] * k^ceiling(n/2).
The generating function for column k is (1+k*x) / (1-k*x^2).

A032086 Number of reversible strings with n beads of 3 colors. If more than 1 bead, not palindromic.

Original entry on oeis.org

3, 3, 9, 36, 108, 351, 1053, 3240, 9720, 29403, 88209, 265356, 796068, 2390391, 7171173, 21520080, 64560240, 193700403, 581101209, 1743362676, 5230088028, 15690441231, 47071323693, 141214502520, 423643507560
Offset: 1

Views

Author

Keywords

Crossrefs

Column 3 of A293500 for n>1.
Cf. A032120.

Programs

  • Mathematica
    Join[{3}, LinearRecurrence[{3, 3, -9}, {3, 9, 36}, 24]] (* Jean-François Alcover, Oct 11 2017 *)
  • PARI
    a(n) = if(n<2, [3][n], (3^n - 3^(ceil(n/2)))/2); \\ Andrew Howroyd, Oct 10 2017

Formula

"BHK" (reversible, identity, unlabeled) transform of 3, 0, 0, 0, ...
Conjectures from Colin Barker, Apr 02 2012: (Start)
a(n) = 3*a(n-1) + 3*a(n-2) - 9*a(n-3) for n > 4.
G.f.: 3*x*(1 - 2*x - 3*x^2 + 9*x^3)/((1 - 3*x)*(1 - 3*x^2)).
(End)
Conjectures from Colin Barker, Mar 09 2017: (Start)
a(n) = (2*3^n - 2*3^(n/2)) / 4 for n > 2 and even.
a(n) = (2*3^n - 2*3^((n+1)/2)) / 4 for n > 2 and odd.
(End)
The above conjectures are true: The second set follows from the definition and the first set can be derived from that. - Andrew Howroyd, Oct 10 2017
a(n) = (3^n - 3^(ceiling(n/2))) / 2 = (A000244(n) - A056449(n)) / 2 for n>1. - Robert A. Russell and Danny Rorabaugh, Jun 22 2018

A056459 Number of primitive (aperiodic) palindromes using a maximum of three different symbols.

Original entry on oeis.org

3, 0, 6, 6, 24, 18, 78, 72, 234, 216, 726, 696, 2184, 2106, 6528, 6480, 19680, 19422, 59046, 58800, 177060, 176418, 531438, 530640, 1594296, 1592136, 4782726, 4780776, 14348904, 14342112, 43046718, 43040160, 129139428, 129120480, 387420384, 387400104, 1162261464, 1162202418, 3486782208
Offset: 1

Views

Author

Keywords

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

Cf. A056449.
Column 3 of A284823.

Programs

  • PARI
    a(n) = sumdiv(n, d, moebius(d)*3^((1 + n/d)\2));
    for(n=1, 40, print1(a(n), ",")); \\ Petros Hadjicostas, Apr 24 2020

Formula

a(n) = Sum_{d | n} mu(d)*A056449(n/d).

Extensions

More terms from Petros Hadjicostas, Apr 24 2020

A129529 Triangle read by rows: T(n,k) is the number of ternary words of length n on {0,1,2} that have k inversions (n >= 0, k >= 0).

Original entry on oeis.org

1, 3, 6, 3, 10, 8, 8, 1, 15, 15, 21, 18, 9, 3, 21, 24, 39, 45, 48, 30, 24, 9, 3, 28, 35, 62, 82, 107, 108, 101, 81, 62, 37, 17, 8, 1, 36, 48, 90, 129, 186, 222, 264, 252, 255, 219, 183, 126, 90, 48, 27, 9, 3, 45, 63, 123, 186, 285, 372, 492, 561, 624, 648, 651, 597, 537, 435, 336, 249, 165, 99, 54, 27, 9, 3
Offset: 0

Views

Author

Emeric Deutsch, Apr 22 2007

Keywords

Comments

Row n has 1 + floor(n^2/3) terms.
Row sums are equal to 3^n = A000244(n).
Alternating row sums are 3^(ceiling(n/2)) = A108411(n+1).
This sequence is mentioned in the Andrews-Savage-Wilf paper. - Omar E. Pol, Jan 30 2012

Examples

			T(3,2) = 8 because we have 100, 110, 120, 200, 201, 211, 220 and 221.
Triangle starts:
   1;
   3;
   6,  3;
  10,  8,  8,  1;
  15, 15, 21, 18,  9,  3;
  21, 24, 39, 45, 48, 30, 24,  9,  3;
  ...
		

References

  • M. Bona, Combinatorics of Permutations, Chapman & Hall/CRC, Boca Raton, FL, 2004, pp. 57-61.
  • G. E. Andrews, The Theory of Partitions, Addison-Wesley, 1976.

Crossrefs

Programs

  • Maple
    for n from 0 to 40 do br[n]:=sum(q^i,i=0..n-1) od: for n from 0 to 40 do f[n]:=simplify(product(br[j],j=1..n)) od: mbr:=(n,a,b,c)->simplify(f[n]/f[a]/f[b]/f[c]): for n from 0 to 9 do G[n]:=sort(simplify(sum(sum(mbr(n,a,b,n-a-b),b=0..n-a),a=0..n))) od: for n from 0 to 9 do seq(coeff(G[n],q,j),j=0..floor(n^2/3)) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, l) option remember; `if`(n=0, 1, add(expand(b(n-1, `if`(j<3,
          subsop(j=l[j]+1, l), l)))*x^([0, l[1], l[1]+l[2]][j]), j=1..3))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [0$2])):
    seq(T(n), n=0..10);  # Alois P. Heinz, Feb 12 2025
  • Mathematica
    b[n_, l_] := b[n, l] =
       If[n == 0, 1, Sum[Expand[b[n-1, If[j < 3, ReplacePart[l, j -> l[[j]]+1], l]]]*x^({0, l[[1]], l[[1]]+l[[2]]}[[j]]), {j, 1, 3}]];
    T[n_] := With[{p = b[n, {0, 0}]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]];
    Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Apr 13 2025, after Alois P. Heinz *)

Formula

T(n,0) = (n+1)*(n+2)/2 = A000217(n+1).
Sum_{k>=0} k*T(n,k) = 3^(n-1)*n*(n-1)/2 = A129530(n).
Generating polynomial of row n is Sum_{i=0..n} Sum_{j=0..n-i} binomial[n; i,j,n-i-j], where binomial[n;a,b,c] (a+b+c=n) is a q-multinomial coefficient.
Sum_{k=0..floor(n^2/3)} (-1)^k * T(n,k) = A056449(n). - Alois P. Heinz, Feb 12 2025

A242278 Number of non-palindromic n-tuples of 3 distinct elements.

Original entry on oeis.org

0, 6, 18, 72, 216, 702, 2106, 6480, 19440, 58806, 176418, 530712, 1592136, 4780782, 14342346, 43040160, 129120480, 387400806, 1162202418, 3486725352, 10460176056, 31380882462, 94142647386, 282429005040, 847287015120, 2541864234006, 7625592702018, 22876787671992
Offset: 1

Views

Author

Mikk Heidemaa, Aug 16 2014

Keywords

Examples

			For n=3, the a(3)=18 solutions (non-palindromic 3-tuples) are:
{0,0,1}, {0,0,2}, {0,1,1}, {0,1,2}, {0,2,1}, {0,2,2}, {1,0,0}, {1,0,2},
{1,1,0}, {1,1,2}, {1,2,0}, {1,2,2}, {2,0,0}, {2,0,1}, {2,1,0}, {2,1,1},
{2,2,0}, {2,2,1}.
		

Crossrefs

Programs

  • Maple
    A242278:=n->(1/2)* 3^(n/2) * ((sqrt(3)-1) * (-1)^n - sqrt(3)-1) + 3^n: seq(A242278(n), n=1..28); # Wesley Ivan Hurt, Aug 17 2014.
  • Mathematica
    Table[1/2 * 3^(n/2) * ((Sqrt(3)-1) * (-1)^n - Sqrt(3)-1) + 3^n, {n, 28}]
  • PARI
    a(n)=3^n-3^ceil(n/2) \\ Charles R Greathouse IV, Dec 10 2014

Formula

a(n) = 1/2 * 3^(n/2) * ((sqrt(3)-1)*(-1)^n - sqrt(3)-1) + 3^n.
a(n) = 3^n - 3^ceiling(n/2).
a(n) = A000244(n) - A056449(n).
G.f.: (6*x) / (1 - 3*x - 3*x^2 + 9*x^3).
a(n) = 6*A167993(n). [Bruno Berselli, Aug 19 2014]
Showing 1-10 of 12 results. Next