cp's OEIS Frontend

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.

A005377 Number of low discrepancy sequences in base 4.

This page as a plain text file.
%I A005377 M0504 #32 Sep 12 2023 12:02:28
%S A005377 0,0,0,0,1,2,3,4,5,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,
%T A005377 40,42,44,46,49,52,55,58,61,64,67,70,73,76,79,82,85,88,91,94,97,100,
%U A005377 103,106,109,112,115,118,121,124,127,130,133,136,139
%N A005377 Number of low discrepancy sequences in base 4.
%D A005377 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A005377 Harald Niederreiter, <a href="http://dx.doi.org/10.1016/0022-314X(88)90025-X">Low-discrepancy and low-dispersion sequences</a>, J. Number Theory 30 (1988), no. 1, 51-70.
%F A005377 Let N(b,n) = (1/n) * Sum_{d|n} mobius(n/d) * b^d. Let M(b,n) = Sum_{k=1..n} N(b,k) with M(b,0) = 0. Let r = r(b,n) be the largest value r such that M(b,r) <= n. Then a(n) = r * (n - M(4, r)) + Sum_{h=1..r} (h-1) * N(4, h) [From Niederreiter paper]. - _Sean A. Irvine_, Jun 07 2016
%F A005377 G.f.: z^4 * (z^2+1) * (z^4-z^2+1) / (z-1)^2; [Conjectured by _Simon Plouffe_ in his 1992 dissertation, but is incorrect.]
%p A005377 N := proc(b,n)
%p A005377     option remember;
%p A005377     local d;
%p A005377     add(b^d*numtheory[mobius](n/d),d=numtheory[divisors](n)) ;
%p A005377     %/n ;
%p A005377 end proc:
%p A005377 M := proc(b,n)
%p A005377     local h;
%p A005377     if n = 0 then
%p A005377         0;
%p A005377     else
%p A005377         add(N(b,h),h=1..n) ;
%p A005377     end if;
%p A005377 end proc:
%p A005377 nMax := proc(b,s)
%p A005377     local n;
%p A005377     for n from 0 do
%p A005377         if M(b,n) > s then
%p A005377             return n-1 ;
%p A005377         end if;
%p A005377     end do:
%p A005377 end proc:
%p A005377 A005377 := proc(s)
%p A005377     local n,b;
%p A005377     b := 4 ;
%p A005377     n := nMax(b,s) ;
%p A005377     n*(s-M(b,n))+add( (h-1)*N(b,h),h=1..n) ;
%p A005377 end proc:
%p A005377 seq(A005377(n),n=1..40) ; # _R. J. Mathar_, Jun 09 2016
%t A005377 Np[b_, n_] := Np[b, n] = Sum[b^d*MoebiusMu[n/d], {d, Divisors[n]}]/n;
%t A005377 M[b_, n_] := If[n == 0, 0, Sum[Np[b, h], {h, 1, n}]];
%t A005377 nMax[b_, s_] := Module[{n}, For[n = 0, True, n++, If[M[b, n] > s, Return[n - 1]]]];
%t A005377 a[s_] := Module[{n, b}, b = 4; n = nMax[b, s]; n*(s - M[b, n]) + Sum[(h - 1)*Np[b, h], {h, 1, n}]];
%t A005377 Table[a[n], {n, 1, 61}] (* _Jean-François Alcover_, Sep 12 2023, after _R. J. Mathar_ *)
%Y A005377 Cf. A005356 (base 2), A005357 (base 3), A005358 (base 5), A274039 (Plouffe's g.f.)
%Y A005377 Cf. A001037 (N(2,n)), A027376 (N(3,n)), A027377 (N(4,n)), A062692 (M(2,n)), A114945 (M(3,n)), A114946 (M(4,n)).
%K A005377 nonn,easy
%O A005377 1,6
%A A005377 _N. J. A. Sloane_, _Simon Plouffe_
%E A005377 Terms, offset, and formula corrected by _Sean A. Irvine_, Jun 07 2016