This site is supported by donations to The OEIS Foundation.



(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A306520 Numbers k with property that the arithmetic mean of any subset of its digits is an integer. 0


%S 0,1,2,3,4,5,6,7,8,9,11,13,15,17,19,20,22,24,26,28,31,33,35,37,39,40,

%T 42,44,46,48,51,53,55,57,59,60,62,64,66,68,71,73,75,77,79,80,82,84,86,

%U 88,91,93,95,97,99,111,117,135,153,159,171,177,195

%N Numbers k with property that the arithmetic mean of any subset of its digits is an integer.

%C This sequence is different from A061383. Here digits in k must have all the same parity, otherwise the average of at least a pair of digits wouldn't be an integer. Note that for every 2-digit term in A061383 both digits have the same parity. But not every number whose digits have all the same parity (sequence A059708) belongs here.

%F Apparently a(158+n) = A010785(35+n).

%e 17 is in this sequence because the set of digits (1,7) has an integer average: 4.

%e 159 and 195 are in this sequence because the sets of digits (1,5), (1,9), (5,9), and (1,5,9) all have integer averages, respectively: 3, 5, 7, and 5.

%o (PARI) firstTerms_vec(n)={my(v=vector(n),c,t,w:list,h);for(i=1,+oo,w=List();forsubset(i,k,listput(w,k));listpop(w,1);forvec(j=vector(i,z,[(z==1)&&(i>1),9]),h=j[1]%2;for(l=2,#j,if((j[l]%2)!=h,next(2)));for(k=1,#w,t=vecextract(j,w[k]);if(vecsum(t)%(#w[k]),next(2)));v[c++]=fromdigits(j);if(c==n,return(v))))}

%o (PARI) isok(m,{B=10})={my(w=digits(m,B));forsubset(#w,y,if(y!=Vecsmall([]),if(vecsum(vecextract(w,y))%(#y),return(0)),next));1}

%Y Cf. A061383, A059708, A010785, A165165.

%K nonn,base

%O 1,3

%A _R. J. Cano_, Feb 21 2019

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 24 01:29 EDT 2019. Contains 323528 sequences. (Running on oeis4.)