[seqfan] Re: Proposed fix of A019989, see also A287385.

Marc LeBrun mlb at well.com
Thu Apr 18 01:39:01 CEST 2019


I agree Clark Kimberling's 64 (!) sequences A287385 et seq. are a really nice contribution to the OEIS (huzzah!)

Are any of them the same as A019989, A019990 or A019991?  If so they should be cross-linked fer shure.

Anyway the existing %N is misleading (uses OR for UNION) or even wrong ("where m = [ (n+1)/3 ]"?) and wants afixin'.


FWIW I transcribed Gosper's Macsymese into Python3:

def abcxyz1(a,b,c,x,y,z):
    def t(s):
        return {3*n for n in s}
    def u(s):
        return {n+1 for n in s}
    def v(s):
        return {n-1 for n in s}

    a = t(a)
    b = t(b)
    c = t(c)
    x = t(x)
    y = t(y)
    z = t(z)

    return [a | u(z) | v(y),
            b | v(z) | u(x),
            c | u(y) | v(x),
            x | v(c) | u(b),
            y | u(c) | v(a),
            {1} | z | u(a) | v(b)]

def abcxyz1l(l):
    return [sorted(s) for s in abcxyz1(*l)]

>>> 6*[[]]
[[], [], [], [], [], []]
>>> abcxyz1l(_)
[[], [], [], [], [], [1]]
>>> abcxyz1l(_)
[[4], [2], [], [], [], [1, 3]]
>>> abcxyz1l(_)
[[4, 10, 12], [2, 6, 8], [], [7], [11], [1, 3, 5, 9, 13]]
>>> abcxyz1l(_)
[[4, 10, 12, 16, 28, 30, 32, 36, 40], [2, 6, 8, 14, 18, 22, 24, 26, 38], [20, 34], [7, 19, 21, 25], [11, 29, 33, 35], [1, 3, 5, 9, 13, 15, 17, 23, 27, 31, 37, 39]]
>>> 






More information about the SeqFan mailing list