OFFSET
0,3
COMMENTS
Every element e in the image of the magma has the property that e*x = e for any x. There are no other constraints.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..36
EXAMPLE
The Cayley tables of the a(3) = 6 magmas are:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 1 1 1 1 1 1 2 1 2 1 2 1 1 3 3 3
PROG
(PARI)
permcount(v) = {my(m=1, s=0, k=0, t); for(i=1, #v, t=v[i]; k=if(i>1&&t==v[i-1], k+1, 1); m*=t*k; s+=t); s!/m}
C(d, r) = {sum(i=1, #r, my(t=r[i]); if(d%t==0, t))}
E(u, v, r) = {prod(i=1, #u, prod(j=1, #v, my(g=gcd(u[i], v[j])); C(u[i]*v[j]/g, r)^g ))}
a(n) = {if(n==0, 1, sum(k=1, n, my(s=0); forpart(r=k, forpart(p=n-k, s+=permcount(r) * permcount(p) * E(p, p, r) * E(p, r, r) )); s/(k!*(n-k)!)))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Andrew Howroyd, Nov 18 2025
STATUS
approved
