A074099 Duplicate of A006788.
1, 1, 1, 2, 3, 5, 9, 16, 28, 51, 93, 170, 315, 585, 1092, 2048, 3855, 7281, 13797, 26214, 49932
Offset: 1
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.
a(5) = 3 corresponding to the necklaces 00001, 00111, 01011. a(6) = 5 from 000001, 000011, 000101, 000111, 001011.
with(numtheory); A000048 := proc(n) local d,t1; if n = 0 then RETURN(1) else t1 := 0; for d from 1 to n do if n mod d = 0 and d mod 2 = 1 then t1 := t1+mobius(d)*2^(n/d)/(2*n); fi; od; RETURN(t1); fi; end;
a[n_] := Total[ MoebiusMu[#]*2^(n/#)& /@ Select[ Divisors[n], OddQ]]/(2n); a[0] = 1; Table[a[n], {n,0,35}] (* Jean-François Alcover, Jul 21 2011 *) a[ n_] := If[ n < 1, Boole[n == 0], DivisorSum[ n, MoebiusMu[#] 2^(n/#) &, OddQ] / (2 n)]; (* Michael Somos, Dec 20 2014 *)
A000048(n) = sumdiv(n,d,(d%2)*(moebius(d)*2^(n/d)))/(2*n) \\ Michael B. Porter, Nov 09 2009
L(n, k) = sumdiv(gcd(n,k), d, moebius(d) * binomial(n/d, k/d) ); a(n) = sum(k=0, n, if( (n+k)%2==1, L(n, k), 0 ) ) / n; vector(55,n,a(n)) \\ Joerg Arndt, Jun 28 2012
from sympy import divisors, mobius def a(n): return 1 if n<1 else sum(mobius(d)*2**(n//d) for d in divisors(n) if d%2)//(2*n) # Indranil Ghosh, Apr 28 2017
[Floor(2^(n-1)/n + 1/2): n in [1..45]]; // Vincenzo Librandi, Jul 21 2011
Table[Floor[2^(n-1)/n + 1/2], {n,40}] (* Harvey P. Dale, Jul 20 2011 *)
a(4) = 1*4*9*16 mod 1*3*6*10 = 576 mod 90 = 36.
s=t=1 for n in range(1,33): s*=n*n t*=n*(n+1)//2 print(s%t, end=', ')
Comments