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-1 of 1 results.

A384330 Number of distinct subsets S of [n] such that for all 1 <= k <= n, there exist elements x,y in S (not necessarily distinct) such that x*y = 2k.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 3, 3, 8, 11, 30, 30, 57, 57, 159, 295, 427, 427, 1033, 1033, 1973, 3610, 10427, 10427, 20575, 28731, 83535, 142793, 273755, 273755, 549946, 549946, 1245416, 2289562, 6665252, 12386159, 24210731, 24210731, 71150197, 131657471, 256115337, 256115337
Offset: 0

Views

Author

DarĂ­o Clavijo, May 26 2025

Keywords

Examples

			a(6) = 3 because there are three sets that match the said condition: {1,2,3,4,5}, {1,2,4,5,6} and {1,2,3,4,5,6}.
		

Crossrefs

Programs

  • Python
    def a(n):
        if n == 0: return 1
        t = set(k << 1 for k in range(1, n+1))
        c = 0
        for i in range(1, (1 << n)+1, 2):
            s = [j+1 for j in range(n) if (i >> j) & 1]
            if len(s) == 0 or s[0] != 1: continue
            ss = set(x * y for x in s for y in s if not (x & 1 and y & 1) )
            if t.issubset(ss): c += 1
        return c
    print([a(n) for n in range(0,29)])

Formula

a(p) = a(p-1) for odd prime p. - Jinyuan Wang, May 26 2025

Extensions

More terms from Jinyuan Wang, May 26 2025
Showing 1-1 of 1 results.