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.
%I A007148 M0774 #53 May 02 2020 16:39:46 %S A007148 1,2,3,6,10,20,37,74,143,284,559,1114,2206,4394,8740,17418,34696, %T A007148 69194,137971,275280,549258,1096286,2188333,4369162,8724154,17422652, %U A007148 34797199,69505908,138845926,277383872,554189329,1107297290,2212558942 %N A007148 Number of self-complementary 2-colored bracelets (turnover necklaces) with 2n beads. %D A007148 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A007148 Vincenzo Librandi, <a href="/A007148/b007148.txt">Table of n, a(n) for n = 1..1000</a> %H A007148 E. M. Palmer and R. W. Robinson, <a href="http://projecteuclid.org/euclid.pjm/1102711113">Enumeration of self-dual configurations</a> Pacific J. Math., 110 (1984), 203-221. %H A007148 F. Ruskey, <a href="http://combos.org/necklace">Necklaces, Lyndon words, De Bruijn sequences, etc.</a> %H A007148 F. Ruskey, <a href="/A000011/a000011.pdf">Necklaces, Lyndon words, De Bruijn sequences, etc.</a> [Cached copy, with permission, pdf format only] %H A007148 <a href="/index/Br#bracelets">Index entries for sequences related to bracelets</a> %F A007148 a(n) = 2^(n-2) + (1/(4n)) * Sum_{d|n} phi(2d)*2^(n/d). - _N. J. A. Sloane_, Sep 25 2012 %F A007148 a(n) = (1/2)*(A000079(n-1) + A000013(n)). %p A007148 # see A245558 %p A007148 L := proc(n,k) %p A007148 local a,j ; %p A007148 a := 0 ; %p A007148 for j in numtheory[divisors](igcd(n,k)) do %p A007148 a := a+numtheory[mobius](j)*binomial(n/j,k/j) ; %p A007148 end do: %p A007148 a/n ; %p A007148 end proc: %p A007148 A007148 := proc(n) %p A007148 local a,k,l; %p A007148 a := 0 ; %p A007148 for k from 1 to n do %p A007148 for l in numtheory[divisors](igcd(n,k)) do %p A007148 a := a+L(n/l,k/l)*ceil(k/2/l) ; %p A007148 end do: %p A007148 end do: %p A007148 a; %p A007148 end proc: %p A007148 seq(A007148(n),n=1..20) ; # _R. J. Mathar_, Jul 23 2017 %t A007148 a[n_] := (1/2)*(2^(n-1) + Total[ EulerPhi[2*#]*2^(n/#) & /@ Divisors[n]]/(2*n)); Table[ a[n], {n, 1, 33}] (* _Jean-François Alcover_, Oct 25 2011 *) %o A007148 (PARI) a(n)= (1/2) *(2^(n-1)+sumdiv(n,k,eulerphi(2*k)*2^(n/k))/(2*n)) %o A007148 (Python) %o A007148 from sympy import divisors, totient %o A007148 def a(n): %o A007148 if n==1: return 1 %o A007148 return 2**(n - 2) + sum(totient(2*d)*2**(n//d) for d in divisors(n))//(4*n) %o A007148 print([a(n) for n in range(1, 31)]) # _Indranil Ghosh_, Jul 24 2017 %Y A007148 Cf. A000013, A000079, A007147. %Y A007148 Different from, but easily confused with, A045690 and A093371. %K A007148 nonn,nice,easy %O A007148 1,2 %A A007148 _N. J. A. Sloane_ %E A007148 Description corrected by _Christian G. Bower_