The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A135738 Least positive integer with even digit sum in bases 2..n. 1

%I #17 Aug 07 2023 07:50:03

%S 3,6,10,10,54,54,54,54,130,130,130,130,390,390,2000,2000,3238,3238,

%T 4080,4080,7326,7326,16584,16584,17310,17310,17310,17310,17310,17310,

%U 17310,17310,231000,231000,231000,231000,466352,466352,466352,466352,3020830

%N Least positive integer with even digit sum in bases 2..n.

%C The sequence is obviously increasing. It seems that a(2n+1) = a(2n) for n > 1. Is there a simple proof? Is there a simple way to construct a(n)? Notice the pattern in base N, e.g., 130 = 10000010_2 = 11211_3 = 2002_4 = 1010_5 = 334_6 = 244_7 = 202_8 = 154_9 = 109_11 = {10}{10}_12 = {10}0_13.

%H "Davar55" on mersenneforum.org, <a href="http://www.mersenneforum.org/showthread.php?p=120023">Puzzles / "Sum of digits"</a>.

%e a(2)=3 since 1=1_2, 2=10_2, so 3=11_2 is the number > 0 with even digit sum (1+1) in base 2.

%e a(3)=6 since 4=100_2, 5=12_3, so 6=20_3=110_2 is the least N > 0 with even digit sum in base 2 and in base 3.

%e a(4)=a(5)=10=1010_2=101_3=22_4=20_5 is the least N > 0 having even digit sum in bases 2 through 4 and has so also in base 5.

%o (PARI) digitsum(n,b=10,s)={n=[n];while(n=divrem(n[1],b),s+=n[2]);s}

%o A135738(Bmax,n=1)={until(!n++,for(b=2,Bmax,digitsum(n,b)%2&next(2));return(n))} /* n-th element of the sequence */

%o t=1;for(b=2,100,print(b,":",t=A135738(b,t))) /* display the list */

%Y Cf. A000120, A053735, A053737, A053824, A053827-A053836, A007953.

%K nonn,base

%O 2,1

%A _M. F. Hasler_, Dec 06 2007

%E Corrected example a(3)=5 to a(3)=6 David Yablon (davar55(AT)yahoo.com), Mar 19 2010

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 May 15 02:15 EDT 2024. Contains 372536 sequences. (Running on oeis4.)