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.

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

Original entry on oeis.org

1, 4, 4, 16, 16, 64, 64, 256, 256, 1024, 1024, 4096, 4096, 16384, 16384, 65536, 65536, 262144, 262144, 1048576, 1048576, 4194304, 4194304, 16777216, 16777216, 67108864, 67108864, 268435456, 268435456, 1073741824, 1073741824, 4294967296
Offset: 0

Views

Author

Keywords

Comments

Number of palindromes of length n using a maximum of four different symbols.
Number of achiral rows of n colors using up to four colors. - Robert A. Russell, Nov 09 2018
Interleaving of A000302 and 4*A000302.
Unsigned version of A141125.
Binomial transform is A164907. Second binomial transform is A164908. Third binomial transform is A057651. Fourth binomial transform is A016129.

Examples

			At length n=1 there are a(1)=4 palindromes, A, B, C, D.
At length n=2, there are a(2)=4 palindromes, AA, BB, CC, DD.
At length n=3, there are a(3)=16 palindromes, AAA, BBB, CCC, DDD, ABA, BAB, ... , CDC, DCD.
		

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

Column k=4 of A321391.
Cf. A016116.
Essentially the same as A213173.
Cf. A000302 (oriented), A032121 (unoriented), A032087(n>1) (chiral).

Programs

  • Magma
    [ (3*2^n-(-2)^n)/2: n in [0..31] ];
    
  • Magma
    [4^Floor((n+1)/2): n in [0..40]]; // Vincenzo Librandi, Aug 16 2011
    
  • Mathematica
    Table[4^Ceiling[n/2], {n,0,40}] (* or *)
    CoefficientList[Series[(1 + 4 x)/((1 + 2 x) (1 - 2 x)), {x, 0, 31}], x] (* or *)
    LinearRecurrence[{0, 4}, {1, 4}, 40] (* Robert A. Russell, Nov 07 2018 *)
  • PARI
    a(n)=4^((n+1)\2) \\ Charles R Greathouse IV, Apr 08 2012
    
  • PARI
    a(n)=(3*2^n-(-2)^n)/2 \\ Charles R Greathouse IV, Oct 03 2016

Formula

a(n) = 4^floor((n+1)/2).
a(n) = 4*a(n-2) for n > 1; a(0) = 1, a(1) = 4.
G.f.: (1+4*x) / (1-4*x^2). - R. J. Mathar, Jan 19 2011 [Adapted to offset 0 by Robert A. Russell, Nov 07 2018]
a(n+3) = a(n+2)*a(n+1)/a(n). - Reinhard Zumkeller, Mar 04 2011
a(n) = 4*abs(A164111(n-1)). - R. J. Mathar, Jan 19 2011
a(n) = C(4,0)*A000007(n) + C(4,1)*A057427(n) + C(4,2)*A056453(n) + C(4,3)*A056454(n) + C(4,4)*A056455(n). - Robert A. Russell, Nov 08 2018

Extensions

a(0)=1 prepended by Robert A. Russell, Nov 07 2018
Edited by N. J. A. Sloane, Sep 29 2019

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

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: 0

Views

Author

Keywords

Comments

One followed by powers of 3 with positive exponent, repeated. - Omar E. Pol, Jul 27 2009
Number of achiral rows of n colors using up to three colors. E.g., for a(3) = 9, the rows are AAA, ABA, ACA, BAB, BBB, BCB, CAC, CBC, and CCC. - Robert A. Russell, Nov 07 2018

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

Column k=3 of A321391.
Essentially the same as A108411 and A162436.
Cf. A000244 (oriented), A032120 (unoriented), A032086(n>1) (chiral).

Programs

  • Magma
    [3^Floor((n+1)/2): n in [0..40]]; // Vincenzo Librandi, Aug 16 2011
    
  • Mathematica
    Riffle[3^Range[0, 20], 3^Range[20]] (* Harvey P. Dale, Jan 21 2015 *)
    Table[3^Ceiling[n/2], {n,0,40}] (* or *)
    LinearRecurrence[{0, 3}, {1, 3}, 40] (* Robert A. Russell, Nov 07 2018 *)
  • PARI
    a(n)=3^floor((n+1)/2); \\ Joerg Arndt, Apr 23 2013
    
  • Python
    def A056449(n): return 3**(n+1>>1) # Chai Wah Wu, Oct 28 2024

Formula

