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.

User: J. Conrad

J. Conrad's wiki page.

J. Conrad has authored 4 sequences.

A361313 a(n) = a(1)*a(n-1) + a(2)*a(n-2) + ... + a(n-5)*a(5) for n >= 6, with a(1)=0 and a(2)=a(3)=a(4)=a(5)=1.

Original entry on oeis.org

0, 1, 1, 1, 1, 0, 1, 1, 2, 3, 4, 8, 11, 20, 31, 52, 88, 143, 247, 408, 700, 1184, 2017, 3462, 5909, 10196, 17518, 30281, 52365, 90704, 157556, 273742, 476893, 831298, 1451603, 2537736, 4441262, 7782934, 13650555, 23969794, 42126241, 74105773, 130476070
Offset: 1

Author

J. Conrad, Mar 08 2023

Keywords

Comments

Shifts left 5 places under the INVERT transform.

Examples

			a(11) = a(1)*a(10) + a(2)*a(9) + a(3)*a(8) + a(4)*a(7) + a(5)*a(6) = 0*3 + 1*2 + 1*1 + 1*1 + 1*0 = 4.
		

Crossrefs

Cf. A025250.

Programs

  • Python
    def A361313(l):
        s = [0, 1, 1, 1, 1][:l]
        for n in range(5, l):
            s.append(sum([s[k] * s[n-k-1] for k in range(n-4)]))
        return s

A356891 a(n) = a(n-1) * a(n-2) + 1 if n is even, otherwise a(n) = a(n-3) + 1, with a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 2, 2, 5, 3, 16, 6, 97, 17, 1650, 98, 161701, 1651, 266968352, 161702, 43169316455105, 266968353, 11524841314155180292066, 43169316455106, 497519521785644682185076928856988997, 11524841314155180292067
Offset: 0

Author

J. Conrad, Sep 02 2022

Keywords

Examples

			For n=2, a(2) = a(0) * a(1) + 1 = 2.
For n=3, a(3) = a(0) + 1 = 2.
For n=4, a(4) = a(3) * a(2) + 1 = 5.
		

Crossrefs

Cf. A007660.

Programs

  • Mathematica
    a[n_] := a[n] = If[EvenQ[n], a[n - 1]*a[n - 2], a[n - 3]] + 1; a[0] = a[1] = 1; Array[a, 22, 0] (* Amiram Eldar, Sep 10 2022 *)
  • Python
    def A356891(length):
        output = [1] * length
        for n in range(2, length):
            output[n] += output[n-3] if n % 2 else output[n-1] * output[n-2]
        return output

A356715 Total number of distinct numbers that can be obtained by starting with 1 and applying the "Choix de Bruxelles", version 2 operation at most n times in ternary (base 3).

Original entry on oeis.org

1, 2, 3, 6, 11, 26, 68, 177, 492, 1403, 4113, 12149, 36225, 108268, 324529, 973163, 2920533, 8764041, 26303715, 78935398, 236878491, 710783343
Offset: 0

Author

J. Conrad, Aug 24 2022

Keywords

Examples

			For n = 2, a(2) = 3 since the numbers obtained are (in base 3): 1, 2, 11.
For n = 4, they expand to a(5) = 11 numbers (in base 3): 1, 2, 11, 12, 21, 22, 101, 111, 112, 121, 211.
		

Crossrefs

Cf. A323289 (decimal), A356511 (base 12)

Programs

  • Python
    # See Conrad link.
    
  • Python
    from itertools import islice
    from sympy.ntheory import digits
    def fd(d, b): return sum(b**i*di for i, di in enumerate(d[::-1]))
    def cdb2(n, base=3):
        d, out = digits(n, base)[1:], {n}
        for l in range(1, len(d)+1):
            for i in range(len(d)+1-l):
                if d[i] == 0: continue
                t = fd(d[i:i+l], base)
                out.add(fd(d[:i] + digits(2*t, base)[1:] + d[i+l:], base))
                if t&1 == 0:
                    out.add(fd(d[:i] + digits(t//2, base)[1:] + d[i+l:], base))
        return out
    def agen():
        reach, expand = {1}, [1]
        while True:
            yield len(reach) #; print(reach); print([digits(t, 3)[1:] for t in sorted(reach)])
            newreach = {r for q in expand for r in cdb2(q) if r not in reach}
            reach |= newreach
            expand = list(newreach)
    print(list(islice(agen(), 10))) # Michael S. Branicky, Aug 24 2022

Extensions

a(15)-a(19) from Michael S. Branicky, Aug 24 2022
a(20)-a(21) from Michael S. Branicky, Aug 30 2022

A356511 Total number of distinct numbers that can be obtained by starting with 1 and applying the "Choix de Bruxelles", version 2 operation at most n times in duodecimal (base 12).

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 19, 45, 107, 275, 778, 2581, 10170, 45237, 222859, 1191214, 6887258, 42894933, 287397837
Offset: 0

Author

J. Conrad, Aug 09 2022

Keywords

Examples

			For n=4, the a(4) = 5 numbers obtained are (in base 12): 1, 2, 4, 8, 14.
For n=5, they expand to a(5) = 9 numbers (in base 12): 1, 2, 4, 8, 12, 14, 18, 24, 28.
		

Crossrefs

Cf. A323289 (decimal).

Programs

  • Python
    # See Conrad link.
    
  • Python
    from itertools import islice
    from sympy.ntheory import digits
    def fd12(d): return sum(12**i*di for i, di in enumerate(d[::-1]))
    def cdb2(n):
        d, out = digits(n, 12)[1:], {n}
        for l in range(1, len(d)+1):
            for i in range(len(d)+1-l):
                if d[i] == 0: continue
                t = fd12(d[i:i+l])
                out.add(fd12(d[:i] + digits(2*t, 12)[1:] + d[i+l:]))
                if t&1 == 0:
                    out.add(fd12(d[:i] + digits(t//2, 12)[1:] + d[i+l:]))
        return out
    def agen():
        reach, expand = {1}, [1]
        while True:
            yield len(reach)
            newreach = {r for q in expand for r in cdb2(q) if r not in reach}
            reach |= newreach
            expand = list(newreach)
    print(list(islice(agen(), 14))) # Michael S. Branicky, Aug 17 2022

Extensions

a(16)-a(18) from Michael S. Branicky, Aug 17 2022