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.

A348532 a(n) is the number of multisets of integers that are possible to reach by starting with n occurrences of 0 and by splitting and reverse splitting.

This page as a plain text file.
%I A348532 #81 Nov 19 2021 07:44:42
%S A348532 1,1,2,2,7,9,43,59,338,490,3097,4639,31283,48107,338553,531469,
%T A348532 3857036,6157068,45713546,73996100
%N A348532 a(n) is the number of multisets of integers that are possible to reach by starting with n occurrences of 0 and by splitting and reverse splitting.
%C A348532 Splitting is taking 2 occurrences of the same integer and incrementing one of them by 1 and decrementing the other occurrence by 1.
%C A348532 Reverse splitting is taking two elements with a difference of 2 and incrementing the smaller one by 1 and decrementing the larger one by 1. It is the opposite of splitting.
%F A348532 It appears that a(n) = A000571(n) for odd n.
%e A348532 For n = 5, the multisets are as follows:
%e A348532   {{0,0,0,0,0}}   {{-1,0,0,0,1}}   {{-1,-1,0,1,1}}
%e A348532   {{-1,-1,0,0,2}} {{-1,-1,-1,1,2}} {{-2,0,0,1,1}}
%e A348532   {{-2,0,0,0,2}}  {{-2,-1,1,1,1}}  {{-2,-1,0,1,2}}.
%e A348532   Therefore, a(5) = 9.
%e A348532 For n = 6, the multisets are as follows:
%e A348532   {{0,0,0,0,0,0}}     {{-1,0,0,0,0,1}}     {{-1,-1,0,0,1,1}}
%e A348532   {{-1,-1,0,0,0,2}}   {{-1,-1,-1,1,1,1}}   {{-1,-1,-1,0,1,2}}
%e A348532   {{-1,-1,-1,0,0,3}}* {{-1,-1,-1,-1,2,2}}* {{-1,-1,-1,-1,1,3}}*
%e A348532   {{-2,0,0,0,1,1}}    {{-2,0,0,0,0,2}}     {{-2,-1,0,1,1,1}}
%e A348532   {{-2,-1,0,0,1,2}}   {{-2,-1,0,0,0,3}}*   {{-2,-1,-1,1,1,2}}
%e A348532   {{-2,-1,-1,0,2,2}}  {{-2,-1,-1,0,1,3}}   {{-2,-1,-1,-1,2,3}}*
%e A348532   {{-2,-2,1,1,1,1}}*  {{-2,-2,0,1,1,2}}    {{-2,-2,0,0,2,2}}
%e A348532   {{-2,-2,0,0,1,3}}   {{-2,-2,-1,1,2,2}}   {{-2,-2,-1,1,1,3}}
%e A348532   {{-2,-2,-1,0,2,3}}  {{-2,-2,-2,2,2,2}}*  {{-2,-2,-2,1,2,3}}*
%e A348532   {{-3,0,0,0,0,3}}*   {{-3,0,0,0,1,2}}*    {{-3,0,0,1,1,1}}*
%e A348532   {{-3,-1,1,1,1,1}}*  {{-3,-1,0,1,1,2}}    {{-3,-1,0,0,2,2}}
%e A348532   {{-3,-1,0,0,1,3}}   {{-3,-1,-1,1,2,2}}   {{-3,-1,-1,1,1,3}}
%e A348532   {{-3,-1,-1,0,2,3}}  {{-3,-2,1,1,1,2}}*   {{-3,-2,0,1,2,2}}
%e A348532   {{-3,-2,0,1,1,3}}   {{-3,-2,0,0,2,3}}    {{-3,-2,-1,2,2,2}}*
%e A348532   {{-3,-2,-1,1,2,3}}.
%e A348532   Therefore, a(6) = 43.
%e A348532 The ones marked with an asterisk are the ones that need reverse splitting
%e A348532 to be reached. They are not produced using the rules of A347913.
%o A348532 (Python)
%o A348532 def nextq(q):
%o A348532     used, used2 = set(), set()
%o A348532     for i in range(len(q)-1):
%o A348532         for j in range(i+1, len(q)):
%o A348532             if q[i] == q[j]:
%o A348532                 if q[i] in used: continue
%o A348532                 used.add(q[i])
%o A348532                 qc = list(q); qc[i] -= 1; qc[j] += 1
%o A348532                 yield tuple(sorted(qc))
%o A348532             elif q[j] - q[i] == 2:  # assumes q is sorted
%o A348532                 if q[i] in used2: continue
%o A348532                 used2.add(q[i])
%o A348532                 qc = list(q); qc[i] += 1; qc[j] -= 1
%o A348532                 yield tuple(sorted(qc))
%o A348532 def a(n):
%o A348532     s = tuple(0 for i in range(n)); reach = {s}; expand = list(reach)
%o A348532     while len(expand) > 0:
%o A348532         q = expand.pop()
%o A348532         for qq in nextq(q):
%o A348532             if qq not in reach:
%o A348532                 reach.add(qq)
%o A348532                 expand.append(qq)
%o A348532     return len(reach)
%o A348532 print([a(n) for n in range(13)]) # _Michael S. Branicky_, Oct 21 2021
%Y A348532 Cf. A000571, A347913.
%K A348532 nonn,more
%O A348532 0,3
%A A348532 _Tejo Vrush_, Oct 21 2021
%E A348532 a(6)-a(19) from _Michael S. Branicky_, Oct 21 2021