Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #17 Mar 30 2023 00:49:37
%S 1,3,5,12,17,47,65,169,279,645,1025,2698,4097,9917,17345,39698,65537,
%T 161395,262145,624004,1089007,2449881,4194305,10097733,16812683,
%U 38754747,69117097,155178266,268435457,629929761,1073741825,2459703907,4400500499,9756737721
%N Number of meanders of length n.
%C A meander is a closed curve drawn by arcs of equal length and central angles of equal magnitude, starting with a positively oriented arc.
%C a(n) = 2^(n-1) + 1 iff n is prime.
%H Peter Luschny, <a href="http://oeis.org/wiki/User:Peter_Luschny/Meander">Meander</a>.
%F a(n) = Sum_{d|n} A198060(d-1,n/d-1).
%p A199932 := proc(n) local d, k, j, i; add(add(add(add(
%p (-1)^(j+i)*binomial(i,j)*binomial(n/d-1,k)^d*((n/d)/(k+1))^j,
%p i=0..d-1),j=0..d-1),k=0..(n/d-1)),d=numtheory[divisors](n)) end:
%p seq(A199932(i),i=1..34);
%t A198060[m_, n_] := Sum[ Sum[ Sum[(-1)^(j+i)*Binomial[i, j]* Binomial[n, k]^(m+1)*(n+1)^j*(k+1)^(m-j)/(k+1)^m, {i, 0, m}], {j, 0, m}], {k, 0, n}]; a[n_] := Sum[ A198060[d-1, n/d-1], {d, Divisors[n]}]; Table[a[n], {n, 1, 34}] (* _Jean-François Alcover_, Jun 27 2013 *)
%Y Cf. A198060, A200062.
%K nonn
%O 1,2
%A _Peter Luschny_, Nov 20 2011