A045690 Number of binary words of length n (beginning with 0) whose autocorrelation function is the indicator of a singleton.
1, 1, 2, 3, 6, 10, 20, 37, 74, 142, 284, 558, 1116, 2212, 4424, 8811, 17622, 35170, 70340, 140538, 281076, 561868, 1123736, 2246914, 4493828, 8986540, 17973080, 35943948, 71887896, 143771368, 287542736, 575076661, 1150153322, 2300289022, 4600578044, 9201120918
Offset: 1
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..3324 (first 500 terms from T. D. Noe)
- E. H. Rivals, Autocorrelation of Strings.
- E. H. Rivals, S. Rahmann Combinatorics of Periods in Strings
- E. H. Rivals, S. Rahmann, Combinatorics of Periods in Strings, Journal of Combinatorial Theory - Series A, Vol. 104(1) (2003), pp. 95-113.
- T. Sillke, How many words have the same autocorrelation value?
Crossrefs
Programs
-
Maple
a:= proc(n) option remember; `if`(n=0, 1/2, 2*a(n-1)-`if`(n::odd, 0, a(n/2))) end: seq(a(n), n=1..40); # Alois P. Heinz, Jun 24 2021
-
Mathematica
a[1] = 1; a[n_] := a[n] = If[EvenQ[n], 2*a[n-1] - a[n/2], 2*a[n-1]]; Array[a, 40] (* Jean-François Alcover, Jul 17 2015 *) Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&Min@@Divide@@@Partition[#,2,1]>1/2&]],{n,8}] (* Gus Wiseman, Mar 08 2021 *)
-
PARI
a(n)=if(n<2,n>0,2*a(n-1)-(1-n%2)*a(n\2))
Formula
a(2n) = 2*a(2n-1) - a(n) for n >= 1; a(2n+1) = 2*a(2n) for n >= 1.
a(n) = A342085(2^n). - Gus Wiseman, Mar 08 2021
Extensions
More terms from James Sellers.
Additional comments from Michael Somos, Jun 09 2000
Comments