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

A005418 Number of (n-1)-bead black-white reversible strings; also binary grids; also row sums of Losanitsch's triangle A034851; also number of caterpillar graphs on n+2 vertices.

Original entry on oeis.org

1, 2, 3, 6, 10, 20, 36, 72, 136, 272, 528, 1056, 2080, 4160, 8256, 16512, 32896, 65792, 131328, 262656, 524800, 1049600, 2098176, 4196352, 8390656, 16781312, 33558528, 67117056, 134225920, 268451840, 536887296, 1073774592, 2147516416, 4295032832
Offset: 1

Views

Author

Keywords

Comments

Equivalently, walks on triangle, visiting n+2 vertices, so length n+1, n "corners"; the symmetry group is S3, reversing a walk does not count as different. Walks are not self-avoiding. - Colin Mallows
Slavik V. Jablan observes that this is also the number of rational knots and links with n+2 crossings (cf. A018240). See reference. [Corrected by Andrey Zabolotskiy, Jun 18 2020]
Number of bit strings of length (n-1), not counting strings which are the end-for-end reversal or the 0-for-1 reversal of each other as different. - Carl Witty (cwitty(AT)newtonlabs.com), Oct 27 2001
The formula given in page 1095 of the Balasubramanian reference can be used to derive this sequence. - Parthasarathy Nambi, May 14 2007
Also number of compositions of n up to direction, where a composition is considered equivalent to its reversal, see example. - Franklin T. Adams-Watters, Oct 24 2009
Number of normally non-isomorphic realizations of the associahedron of type I starting with dimension 2 in Ceballos et al. - Tom Copeland, Oct 19 2011
Number of fibonacenes with n+2 hexagons. See the Balaban and the Dobrynin references. - Emeric Deutsch, Apr 21 2013
From the point of view of binary grids, it is a (1,n)-rectangular grid. A225826 to A225834 are the numbers of binary pattern classes in the (m,n)-rectangular grid, 1 < m < 11. - Yosu Yurramendi, May 19 2013
Number of n-vertex difference graphs (bipartite 2K_2-free graphs) [Peled & Sun, Thm. 9]. - Falk Hüffner, Jan 10 2016
The offset should be 0, since the first row of A034851 is row 0. The name would then be: "Number of n bead...". - Daniel Forgues, Jul 26 2018
a(n) is the number of non-isomorphic generalized rigid ladders with n cells. A generalized rigid ladder with n cells is a graph with vertex set is the union of {u_0, u_1, ..., u_n} and {v_0, v_1, ..., v_n}, and for every 0 <= i <= n-1, the edges are of the form {u_i,u_i+1}, {v_i, v_i+1}, {u_i,v_i} and either {u_i,v_i+1} or {u_i+1,v_i}. - Christian Barrientos, Jul 29 2018
Also number of non-isomorphic stairs with n+1 cells. A stair is a snake polyomino allowing only two directions for adjacent cells: east and north. - Christian Barrientos and Sarah Minion, Jul 29 2018
From Robert A. Russell, Oct 28 2018: (Start)
There are two different unoriented row colorings using two colors that give us very similar results here, a difference of one in the offset. In an unoriented row, chiral pairs are counted as one.
a(n) is the number of color patterns (set partitions) of an unoriented row of length n using two or fewer colors (subsets). Two color patterns are equivalent if the colors are permutable.
a(n+1) is the number of ways to color an unoriented row of length n using two noninterchangeable colors (one need not use both colors).
See the examples below of these two different colorings. (End)
Also arises from the enumeration of types of based polyhedra with exactly two triangular faces [Rademacher]. - N. J. A. Sloane, Apr 24 2020
a(n) is the number of (unlabeled) 2-paths with n+4 vertices. (A 2-path with order n at least 4 can be constructed from a 3-clique by iteratively adding a new 2-leaf (vertex of degree 2) adjacent to an existing 2-clique containing an existing 2-leaf.) - Allan Bickle, Apr 05 2022
a(n) is the number of caterpillars with a perfect matching and order 2n+2. - Christian Barrientos, Sep 12 2023
a(n) is also the number of distinct planar embeddings of the (n+2)-centipede graph (up to at least n=8 and likely for all larger n). - Eric W. Weisstein, May 21 2024
a(n) is also the number of distinct planar embeddings of the 2 X (n+2) grid graph i.e., the (n+2)-ladder graph. - Eric W. Weisstein, May 21 2024
Dimension of the homogeneous component of degree n of the free Jordan algebra on two generators (or, in this case, the free special Jordan algebra on two generators). It follows from (Shirshov 1956, Cohn 1959). - Vladimir Dotsenko, Mar 29 2025

Examples

			a(5) = 10 because there are 16 compositions of 5 (shown as <vectors>) but only 10 equivalence classes (shown as {sets}): {<5>}, {<4,1>,<1,4>}, {<3,2>,<2,3>}, {<3,1,1>,<1,1,3>}, {<1,3,1>},{<2,2,1>,<1,2,2>}, {<2,1,2>}, {<2,1,1,1>,<1,1,1,2>}, {<1,2,1,1>,<1,1,2,1>}, {<1,1,1,1,1>}. - _Geoffrey Critzer_, Nov 02 2012
G.f. = x + 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + 20*x^6 + 36*x^7 + 72*x^8 + ... - _Michael Somos_, Jun 24 2018
From _Robert A. Russell_, Oct 28 2018: (Start)
For a(5)=10, the 4 achiral patterns (set partitions) are AAAAA, AABAA, ABABA, and ABBBA. The 6 chiral pairs are AAAAB-ABBBB, AAABA-ABAAA, AAABB-AABBB, AABAB-ABABB, AABBA-ABBAA, and ABAAB-ABBAB. The colors are permutable.
For n=4 and a(n+1)=10, the 4 achiral colorings are AAAA, ABBA, BAAB, and BBBB. The 6 achiral pairs are AAAB-BAAA, AABA-ABAA, AABB-BBAA, ABAB-BABA, ABBB-BBBA, and BABB-BBAB. The colors are not permutable. (End)
		