G.f.: (1 + 3*x) / (1 - 3*x^2). - R. J. Mathar, Jul 06 2011 [Adapted to offset 0 by Robert A. Russell, Nov 07 2018]
a(n) = k^ceiling(n/2), where k = 3 is the number of possible colors. - Robert A. Russell, Nov 07 2018
a(n) = C(3,0)*A000007(n) + C(3,1)*A057427(n) + C(3,2)*A056453(n) + C(3,3)*A056454(n). - Robert A. Russell, Nov 08 2018
E.g.f.: cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x). - Stefano Spezia, Dec 31 2022

Extensions

Edited by N. J. A. Sloane at the suggestion of Klaus Brockhaus, Jul 03 2009
a(0)=1 prepended by Robert A. Russell, Nov 07 2018

A056451 Number of palindromes using a maximum of five different symbols.

Original entry on oeis.org

1, 5, 5, 25, 25, 125, 125, 625, 625, 3125, 3125, 15625, 15625, 78125, 78125, 390625, 390625, 1953125, 1953125, 9765625, 9765625, 48828125, 48828125, 244140625, 244140625, 1220703125, 1220703125, 6103515625, 6103515625, 30517578125, 30517578125, 152587890625, 152587890625
Offset: 0

Views

Author

Keywords

Comments

Number of achiral rows of n colors using up to five colors. For a(3) = 25, the rows are AAA, ABA, ACA, ADA, AEA, BAB, BBB, BCB, BDB, BEB, CAC, CBC, CCC, CDC, CEC, DAD, DBD, DCD, DDD, DED, EAE, EBE, ECE, EDE, and EEE. - Robert A. Russell, Nov 09 2018

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

Column k=5 of A321391.
Cf. A000351 (oriented), A032122 (unoriented), A032088(n>1) (chiral).

Programs

  • Magma
    [5^Floor((n+1)/2): n in [0..40]]; // Vincenzo Librandi, Aug 16 2011
    
  • Mathematica
    LinearRecurrence[{0,5},{1,5},30] (* or *) Riffle[5^Range[0, 20], 5^Range[20]] (* Harvey P. Dale, Jul 28 2018 *)
    Table[5^Ceiling[n/2], {n,0,40}] (* Robert A. Russell, Nov 07 2018 *)
  • PARI
    vector(40, n, n--; 5^floor((n+1)/2)) \\ G. C. Greubel, Nov 07 2018

Formula

a(n) = 5^floor((n+1)/2).
a(n) = 5*a(n-2). - Colin Barker, May 06 2012
G.f.: (1+5*x) / (1-5*x^2). - Colin Barker, May 06 2012 [Adapted to offset 0 by Robert A. Russell, Nov 07 2018]
a(n) = C(5,0)*A000007(n) + C(5,1)*A057427(n) + C(5,2)*A056453(n) + C(5,3)*A056454(n) + C(5,4)*A056455(n) + C(5,5)*A056456(n). - Robert A. Russell, Nov 08 2018
E.g.f.: cosh(sqrt(5)*x) + sqrt(5)*sinh(sqrt(5)*x). - Stefano Spezia, Jun 06 2023

Extensions

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

A056452 a(n) = 6^floor((n+1)/2).

Original entry on oeis.org

1, 6, 6, 36, 36, 216, 216, 1296, 1296, 7776, 7776, 46656, 46656, 279936, 279936, 1679616, 1679616, 10077696, 10077696, 60466176, 60466176, 362797056, 362797056, 2176782336, 2176782336, 13060694016, 13060694016, 78364164096
Offset: 0

Views

Author

Keywords

Comments

Number of achiral rows of length n using up to six different colors. For a(3) = 36, the rows are AAA, ABA, ACA, ADA, AEA, AFA, BAB, BBB, BCB, BDB, BEB, BFB, CAC, CBC, CCC, CDC, CEC, CFC, DAD, DBD, DCD, DDD, DED, DFD, EAE, EBE, ECE, EDE, EEE, EFE, FAF, FBF, FCF, FDF, FEF, and FFF. - Robert A. Russell, Nov 08 2018
Also: a(n) is the number of palindromes with n digits using a maximum of six different symbols. - David A. Corneth, Nov 09 2018

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

Column k=6 of A321391.
Cf. A016116.
Cf. A000400 (oriented), A056308 (unoriented), A320524 (chiral).

