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 A178472 #40 Sep 22 2024 02:38:48 %S A178472 0,1,1,2,1,5,1,8,4,17,1,38,1,65,19,128,1,284,1,518,67,1025,1,2168,16, %T A178472 4097,256,8198,1,16907,1,32768,1027,65537,79,133088,1,262145,4099, %U A178472 524408,1,1056731,1,2097158,16636,4194305,1,8421248,64,16777712,65539 %N A178472 Number of compositions (ordered partitions) of n where the gcd of the part sizes is not 1. %C A178472 Of course, all part sizes must be greater than 1; that condition alone gives the Fibonacci numbers, which is thus an upper bound. %C A178472 Also the number of periodic compositions of n, where a sequence is periodic if its cyclic rotations are not all different. Also compositions with non-relatively prime run-lengths. - _Gus Wiseman_, Nov 10 2019 %H A178472 Vincenzo Librandi, <a href="/A178472/b178472.txt">Table of n, a(n) for n = 1..1000</a> %H A178472 Hunki Baek, Sejeong Bang, Dongseok Kim, and Jaeun Lee, <a href="http://arxiv.org/abs/1412.2426">A bijection between aperiodic palindromes and connected circulant graphs</a>, arXiv:1412.2426 [math.CO], 2014. See Table 2. %F A178472 a(n) = Sum_{d|n & d<n} 2^(d-1) * (-mu(n/d)). %F A178472 a(n) = 2^(n-1) - A000740(n). %F A178472 a(n) = A152061(n)/2. - _George Beck_, Jan 20 2018 %F A178472 a(p) = 1 for p prime. - _Chai Wah Wu_, Sep 21 2024 %e A178472 For n=6, we have 5 compositions: <6>, <4,2>, <2,4>, <2,2,2>, and <3,3>. %e A178472 From _Gus Wiseman_, Nov 10 2019: (Start) %e A178472 The a(2) = 1 through a(9) = 4 non-relatively prime compositions: %e A178472 (2) (3) (4) (5) (6) (7) (8) (9) %e A178472 (2,2) (2,4) (2,6) (3,6) %e A178472 (3,3) (4,4) (6,3) %e A178472 (4,2) (6,2) (3,3,3) %e A178472 (2,2,2) (2,2,4) %e A178472 (2,4,2) %e A178472 (4,2,2) %e A178472 (2,2,2,2) %e A178472 The a(2) = 1 through a(9) = 4 periodic compositions: %e A178472 11 111 22 11111 33 1111111 44 333 %e A178472 1111 222 1313 121212 %e A178472 1212 2222 212121 %e A178472 2121 3131 111111111 %e A178472 111111 112112 %e A178472 121121 %e A178472 211211 %e A178472 11111111 %e A178472 The a(2) = 1 through a(9) = 4 compositions with non-relatively prime run-lengths: %e A178472 11 111 22 11111 33 1111111 44 333 %e A178472 1111 222 1133 111222 %e A178472 1122 2222 222111 %e A178472 2211 3311 111111111 %e A178472 111111 111122 %e A178472 112211 %e A178472 221111 %e A178472 11111111 %e A178472 (End) %p A178472 A178472 := n -> (2^n - add(mobius(n/d)*2^d, d in divisors(n)))/2: %p A178472 seq(A178472(n), n=1..51); # _Peter Luschny_, Jan 21 2018 %t A178472 Table[2^(n - 1) - DivisorSum[n, MoebiusMu[n/#]*2^(# - 1) &], {n, 51}] (* _Michael De Vlieger_, Jan 20 2018 *) %o A178472 (PARI) vector(60,n,2^(n-1)-sumdiv(n,d,2^(d-1)*moebius(n/d))) %o A178472 (Python) %o A178472 from sympy import mobius, divisors %o A178472 def A178472(n): return -sum(mobius(n//d)<<d-1 for d in divisors(n,generator=True) if d<n) # _Chai Wah Wu_, Sep 21 2024 %Y A178472 Cf. A000045, A008683, A011782, A178470. %Y A178472 Periodic binary words are A152061. %Y A178472 Cf. A000740, A027375, A059966, A121016, A329140, A329145. %K A178472 nonn %O A178472 1,4 %A A178472 _Franklin T. Adams-Watters_, May 28 2010 %E A178472 Ambiguous term a(0) removed by _Max Alekseyev_, Jan 02 2012