References

  • K. Balasubramanian, "Combinatorial Enumeration of Chemical Isomers", Indian J. Chem., (1978) vol. 16B, pp. 1094-1096. See page 1095.
  • Wayne M. Dymacek, Steinhaus graphs. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 399--412, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561065 (81f:05120)
  • Jablan S. and Sazdanovic R., LinKnot: Knot Theory by Computer, World Scientific Press, 2007.
  • Joseph S. Madachy: Madachy's Mathematical Recreations. New York: Dover Publications, Inc., 1979, p. 46 (first publ. by Charles Scribner's Sons, New York, 1966, under the title: Mathematics on Vacation)
  • 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.]
  • C. A. Pickover, Keys to Infinity, Wiley 1995, p. 75.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column 2 of A320750 (set partitions).
Cf. A131577 (oriented), A122746(n-3) (chiral), A016116 (achiral), for set partitions with up to two subsets.
Column 2 of A277504, offset by one (colors not permutable).
Cf. A000079 (oriented), A122746(n-2) (chiral), and A060546 (achiral), for a(n+1).

Programs

  • Haskell
    a005418 n = sum $ a034851_row (n - 1) -- Reinhard Zumkeller, Jan 14 2012
    
  • Maple
    A005418 := n->2^(n-2)+2^(floor(n/2)-1): seq(A005418(n), n=1..34);
  • Mathematica
    LinearRecurrence[{2,2,-4}, {1,2,3}, 40] (* or *) Table[2^(n-2)+2^(Floor[n/2]-1), {n,40}] (* Harvey P. Dale, Jan 18 2012 *)
  • PARI
    A005418(n)= 2^(n-2) + 2^(n\2-1); \\ Joerg Arndt, Sep 16 2013
    
  • Python
    def A005418(n): return 1 if n == 1 else 2**((m:= n//2)-1)*(2**(n-m-1)+1) # Chai Wah Wu, Feb 03 2022

Formula

a(n) = 2^(n-2) + 2^(floor(n/2) - 1).
G.f.: -x*(-1 + 3*x^2) / ( (2*x - 1)*(2*x^2 - 1) ). - Simon Plouffe in his 1992 dissertation
G.f.: x*(1+2*x)*(1-3*x^2)/((1-4*x^2)*(1-2*x^2)), not reduced. - Wolfdieter Lang, May 08 2001
a(n) = 6*a(n - 2) - 8*a(n - 4). a(2*n) = A063376(n - 1) = 2*a(2*n - 1); a(2*n + 1) = A007582(n). - Henry Bottomley, Jul 14 2001
a(n+2) = 2*a(n+1) - A077957(n) with a(1) = 1, a(2) = 2. - Yosu Yurramendi, Oct 24 2008
a(n) = 2*a(n-1) + 2*a(n-2) - 4*a(n-3). - Jaume Oliver Lafont, Dec 05 2008
Union of A007582 and A161168. Union of A007582 and A063376. - Jaroslav Krizek, Aug 14 2009
G.f.: G(0); G(k) = 1 + 2*x/(1 - x*(1+2^(k+1))/(x*(1+2^(k+1)) + (1+2^k)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Dec 12 2011
a(2*n) = 2*a(2*n-1) and a(2*n+1) = a(2*n) + 4^(n-1) with a(1) = 1. - Johannes W. Meijer, Aug 26 2013
From Robert A. Russell, Oct 28 2018: (Start)
a(n) = (A131577(n) + A016116(n)) / 2 = A131577(n) - A122746(n-3) = A122746(n-3) + A016116(n), for set partitions with up to two subsets.
a(n+1) = (A000079(n) + A060546(n)) / 2 = A000079(n) - A122746(n-2) = A122746(n-2) + A060546(n), for two colors that do not permute.
a(n) = Sum_{j=0..k} (S2(n,j) + Ach(n,j)) / 2, where k=2 is the maximum number of colors, S2(n,k) is the Stirling subset number A008277, and Ach(n,k) = [n>=0 & n<2 & n==k] + [n>1]*(k*Ach(n-2,k) + Ach(n-2,k-1) + Ach(n-2,k-2)).
a(n+1) = (k^n + k^ceiling(n/2)) / 2, where k=2 is number of colors we can use. (End)
E.g.f.: (cosh(2*x) + 2*cosh(sqrt(2)*x) + sinh(2*x) + sqrt(2)*sinh(sqrt(2)*x) - 3)/4. - Stefano Spezia, Jun 01 2022

A037270 a(n) = n^2*(n^2 + 1)/2.

Original entry on oeis.org

0, 1, 10, 45, 136, 325, 666, 1225, 2080, 3321, 5050, 7381, 10440, 14365, 19306, 25425, 32896, 41905, 52650, 65341, 80200, 97461, 117370, 140185, 166176, 195625, 228826, 266085, 307720, 354061, 405450, 462241, 524800, 593505, 668746, 750925, 840456, 937765
Offset: 0

Views

Author

Aaron Gulliver (gulliver(AT)elec.canterbury.ac.nz)

Keywords

Comments

Sum of first n^2 positive integers.
Start from xanthene and attach amino acids according to the reaction scheme that describes the reaction between the active sites. See the hyperlink below on chemistry. - Robert G. Wilson v, Aug 02 2002; Amarnath Murthy, Aug 01 2002
Sum of the next n multiples of n. - Amarnath Murthy, Aug 01 2002
The sum of the terms in an n X n spiral. These are also triangular numbers. - William A. Tedeschi, Feb 27 2008
Hypotenuse of Pythagorean triangles with smallest side a cube: A000578(n)^2 + A083374(n)^2 = a(n)^2. - Martin Renner, Nov 12 2011
For n>1, triangular numbers that can be represented as a sum of a square and a triangular number. For example, a(2)=10=4+6=9+1. - Ivan N. Ianakiev, Apr 24 2012
A037270 can be constructed in the following manner: Take A000217 and for every n not in A000290 delete the corresponding A000217(n). - Ivan N. Ianakiev, Apr 26 2012
Starting at a(1)=1 simply take 1*1=1, a(2)= 2*(2+3)=10, a(3)= 3*(4+5+6)=45, a(4)=4*(7+8+9+10) and so on. - J. M. Bergot, May 01 2015
Observation: The digital roots of the terms repeat in the sequence 1, 1, 9; e.g., the digital roots of 1, 10, 45, 136, 325, and 666 are 1, 1, 9, 1, 1, and 9. Verified for the first 10000 terms. - Rob Barton, Mar 28 2018
The above observation is easily explained and proved given that the digital root of a positive number equals the number modulo 9, and a(n + 9k) == a(n) (mod 9). - M. F. Hasler, Apr 05 2018
Number of unoriented rows of length 4 using up to n colors. For a(0)=0, there are no rows using no colors. For a(1)=1, there is one row using that one color for all positions. For a(2)=10, there are 4 achiral (AAAA, ABBA, BAAB, BBBB) and 6 chiral pairs (AAAB-BAAA, AABA-ABAA, AABB-BBAA, ABAB-BABA, ABBB-BBBA, BABB-BBAB). - Robert A. Russell, Nov 14 2018
For n > 0, a(2n+1) is the number of non-isomorphic 6C_m-snakes, where m = 2n+1 or m = 2n (for n>=2). A kC_n-snake is a connected graph in which the k>=2 blocks are isomorphic to the cycle C_n and the block-cutpoint graph is a path. - Christian Barrientos, May 15 2019
Number of achiral colorings of the edges of a tetrahedron with n available colors. - Robert A. Russell, Sep 07 2019

References

  • C. Alsina and R. B. Nelson, Charming Proofs: A Journey into Elegant Mathematics, MAA, 2010. See p. 5.
  • C. Barrientos, Graceful labelings of cyclic snakes, Ars Combin., 60(2001), 85-96.
  • Albert H. Beiler, Recreations in the theory of numbers, New York: Dover, (2nd ed.) 1966, p. 106, table 55.
  • T. A. Gulliver, Sequences from Arrays of Integers, Int. Math. Journal, Vol. 1, No. 4, pp. 323-332, 2002.
  • T. A. Gulliver, Sequences from Cubes of Integers, Int. Math. Journal, 4 (2003), 439-445.
  • R. A. Wilson, Cosmic Trigger, epilogue of S.-P. Sirag.

Crossrefs

Cf. A000217, A236770 (see crossrefs).
Row 4 of A277504.
Cf. A000583 (oriented), A083374 (chiral), A000290 (achiral).
Cf. A317617.
Row 3 of A327086 (achiral simplex edge colorings).

Programs

  • GAP
    a:=List([0..30],n->n^2*(n^2+1)/2); # Muniru A Asiru, Mar 28 2018
    
  • Magma
    [n^2*(n^2 + 1)/2: n in [0..30]] // Stefano Spezia, Jan 15 2019
  • Maple
    seq(n^2*(n^2+1)/2,n=0..30); # Muniru A Asiru, Mar 28 2018
  • Mathematica
    Table[ n^2*((n^2 + 1)/2), {n, 0, 30} ]
    Table[(1/8) Round[N[Sinh[2 ArcSinh[n]]^2, 100]], {n, 0, 30}] (* Artur Jasinski, Feb 10 2010 *)
    LinearRecurrence[{5,-10,10,-5,1},{0,1,10,45,136},30] (* Harvey P. Dale, Aug 03 2014 *)
  • PARI
    a(n)=binomial(n^2+1,2) \\ Charles R Greathouse IV, Apr 25 2012
    
  • Python
    for n in range(0,30): print(n**2*(n**2+1)/2, end=', ') # Stefano Spezia, Jan 10 2019
    

Formula

a(n) = a(n-1) + n^3 + (n-1)^3.
a(n) = A000537(n)+A000537(n-1), i.e., square of sum of first n integers plus square of sum of first n-1 integers. - Henry Bottomley, Oct 15 2001
a(n) = Sum_{k=0..n^2} k. - William A. Tedeschi, Feb 27 2008
a(n) = (1/8)*sinh(2*arcsinh(n)). - Artur Jasinski, Feb 10 2010
G.f.: x*(1+x)*(1+4*x+x^2)/(1-x)^5. - Colin Barker, Mar 22 2012
a(n) = a(n-1) + A005898(n-1). - Ivan N. Ianakiev, May 13 2012
a(n) = 2 * A000217(n-1) * A000217(n) + A000290(n). - Ivan N. Ianakiev, May 26 2012
a(n) = A000217(n^2). - J. M. Bergot, Jun 07 2012
a(n) = 5*a(n-1) -10*a(n-2) +10*a(n-3) -5*a(n-4) +a(n-5) n>4, a(0)=0, a(1)=1, a(2)=10, a(3)=45, a(4)=136. - Yosu Yurramendi, Sep 02 2013
For n>0, a(n) = A000217(n)^2 + A000217(n-1)^2. - Richard R. Forberg, Dec 25 2013
a(n) = T(T(n)) + T(T(n-1)) + T(T(n)-1) + T(T(n-1)-1), where T(n) = A000217(n). - Charlie Marion, Sep 10 2016
a(n) = t(n-3)*t(n)+t(n-1)*t(n+2), with t(n)=A000217(n). - J. M. Bergot, Apr 07 2018
From Robert A. Russell, Nov 14 2018: (Start)
a(n) = (A000583(n) + A000290(n)) / 2 = (n^4 + n^2) / 2.
a(n) = A000583(n) - A083374(n) = A083374(n) + A000290(n).
G.f.: (Sum_{j=1..4} S2(4,j)*j!*x^j/(1-x)^(j+1) + Sum_{j=1..2} S2(2,j)*j!*x^j/(1-x)^(j+1)) / 2, where S2 is the Stirling subset number A008277.
G.f.: Sum_{k=1..4} A145882(4,k) * x^k / (1-x)^5.
E.g.f.: (Sum_{k=1..4} S2(4,k)*x^k + Sum_{k=1..2} S2(2,k)*x^k) * exp(x) / 2, where S2 is the Stirling subset number A008277.
For n>4, a(n) = Sum_{j=1..5} -binomial(j-6,j) * a(n-j). (End)
a(n) = n*A006003(n). - Kritsada Moomuang, Dec 16 2018
For n > 0, a(n) = Sum_{k=1..n} A317617(n,k). - Stefano Spezia, Jan 10 2019
Sum_{n>=1} 1/a(n) = 1 + Pi^2/3 - Pi*coth(Pi) = 1.13652003875929052467672874379... - Vaclav Kotesovec, Jan 21 2019
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi*csch(Pi) + Pi^2/6 - 1. - Amiram Eldar, Nov 02 2021

A003992 Square array read by upwards antidiagonals: T(n,k) = n^k for n >= 0, k >= 0.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 4, 1, 0, 1, 4, 9, 8, 1, 0, 1, 5, 16, 27, 16, 1, 0, 1, 6, 25, 64, 81, 32, 1, 0, 1, 7, 36, 125, 256, 243, 64, 1, 0, 1, 8, 49, 216, 625, 1024, 729, 128, 1, 0, 1, 9, 64, 343, 1296, 3125, 4096, 2187, 256, 1, 0, 1, 10, 81, 512, 2401, 7776, 15625, 16384, 6561, 512, 1, 0
Offset: 0

Views

Author

Keywords

Comments

If the array is transposed, T(n,k) is the number of oriented rows of n colors using up to k different colors. The formula would be T(n,k) = [n==0] + [n>0]*k^n. The generating function for column k would be 1/(1-k*x). For T(3,2)=8, the rows are AAA, AAB, ABA, ABB, BAA, BAB, BBA, and BBB. - Robert A. Russell, Nov 08 2018
T(n,k) is the number of multichains of length n from {} to [k] in the Boolean lattice B_k. - Geoffrey Critzer, Apr 03 2020

Examples

			Rows begin:
[1, 0,  0,   0,    0,     0,      0,      0, ...],
[1, 1,  1,   1,    1,     1,      1,      1, ...],
[1, 2,  4,   8,   16,    32,     64,    128, ...],
[1, 3,  9,  27,   81,   243,    729,   2187, ...],
[1, 4, 16,  64,  256,  1024,   4096,  16384, ...],
[1, 5, 25, 125,  625,  3125,  15625,  78125, ...],
[1, 6, 36, 216, 1296,  7776,  46656, 279936, ...],
[1, 7, 49, 343, 2401, 16807, 117649, 823543, ...], ...
		

Crossrefs

Main diagonal is A000312. Other diagonals include A000169, A007778, A000272, A008788. Antidiagonal sums are in A026898.
Cf. A099555.
Transpose is A004248. See A051128, A095884, A009999 for other versions.
Cf. A277504 (unoriented), A293500 (chiral).

Programs

  • Magma
    [[(n-k)^k: k in [0..n]]: n in [0..10]]; // G. C. Greubel, Nov 08 2018
  • Mathematica
    Table[If[k == 0, 1, (n - k)^k], {n, 0, 11}, {k, 0, n}]//Flatten
  • PARI
    T(n,k) = (n-k)^k \\ Charles R Greathouse IV, Feb 07 2017
    

Formula

E.g.f.: Sum T(n,k)*x^n*y^k/k! = 1/(1-x*exp(y)). - Paul D. Hanna, Oct 22 2004
E.g.f.: Sum T(n,k)*x^n/n!*y^k/k! = e^(x*e^y). - Franklin T. Adams-Watters, Jun 23 2006

Extensions

More terms from David W. Wilson
Edited by Paul D. Hanna, Oct 22 2004

A284949 Triangle read by rows: T(n,k) = number of reversible string structures of length n using exactly k different symbols.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 5, 4, 1, 1, 9, 15, 6, 1, 1, 19, 50, 37, 9, 1, 1, 35, 160, 183, 76, 12, 1, 1, 71, 502, 877, 542, 142, 16, 1, 1, 135, 1545, 3930, 3523, 1346, 242, 20, 1, 1, 271, 4730, 17185, 21393, 11511, 2980, 390, 25, 1
Offset: 1

Views

Author

Andrew Howroyd, Apr 06 2017

Keywords

Comments

A string and its reverse are considered to be equivalent. Permuting the colors will not change the structure.
Number of k-block partitions of an n-set up to reflection.
T(n,k) = pi_k(P_n) which is the number of non-equivalent partitions of the path on n vertices, with exactly k parts. Two partitions P1 and P2 of a graph G are said to be equivalent if there is a nontrivial automorphism of G which maps P1 onto P2. - Mohammad Hadi Shekarriz, Aug 21 2019

Examples

			Triangle begins:
1;
1,   1;
1,   2,    1;
1,   5,    4,     1;
1,   9,   15,     6,     1;
1,  19,   50,    37,     9,     1;
1,  35,  160,   183,    76,    12,    1;
1,  71,  502,   877,   542,   142,   16,   1;
1, 135, 1545,  3930,  3523,  1346,  242,  20,  1;
1, 271, 4730, 17185, 21393, 11511, 2980, 390, 25, 1;
		

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

Columns 2..6 are A056326, A056327, A056328, A056329, A056330.
Row sums are A103293.
Partial row sums include A005418, A001998(n-1), A056323, A056324, A056325.
Cf. A277504, A008277 (set partitions), A152175 (up to rotation), A152176 (up to rotation and reflection), A304972 (achiral patterns).

Programs

  • Mathematica
    (* achiral color patterns for row of n colors containing k different colors *)
    Ach[n_, k_] := Ach[n, k] = Switch[k, 0, If[0==n, 1, 0], 1, If[n>0, 1, 0],
       (* else *) _, If[OddQ[n],
       Sum[Binomial[(n-1)/2, i] Ach[n-1-2i, k-1], {i, 0, (n-1)/2}],
       Sum[Binomial[n/2-1, i] (Ach[n-2-2i, k-1] + 2^i Ach[n-2-2i, k-2]),
       {i, 0, n/2-1}]]]
    Table[(StirlingS2[n, k] + Ach[n, k])/2, {n, 1, 15}, {k, 1, n}] // Flatten
    (* Robert A. Russell, Feb 10 2018 *)
  • PARI
    \\ see A056391 for Polya enumeration functions
    T(n,k) = NonequivalentStructsExactly(ReversiblePerms(n), k); \\ Andrew Howroyd, Oct 14 2017
    
  • PARI
    \\ Ach is A304972 as square matrix.
    Ach(n)={my(M=matrix(n,n,i,k,i>=k)); for(i=3, n, for(k=2, n, M[i,k]=k*M[i-2,k] + M[i-2,k-1] + if(k>2, M[i-2,k-2]))); M}
    T(n)={(matrix(n, n, i, k, stirling(i, k, 2)) + Ach(n))/2}
    { my(A=T(10)); for(n=1, #A, print(A[n,1..n])) } \\ Andrew Howroyd, Sep 18 2019

A275549 Number of classes of endofunctions of [n] under reversal.

Original entry on oeis.org

1, 1, 3, 18, 136, 1625, 23436, 412972, 8390656, 193739769, 5000050000, 142656721086, 4458051717120, 151437584670385, 5556003465485760, 218946946471875000, 9223372039002259456, 413620131002462320337, 19673204037747448432896, 989209827833222327690890
Offset: 0

Views

Author

Olivier Gérard, Aug 01 2016

Keywords

Comments

f and g are in the same class if function g(i) = f(n+1-i) for all i.
Decomposition by class size
.
n 1 2
---------------
1 1 0
2 2 1
3 9 9
4 16 120
5 125 1500
6 216 23220
7 2401 410571
.
Demonstration for the formula: the classes are either of size 1 or 2.
The classes of size 1 is for functions invariant by reversal. They are specified by half their values, including one more if n is odd. Their number is n^(ceiling(n/2)).
So the number of classes under this symmetry is half (the number of functions + the number of classes of size 1).
a(n) is the number of unoriented length n strings with a maximum of n colors. - Andrew Howroyd, Sep 13 2019

Crossrefs

Main diagonal of A277504.
Cf. A000312 All endofunctions
Cf. A000169 Classes under translation mod n
Cf. A001700 Classes under sort
Cf. A056665 Classes under rotation
Cf. A168658 Classes under complement to n+1
Cf. A130293 Classes under translation and rotation
Cf. A081721 Classes under rotation and reversal
Cf. A275550 Classes under reversal and complement
Cf. A275551 Classes under translation and reversal
Cf. A275552 Classes under translation and complement
Cf. A275553 Classes under translation, complement and reversal
Cf. A275554 Classes under translation, rotation and complement
Cf. A275555 Classes under translation, rotation and reversal
Cf. A275556 Classes under translation, rotation, complement and reversal
Cf. A275557 Classes under rotation and complement
Cf. A275558 Classes under rotation, complement and reversal
Cf. A078707 Endofunctions symmetric around their middle (stable by reversal).

Programs

Formula

a(n) = (n^n+n^ceiling(n/2))/2.

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

A284855 Array read by antidiagonals: T(n,k) = number of necklaces with n beads and k colors that are the same when turned over.

Original entry on oeis.org

1, 2, 1, 3, 3, 1, 4, 6, 4, 1, 5, 10, 9, 6, 1, 6, 15, 16, 18, 8, 1, 7, 21, 25, 40, 27, 12, 1, 8, 28, 36, 75, 64, 54, 16, 1, 9, 36, 49, 126, 125, 160, 81, 24, 1, 10, 45, 64, 196, 216, 375, 256, 162, 32, 1, 11, 55, 81, 288, 343, 756, 625, 640, 243, 48, 1
Offset: 1

Views

Author

Andrew Howroyd, Apr 04 2017

Keywords

Comments

Number of periodic palindromes of length n using a maximum of k different symbols.
From Petros Hadjicostas, Sep 02 2018: (Start)
According to Christian Bower's theory of transforms, we have boxes of different sizes and different colors. The size of a box is determined by the number of balls it can hold. In this case, we assume all balls are the same and are unlabeled. Assume also that the number of possible colors a box with m balls can have is given by c(m). We place the boxes on a circle at equal distances from each other. Two configurations of boxes on the circle are considered equivalent if one can be obtained from the other by rotation. We are interested about circular configurations of boxes that are circular palindromes (i.e., necklaces with boxes that are the same when turned over). Let b(n) be the number of circularly palindromic configurations of boxes on a circle when the total number of balls in the boxes is n (and each box contains at least one ball).
Bower calls the sequence (b(n): n >= 1), the CPAL ("circular palindrome") transform of the input sequence (c(m): m >= 1). If the g.f. of the input sequence (c(m): m >= 1) is C(x) = Sum_{m>=1} c(m)*x^m, then the g.f. of the output sequence (b(n): n >= 1) is B(x) = Sum_{n >= 1} b(n)*x^n = (1 + C(x))^2/(2*(1 - C(x^2))) - 1/2.
In the current sequence, each box holds only one ball but can have one of k colors. Hence, c(1) = k but c(m) = 0 for m >= 2. Thus, C(x) = k*x. Then, for fixed k, the output sequence is (b(n): n >= 1) = (T(n, k): n >= 1), where T(n, k) = number of necklaces with n beads and k colors that are the same when turned over. If we let B_k(x) = Sum_{n>=1} T(n, k)*x^n, then B_k(x) = (1 + k*x)^2/(2*(1 - k*x^2)) - 1/2. From this, we can easily prove the formulae below.
Note that T(n, k=2) - 1 is the total number of Sommerville symmetric cyclic compositions of n. See pp. 301-304 in his paper in the links below. To see why this is the case, we use MacMahon's method of representing a cyclic composition of n with a necklace of 2 colors (see p. 273 in Sommerville's paper where the two "colors" are an x and a dot . rather than B and W). Given a Sommerville symmetrical composition b_1 + ... + b_r of n (with b_i >= 1 for all i and 1 <= r <= n), create the following circularly palindromic necklace with n beads of 2 colors: Start with a B bead somewhere on the circle and place b_1 - 1 W beads to the right of it; place a B bead to the right of the W beads (if any) followed by b_2 - 1 W beads; and so on. At the end, place a B bead followed with b_r - 1 W beads. (If b_i = 1 for some i, then a B bead follows a B bead since there are 0 W beads between them.) We thus get a circularly palindromic necklace with n beads of two colors. (The only necklace we cannot get with this method is the one than has all n beads colored W.)
It is interesting that the representation of a necklace of length n, say s_1, s_2, ..., s_n, as a periodic sequence (..., s_{-2}, s_{-1}, s_0, s_1, s_2, ...) with the property s_i = s_{i+n} for all i, as was done by Marks R. Nester in Chapter 2 of his 1999 PhD thesis, was considered by Sommerville in his 1909 paper (in the very first paragraph of his paper). (End)

Examples

			Table starts:
1  2   3    4    5     6     7      8      9     10 ...
1  3   6   10   15    21    28     36     45     55 ...
1  4   9   16   25    36    49     64     81    100 ...
1  6  18   40   75   126   196    288    405    550 ...
1  8  27   64  125   216   343    512    729   1000 ...
1 12  54  160  375   756  1372   2304   3645   5500 ...
1 16  81  256  625  1296  2401   4096   6561  10000 ...
1 24 162  640 1875  4536  9604  18432  32805  55000 ...
1 32 243 1024 3125  7776 16807  32768  59049 100000 ...
1 48 486 2560 9375 27216 67228 147456 295245 550000 ...
...
For n = 4 and k = 2, the palindromic necklaces are 0000, 0001, 0011, 0111, 0101, 1111 so T(4,2) = 6. Necklaces are only counted up to cyclic equivalence.
For n = 4 and k = 2, using MacMahon's bijection, with B = 0 and W = 1, the corresponding Sommerville symmetrical cyclic compositions of n = 4 are as follows: 1+1+1+1, 1+1+2, 1+3, 4, 2+2 (with none for 1111). If we let B = 1 and W = 0, we get the corresponding symmetrical cyclic compositions of n=4: (none for 0000) 4, 1+3, 1+1+2, 2+2, 1+1+1+1. (All these cyclic compositions must viewed on a circle.) - _Petros Hadjicostas_, Sep 02 2018
		

References

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

Crossrefs

Programs

  • Mathematica
    a[n_, k_] := If[EvenQ[n], (k^(n/2) + k^(n/2 + 1))/2, k^((n+1)/2)];
    Table[a[n-k+1, k], {n, 1, 11}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Jun 05 2017, translated from PARI *)
  • PARI
    a(n,k) = if(n % 2 == 0, (k^(n/2) + k^(n/2+1))/2, k^((n+1)/2));
    for(n=1, 10, for(k=1, 10, print1( a(n,k),", ");); print(););

Formula

T(2*n, k) = (k^(n+1) + k^n) / 2.
T(2*n + 1, k) = k^(n+1).
T(n, k) = 2 * A081720(n, k) - A075195(n, k).
From Petros Hadjicostas, Sep 02 2018: (Start)
For fixed k >= 1, the k-th column (T(n, k): n >= 1) is the CPAL ("circular palindrome") transform of the sequence k, 0, 0, ...
G.f. of column k: Sum_{n>=1} T(n,k)*x^n = (1 + k*x)^2/(2*(1 - k*x^2)) - 1/2. (End)

A293500 Number of orientable strings of length n using a maximum of k colors, array read by descending antidiagonals, T(n,k) for n >= 1 and k >= 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 3, 2, 0, 0, 6, 9, 6, 0, 0, 10, 24, 36, 12, 0, 0, 15, 50, 120, 108, 28, 0, 0, 21, 90, 300, 480, 351, 56, 0, 0, 28, 147, 630, 1500, 2016, 1053, 120, 0, 0, 36, 224, 1176, 3780, 7750, 8064, 3240, 240, 0, 0, 45, 324, 2016, 8232, 23220, 38750, 32640, 9720, 496, 0
Offset: 1

Views

Author

Andrew Howroyd, Oct 10 2017

Keywords

Comments

Reversing the string does not leave it unchanged. Only one string from each pair is counted.
Equivalently, the number of nonequivalent strings up to reversal that are not palindromes.
Except for the first term, column k is the "BHK" (reversible, identity, unlabeled) transform of k,0,0,0,... [Corrected by Petros Hadjicostas, Jul 01 2018]
From Petros Hadjicostas, Jul 01 2018: (Start)
Consider the input sequence (c_k(n): n >= 1) with g.f. C_k(x) = Sum_{n>=1} c_k(n)*x^n. Let a_k(n) = BHK(c_k(n): n >= 1) be the output sequence under Bower's BHK transform. It can be proved that the g.f. of BHK(c_k(n): n >= 1) is A_k(x) = (C_k(x)^2 - C_k(x^2))/(2*(1-C_k(x))*(1-C_k(x^2))) + C_k(x). (See the comments for sequences A032096, A032097, and A032098.)
For column k of this two-dimensional array, the input sequence is defined by c_k(1) = k and c_k(n) = 0 for n >= 1. Thus, C_k(x) = k*x, and hence the g.f. of column k (with the term C_k(x) = k*x excluded) is (C_k(x)^2 - C_k(x^2))/(2*(1-C_k(x))*(1-C_k(x^2))) = (1/2)*(k - 1)*k*x^2/((k*x^2 - 1)*(k*x - 1)), from which we can easily prove Howroyd's formula.
(End)
Comment from Bahman Ahmadi, Aug 05 2019: (Start)
We give an alternative definition for the square array A(n,k) = T(n,k) with n >= 2 and k >= 0. A(n,k) is the number of inequivalent "distinguishing colorings" of the path on n vertices using at most k colors. The rows are indexed by n, the number of vertices of the path, and the columns are indexed by k, the number of permissible colors.
A vertex-coloring of a graph G is called "distinguishing" if it is only preserved by the identity automorphism of G. This notion is considered in the context of "symmetry breaking" of simple (finite or infinite) graphs. Two vertex-colorings of a graph are called "equivalent" if there is an automorphism of the graph which preserves the colors of the vertices. Given a graph G, we use the notation Phi_k(G) to denote the number of inequivalent distinguishing colorings of G with at most k colors. This sequence gives A(n,k) = Phi_k(P_n), i.e., the number of inequivalent distinguishing colorings of the path P_n on n vertices with at most k colors.
For n=3, we can color the vertices of P_3 with at most 2 colors in 3 ways such that all the colorings distinguish the graph (i.e., no non-identity automorphism of the path P_3 preserves the coloring) and that all the three colorings are inequivalent.
We have Phi_k(P_n) = binomial(k,2)*k^(n-2) + k*Phi_k(P_(n-2)) for n >= 4; Phi_k(P_2) = binomial(k,2); Phi_k(P_3) = k*binomial(k,2).
(End)

Examples

			Array begins:
======================================================
n\k| 1   2    3     4      5      6       7       8
---|--------------------------------------------------
1  | 0   0    0     0      0      0       0       0...
2  | 0   1    3     6     10     15      21      28...
3  | 0   2    9    24     50     90     147     224...
4  | 0   6   36   120    300    630    1176    2016...
5  | 0  12  108   480   1500   3780    8232   16128...
6  | 0  28  351  2016   7750  23220   58653  130816...
7  | 0  56 1053  8064  38750 139320  410571 1046528...
8  | 0 120 3240 32640 195000 839160 2881200 8386560...
...
For T(4,2)=6, the chiral pairs are AAAB-BAAA, AABA-ABAA, AABB-BBAA, ABAB-BABA, ABBB-BBBA, and BABB-BBAB.
		

Crossrefs

Columns 2-5 for n > 1 are A032085, A032086, A032087, A032088.
Column 6 is A320524.
Rows 2-6 are A161680, A006002(n-1), A083374, A321672, A085744.
Cf. A003992 (oriented), A277504 (unoriented), A321391 (achiral).

Programs

  • Mathematica
    Table[Function[n, (k^n - k^(Ceiling[n/2]))/2][m - k + 1], {m, 11}, {k, m, 1, -1}] // Flatten (* Michael De Vlieger, Oct 11 2017 *)
  • PARI
    T(n,k) = (k^n - k^(ceil(n/2)))/2;

Formula

T(n,k) = (k^n - k^(ceiling(n/2)))/2.
G.f. for column k: (1/2)*(k - 1)*k*x^2/((k*x^2 - 1)*(k*x - 1)). - Petros Hadjicostas, Jul 07 2018
From Robert A. Russell, Nov 16 2018: (Start)
T(n,k) = (A003992(k,n) - A321391(n,k)) / 2.
T(n,k) = = A003992(k,n) - A277504(n,k) = A277504(n,k) - A321391(n,k).
G.f. for row n: (Sum_{j=0..n} S2(n,j)*j!*x^j/(1-x)^(j+1) - Sum_{j=0..ceiling(n/2)} S2(ceiling(n/2),j)*j!*x^j/(1-x)^(j+1)) / 2, where S2 is the Stirling subset number A008277.
G.f. for row n>1: x * Sum_{k=1..n-1} A145883(n,k) * x^k / (1-x)^(n+1).
E.g.f. for row n: (Sum_{k=0..n} S2(n,k)*x^k - Sum_{k=0..ceiling(n/2)} S2(ceiling(n/2),k)*x^k) * exp(x) / 2, where S2 is the Stirling subset number A008277.
T(0,k) = T(1,k) = 0; T(2,k) = binomial(k,2); for n>2, T(n,k) = k*(T(n-3,k)+T(n-2,k)-k*T(n-1,k)).
For k>n, T(n,k) = Sum_{j=1..n+1} -binomial(j-n-2,j) * T(n,k-j). (End)

A032121 Number of reversible strings with n beads of 4 colors.

Original entry on oeis.org

1, 4, 10, 40, 136, 544, 2080, 8320, 32896, 131584, 524800, 2099200, 8390656, 33562624, 134225920, 536903680, 2147516416, 8590065664, 34359869440, 137439477760, 549756338176, 2199025352704, 8796095119360, 35184380477440, 140737496743936, 562949986975744
Offset: 0

Views

Author

Keywords

Comments

Also the number of 4-ary strings of length m = n+1 with number of 1's, 2's and 3's all even. Bijective proof, anyone? - Frank Ruskey, Jul 14 2002

Examples

			a(2) = 10 = |{000, 110,101,011, 220,202,022, 330,303,033}|.
		

Crossrefs

Column 4 of A277504.
Cf. A000302 (oriented), A032087(n>1) (chiral), A056450 (achiral).

Programs

  • Mathematica
    k = 4; Table[(k^n + k^Ceiling[n/2])/2, {n, 0, 30}] (* Robert A. Russell, Nov 25 2017 *)
    LinearRecurrence[{4, 4, -16}, {1, 4, 10}, 31] (* Robert A. Russell, Nov 10 2018 *)
    CoefficientList[Series[1/4 E^(-2 x) (-1 + 3 E^(4 x) + 2 E^(6 x)), {x, 0, 20}], x]*Table[n!, {n, 0, 20}] (* Stefano Spezia, Nov 12 2018 *)
  • PARI
    Vec((1-10*x^2) / ((1 - 2*x)*(1 + 2*x)*(1 - 4*x)) + O(x^40)) \\ Colin Barker, Nov 25 2017

Formula

"BIK" (reversible, indistinct, unlabeled) transform of 4, 0, 0, 0, ...
a(n) = (4^m+3*2^m+(-2)^m)/8, where m = n+1. - Frank Ruskey, Jul 14 2002
G.f.: (1-10x^2) / ((1-4x)*(1-4x^2)). - Maksym Voznyy (voznyy(AT)mail.ru), Jul 27 2009; corrected by R. J. Mathar, Sep 16 2009 [Adapted to offset 0 by Robert A. Russell, Nov 10 2018]
From Colin Barker, Nov 25 2017: (Start)
a(n) = 2^(n-2) * (3 + (-1)^(1+n) + 2^(1+n)).
a(n) = 4*a(n-1) + 4*a(n-2) - 16*a(n-3) for n>2.
(End)
a(n) = (4^n + 4^floor((n+1)/2)) / 2 = (A000302(n) + A056450(n)) / 2. - Robert A. Russell and Danny Rorabaugh, Jun 22 2018
E.g.f.: (1/4)*exp(-2*x)*(- 1 + 3*exp(4*x) + 2*exp(6*x)). - Stefano Spezia, Nov 12 2018

Extensions

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

A276544 Triangle read by rows: T(n,k) = number of primitive (aperiodic) reversible string structures with n beads using exactly k different colors.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 4, 4, 1, 0, 9, 15, 6, 1, 0, 16, 49, 37, 9, 1, 0, 35, 160, 183, 76, 12, 1, 0, 66, 498, 876, 542, 142, 16, 1, 0, 133, 1544, 3930, 3523, 1346, 242, 20, 1, 0, 261, 4715, 17179, 21392, 11511, 2980, 390, 25, 1
Offset: 1

Views

Author

Andrew Howroyd, Apr 09 2017

Keywords

Comments

A string and its reverse are considered to be equivalent. Permuting the colors will not change the structure.

Examples

			Triangle starts
1
0   1
0   2    1
0   4    4     1
0   9   15     6     1
0  16   49    37     9     1
0  35  160   183    76    12    1
0  66  498   876   542   142   16   1
0 133 1544  3930  3523  1346  242  20  1
0 261 4715 17179 21392 11511 2980 390 25 1
...
Primitive reversible word structures are:
n=1: a => 1
n=2: ab => 1
n=3: aab, aba; abc => 2 + 1
n=4: aaab, aaba, aabb, abba => 4 (k=2)
     aabc, abac, abbc, abca => 4 (k=3)
		

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

Columns 2-6 are A056336, A056337, A056338, A056339, A056340.
Partial row sums include A056331, A056332, A056333, A056334, A056335.
Row sums are A276549.

Programs

  • Mathematica
    Ach[n_, k_] := Ach[n, k] = Switch[k, 0, If[n == 0, 1, 0], 1, If[n > 0, 1, 0], _, If[OddQ[n], Sum[Binomial[(n - 1)/2, i] Ach[n - 1 - 2 i, k - 1], {i, 0, (n - 1)/2}], Sum[Binomial[n/2 - 1, i] (Ach[n - 2 - 2 i, k - 1] + 2^i Ach[n - 2 - 2 i, k - 2]), {i, 0, n/2 - 1}]]]
    T[n_, k_] := DivisorSum[n, MoebiusMu[n/#] (StirlingS2[#, k] + Ach[#, k])/2& ];
    Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 29 2018, after Robert A. Russell and Andrew Howroyd *)
  • PARI
    \\ here Ach is A304972 as matrix.
    Ach(n,m=n)={my(M=matrix(n, m, i, k, i>=k)); for(i=3, n, for(k=2, m, M[i, k]=k*M[i-2, k] + M[i-2, k-1] + if(k>2, M[i-2, k-2]))); M}
    T(n,m=n)={my(M=matrix(n, m, i, k, stirling(i, k, 2)) + Ach(n,m)); matrix(n, m, i, k, sumdiv(i, d, moebius(i/d)*M[d,k]))/2}
    { my(A=T(10)); for(n=1, #A, print(A[n, 1..n])) } \\ Andrew Howroyd, Jan 09 2020

Formula

T(n, k) = Sum_{d|n} mu(n/d) * A284949(d, k).
Showing 1-10 of 32 results. Next