login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A218085 Let S_5(x) denote the difference in counts of multiples of 5 in the interval [0,x), those with even digit sums in base 4 in one set, those with odd digit sums in base 4 in the other. Then a(n) = (-1)^s_4(n) *(S_5(n) -10*S_5(floor(n/16)) +5*S_5(floor(n/256))), where s_4(n) = A053737(n). 2

%I #38 Feb 11 2021 09:04:36

%S 0,-1,1,-1,-1,1,-2,2,2,-2,2,-3,-3,3,-3,3,6,-6,6,-6,-6,5,-5,5,5,-5,4,

%T -4,-4,4,-4,3,-3,3,-3,3,4,-4,4,-4,-4,3,-3,3,3,-3,2,-2,2,-2,2,-3,-3,3,

%U -3,3,4,-4,4,-4,-4,3,-3,3,3,-3,2,-2,-2,2,-2,1,1,-1,1,-1,0,0,0,0,0

%N Let S_5(x) denote the difference in counts of multiples of 5 in the interval [0,x), those with even digit sums in base 4 in one set, those with odd digit sums in base 4 in the other. Then a(n) = (-1)^s_4(n) *(S_5(n) -10*S_5(floor(n/16)) +5*S_5(floor(n/256))), where s_4(n) = A053737(n).

%C The sequence S_5(n) starts 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, ... for n >= 0. Apart from the initial 0, these are blocks of 5 repetitions of 1, 2, 3, 4, 5, 6, 7, 6, 7, 8, 7, 6, 7, 8, 9, 10, 11, 12, 13, 14, ...

%C Theorem. The sequence is periodic with period 2560.

%C The theorem allows us to write a recursion for S_5(n), considering n modulo 2560: S_5(n) = 10*S_5(floor(n/16)) - 5*S_5(floor(n/256)) + (-1)^s_4(n)*a(n).

%H Peter J. C. Moses, <a href="/A218085/b218085.txt">Table of n, a(n) for n = 0..2559</a>

%H Vladimir Shevelev and Peter J. C. Moses, <a href="http://arxiv.org/abs/1209.5705">A family of digit functions with large periods</a>, arXiv:1209.5705 [math.NT], 2012.

%F -9 <= a(n) <= 9, all 19 values are actually achieved.

%e a(n)=-9 for n=2411, 2412, 2414, 2491, 2492, 2494 (mod 2560);

%e a(n)=9 for n=2413, 2415, 2493, 2495 (mod 2560).

%p S := proc(n,j,x)

%p a := 0 ;

%p for r from j to x-1 by n do

%p add(d,d=convert(r,base,n-1)) ;

%p a := a+(-1)^% ;

%p end do:

%p a ;

%p end proc:

%p A218085 := proc(n)

%p S(5,0,n)-10*S(5,0,floor(n/16))+5*S(5,0,floor(n/256)) ;

%p %*(-1)^A053737(n) ;

%p end proc:

%p seq(A218085(n),n=0..80) ; # _R. J. Mathar_, Oct 31 2012

%Y Cf. A214458, A217971, A053737.

%K sign,base,easy

%O 0,7

%A _Vladimir Shevelev_ and _Peter J. C. Moses_, Oct 20 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 11:52 EDT 2024. Contains 371779 sequences. (Running on oeis4.)