Programs

  • Magma
    [6^Floor((n+1)/2): n in [0..40]]; // Vincenzo Librandi, Aug 16 2011
  • Maple
    A056452:=n->6^floor((n+1)/2);
  • Mathematica
    Riffle[6^Range[0, 20], 6^Range[20]] (* Harvey P. Dale, Jun 18 2017 *)
    Table[6^Ceiling[n/2], {n,0,40}] (* or *)
    LinearRecurrence[{0, 6}, {1, 6}, 40] (* Robert A. Russell, Nov 08 2018 *)

Formula

a(n) = 6^floor((n+1)/2).
a(n) = 6*a(n-2). - Colin Barker, May 06 2012
G.f.: (1+6*x) / (1-6*x^2). - Colin Barker, May 06 2012 [Adapted to offset 0 by Robert A. Russell, Nov 08 2018]
a(n) = C(6,0)*A000007(n) + C(6,1)*A057427(n) + C(6,2)*A056453(n) + C(6,3)*A056454(n) + C(6,4)*A056455(n) + C(6,5)*A056456(n) + C(6,6)*A056457(n). - Robert A. Russell, Nov 08 2018

Extensions

a(0)=1 prepended by Robert A. Russell, Nov 08 2018
Name corrected by David A. Corneth, Nov 08 2018

A056310 Number of reversible strings with n beads using exactly three different colors.

Original entry on oeis.org

0, 0, 3, 18, 78, 273, 921, 2916, 9150, 28065, 85773, 259848, 785778, 2367813, 7128201, 21427956, 64382550, 193326105, 580372293, 1741847328, 5227116378, 15684323853, 47059266081, 141189861996
Offset: 1

Views

Author

Keywords

Comments

A string and its reverse are considered to be equivalent.

Examples

			For n=3, the three rows are ABC, ACB, and BAC, being respectively equivalent to CBA, BCA, and CAB, with which they form chiral pairs. - _Robert A. Russell_, Sep 25 2018
		

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

Column 3 of A305621.
Equals (A001117 + A056454) / 2 = A001117 - A305623 = A305623 + A056454.

Programs

  • Maple
    seq(coeff(series(-3*x^3*(12*x^4-5*x^3-4*x^2+1)/((x-1)*(2*x-1)*(3*x-1)*(2*x^2-1)*(3*x^2-1)),x,n+1), x, n), n = 1..25); # Muniru A Asiru, Sep 27 2018
  • Mathematica
    k=3; Table[(StirlingS2[i,k]+StirlingS2[Ceiling[i/2],k])k!/2,{i,k,30}] (* Robert A. Russell, Nov 25 2017 *)
    LinearRecurrence[{6, -6, -24, 49, 6, -66, 36}, {0, 0, 3, 18, 78, 273, 921}, 40] (* Vincenzo Librandi, Sep 27 2018 *)

Formula

a(n) = A032120(n) - 3*A005418(n+1) + 3.
G.f.: -3*x^3*(12*x^4 - 5*x^3 - 4*x^2 + 1)/((x - 1)*(2*x - 1)*(3*x - 1)*(2*x^2 - 1)*(3*x^2 - 1)). [Colin Barker, Jul 07 2012]

A056489 Number of periodic palindromes using exactly three different symbols.

Original entry on oeis.org

0, 0, 0, 3, 6, 21, 36, 93, 150, 345, 540, 1173, 1806, 3801, 5796, 11973, 18150, 37065, 55980, 113493, 171006, 345081, 519156, 1044453, 1569750, 3151785, 4733820, 9492213, 14250606, 28550361, 42850116, 85798533, 128746950, 257690505, 386634060, 773661333
Offset: 1

Views

Author

Keywords

Comments

For example, aaabbb is not a (finite) palindrome but it is a periodic palindrome.

Examples

			For n=4, the three arrangements are ABAC, ABCB, and ACBC.
For n=5, the six arrangements are AABCB, AACBC, ABACC, ABBAC, ABCCB, and ACBBC.
		

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. A056454.
Column 3 of A305540.

Programs

  • GAP
    a:=[0,0,0,3,6];; for n in [6..40] do a[n]:=a[n-1]+5*a[n-2]-5*a[n-3]-6*a[n-4]+6*a[n-5]; od; a; # Muniru A Asiru, Sep 28 2018
  • Maple
    seq(coeff(series(3*x^4*(1+x)/((1-x)*(1-2*x^2)*(1-3*x^2)),x,n+1), x, n), n = 1..40); # Muniru A Asiru, Sep 28 2018
  • Mathematica
    k = 3; Table[(k!/2) (StirlingS2[Floor[(n + 1)/2], k] +
    StirlingS2[Ceiling[(n + 1)/2], k]), {n, 1, 40}] (* Robert A. Russell, Jun 05 2018 *)
    LinearRecurrence[{1, 5, -5, -6, 6}, {0, 0, 0, 3, 6}, 80] (* Vincenzo Librandi, Sep 27 2018 *)
  • PARI
    a(n) = my(k=3); (k!/2)*(stirling(floor((n+1)/2), k, 2) + stirling(ceil((n+1)/2), k, 2)); \\ Michel Marcus, Jun 05 2018
    

