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.

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

This page as a plain text file.
%I A185376 #31 May 08 2021 06:29:55
%S A185376 2,3,6,9,20,34,72,129,272,516,1056,2050,4160,8200,16512,32769,65792,
%T A185376 131088,262656,524292,1049600,2097184,4196352,8388610,16781312,
%U A185376 33554496,67117056,134217736,268451840,536871040,1073774592,2147483649
%N A185376 Number of binary necklaces of 2n beads for which a cut exists producing a palindrome.
%C A185376 These are the values of A185333 for even n.
%C A185376 Conjecture: a(n) = 2^(n-1) + 2^((n-2^t)/(2^(t+1))), where t = number of factors of 2 in n.
%H A185376 G. C. Greubel, <a href="/A185376/b185376.txt">Table of n, a(n) for n = 1..1000</a>
%F A185376 a(n) = A185333(2n).
%t A185376 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 *)
%o A185376 (Python)
%o A185376 def a185333(n):
%o A185376     if n%2: return 2**((n + 1)//2)
%o A185376     k=bin(n - 1)[2:].count('1') - bin(n)[2:].count('1')
%o A185376     return 2**(n//2 - 1) + 2**((n//2 - 2**k)//(2**(k + 1)))
%o A185376 def a(n): return a185333(2*n)
%o A185376 print([a(n) for n in range(1, 101)]) # _Indranil Ghosh_, Jun 29 2017, after the formula
%Y A185376 Cf. A185333.
%K A185376 nonn
%O A185376 1,1
%A A185376 _Tony Bartoletti_, Feb 20 2011