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

A185376 Number of binary necklaces of 2n beads for which a cut exists producing a palindrome.

Original entry on oeis.org

2, 3, 6, 9, 20, 34, 72, 129, 272, 516, 1056, 2050, 4160, 8200, 16512, 32769, 65792, 131088, 262656, 524292, 1049600, 2097184, 4196352, 8388610, 16781312, 33554496, 67117056, 134217736, 268451840, 536871040, 1073774592, 2147483649
Offset: 1

Views

Author

Tony Bartoletti, Feb 20 2011

Keywords

Comments

These are the values of A185333 for even n.
Conjecture: a(n) = 2^(n-1) + 2^((n-2^t)/(2^(t+1))), where t = number of factors of 2 in n.

Crossrefs

Cf. A185333.

Programs

  • Mathematica
    f[n_] := Block[{k = IntegerExponent[n, 2]}, 2^n/2 + 2^((n - 2^k)/(2^(k + 1)))]; Array[f, 32] (* Robert G. Wilson v, Aug 08 2011 *)
  • Python
    def a185333(n):
        if n%2: return 2**((n + 1)//2)
        k=bin(n - 1)[2:].count('1') - bin(n)[2:].count('1')
        return 2**(n//2 - 1) + 2**((n//2 - 2**k)//(2**(k + 1)))
    def a(n): return a185333(2*n)
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 29 2017, after the formula

Formula

a(n) = A185333(2n).

A185378 Number of binary necklaces of 2n beads that are identical when turned over yet cannot be cut to produce a palindrome.

Original entry on oeis.org

1, 3, 6, 15, 28, 62, 120, 255, 496, 1020, 2016, 4094, 8128, 16376
Offset: 1

Views

Author

Tony Bartoletti, Feb 20 2011

Keywords

Comments

These necklaces have bilateral symmetry across axes that involve only vertices. a(n) = A029744(2n) - A185333(2n). Conjecture: a(n) = 2^n - 2^((n - 2^t)/(2^(t+1))), where t = number of factors of 2 in n.
Showing 1-2 of 2 results.