Formula

a(n) = 2 * A056343(n) - A056283(n).
G.f.: 3*x^4*(1+x)/((1-x)*(1-2*x^2)*(1-3*x^2)). - Colin Barker, May 06 2012
a(n) = (k!/2)*(S2(floor((n+1)/2),k) + S2(ceiling((n+1)/2),k)), with k=3 different colors used and where S2(n,k) is the Stirling subset number A008277. - Robert A. Russell, Jun 05 2018

A056464 Number of primitive (aperiodic) palindromes using exactly three different symbols.

Original entry on oeis.org

0, 0, 0, 0, 6, 6, 36, 36, 150, 144, 540, 534, 1806, 1770, 5790, 5760, 18150, 17994, 55980, 55830, 170970, 170466, 519156, 518580, 1569744, 1567944, 4733670, 4732014, 14250606, 14244660, 42850116, 42844320, 128746410, 128728800
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

Column 3 of A327873.

Programs

  • Maple
    with(numtheory):with(combinat,stirling2):A056454:=n->3!*stirling2(floor((n+1)/2),3);A056464:=n->add(mobius(d)*A056454(n/d),d=divisors(n)); # C. Ronaldo

Formula

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

A305623 Number of chiral pairs of rows of n colors with exactly 3 different colors.

Original entry on oeis.org

0, 0, 3, 18, 72, 267, 885, 2880, 9000, 27915, 85233, 259308, 783972, 2366007, 7122405, 21422160, 64364400, 193307955, 580316313, 1741791348, 5226945372, 15684152847, 47058746925, 141189342840, 423593188200, 1270831465995, 3812595048993, 11437991207388, 34314376250772, 102943948309287, 308833455491445, 926503630549920, 2779517334002400, 8338565015656035, 25015720816575273, 75047214375967428
Offset: 1

Views

Author

Robert A. Russell, Jun 06 2018

Keywords

Comments

If the row is achiral, i.e., the same as its reverse, we ignore it. If different from its reverse, we count it and its reverse as a chiral pair.

Examples

			For a(3) = 3, the chiral pairs are ABC-CBA, ACB-BCA, and BAC-CAB.
		

Crossrefs

Third column of A305622.
A056454(n) is number of achiral rows of n colors with exactly 3 different colors.

Programs

  • Mathematica
    k=3; Table[(k!/2) (StirlingS2[n,k] - StirlingS2[Ceiling[n/2],k]), {n, 1, 40}]
  • PARI
    a(n) = 3*(stirling(n,3,2)-stirling(ceil(n/2),3,2)); \\ Altug Alkan, Sep 26 2018

Formula

a(n) = (k!/2) * (S2(n,k) - S2(ceiling(n/2),k)), with k=3 colors used and where S2(n,k) is the Stirling subset number A008277.
a(n) = (A001117(n) - A056454(n)) / 2.
a(n) = A001117(n) - A056310(n) = A056310(n) - A056454(n).
G.f.: -(k!/2) * (x^(2k-1) + x^(2k)) / Product_{j=1..k} (1 - j*x^2) + (k!/2) * x^k / Product_{j=1..k} (1 - j*x) with k=3 colors used.
G.f.: 3*x^3*(5*x^2-x-1)/(-36*x^6+30*x^5+24*x^4-25*x^3-x^2+5*x-1). - Simon Plouffe, Jun 20 2018

A380993 Irregular triangular array read by rows. T(n,k) is the number of ternary words of length n containing at least one copy of each letter and having exactly k inversions, n>=3, 0<=k<=floor(n^2/3).

Original entry on oeis.org

1, 2, 2, 1, 3, 6, 9, 9, 6, 3, 6, 12, 21, 27, 30, 24, 18, 9, 3, 10, 20, 38, 55, 74, 81, 80, 69, 53, 34, 17, 8, 1, 15, 30, 60, 93, 138, 174, 210, 216, 219, 195, 165, 120, 84, 48, 27, 9, 3, 21, 42, 87, 141, 222, 303, 405, 480, 546, 579, 588, 552, 498, 414, 324, 240, 162, 99, 54, 27, 9, 3
Offset: 3

Views

Author

Geoffrey Critzer, Feb 11 2025

Keywords

Examples

			Triangle T(n,k) begins:
   1,  2,  2,  1;
   3,  6,  9,  9,  6,  3;
   6, 12, 21, 27, 30, 24, 18,  9,  3;
  10, 20, 38, 55, 74, 81, 80, 69, 53, 34, 17, 8, 1;
  ...
T(4,2) = 9 because we have: {0, 1, 2, 0}, {0, 2, 0, 1}, {0, 2, 1, 1}, {0, 2, 2, 1}, {1, 0, 0, 2}, {1, 0, 2, 1}, {1, 1, 0, 2}, {1, 2, 0, 2}, {2, 0, 1, 2}.
		

Crossrefs

Cf. A056454, A129529, A001117 (row sums).

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, `if`(nops(subs(0=
          [][], l))=3, 1, 0), add(expand(x^([0, l[1], l[1]+l[2]][j])*
          b(n-1, subsop(j=`if`(j=3, 1, l[j]+1), l))), j=1..3))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [0$3])):
    seq(T(n), n=3..10);  # Alois P. Heinz, Feb 12 2025
  • Mathematica
    nn = 8; B[n_] := FunctionExpand[QFactorial[n, u]];
    e[z_] := Sum[z^n/B[n], {n, 0, nn}];
    Drop[Map[CoefficientList[#, u] &,
       Map[Normal[Series[#, {u, 0, Binomial[nn, 2]}]] &,
        Table[B[n], {n, 0, nn}] CoefficientList[
          Series[(e[z] - 1)^3, {z, 0, nn}], z]]], 3] // Grid

Formula

Sum_{n>=0} Sum_{k>=0} T(n,k)*q^k*x^n/B(n) = (e(x)-1)^3 where B(n) = Product_{i=1..n} (q^i-1)/(q-1) and e(x) = Sum_{n>=0} x^n/B(n).
Sum_{k=0..floor(n^2/3)} (-1)^k * T(n,k) = A056454(n). - Alois P. Heinz, Feb 12 2025

A321434 Triangle read by rows; T(n,k) is the number of achiral rows of n colors using exactly k colors.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 2, 0, 1, 6, 6, 0, 1, 6, 6, 0, 1, 14, 36, 24, 0, 1, 14, 36, 24, 0, 1, 30, 150, 240, 120, 0, 1, 30, 150, 240, 120, 0, 1, 62, 540, 1560, 1800, 720, 0, 1, 62, 540, 1560, 1800, 720, 0, 1, 126, 1806, 8400, 16800, 15120, 5040, 0, 1, 126, 1806, 8400, 16800, 15120, 5040
Offset: 0

Views

Author

Robert A. Russell, Nov 09 2018

Keywords

Comments

Each zero in the data is the beginning of a new row.
Same as A131689, with rows (except for the first) repeated. - Joerg Arndt, Sep 08 2019

Examples

			The triangle begins with T(0,0):
1
0 1
0 1
0 1   2
0 1   2
0 1   6     6
0 1   6     6
0 1  14    36     24
0 1  14    36     24
0 1  30   150    240    120
0 1  30   150    240    120
0 1  62   540   1560   1800    720
0 1  62   540   1560   1800    720
0 1 126  1806   8400  16800   15120    5040
0 1 126  1806   8400  16800   15120    5040
0 1 254  5796  40824 126000  191520  141120   40320
0 1 254  5796  40824 126000  191520  141120   40320
0 1 510 18150 186480 834120 1905120 2328480 1451520 362880
For T(7,2)=14, the rows are AAABAAA, AABABAA, AABBBAA, ABAAABA, ABABABA, ABBABBA, ABBBBBA, BAAAAAB, BAABAAB, BABABAB, BABBBAB, BBAAABB, BBABABB, and BBBABBB.
		

Crossrefs

Cf. A019538 (oriented), A305621 (unoriented), A305622 (chiral).
Cf. A131689.

Programs

  • Mathematica
    Table[k! StirlingS2[Ceiling[n/2], k], {n, 0, 18}, {k, 0, (n+1)/2}] // Flatten

Formula

T(n,k) = k!*S2(ceiling(n/2),k), where S2 is the Stirling subset number A008277.
Showing 1-10 of 10 results.