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!)
A172189 Numbers n with property that n reduced mod (sum of all the other digits) is d, for each digit d. 2

%I #23 Mar 12 2019 06:30:39

%S 111,199,221,222,287,331,333,375,442,444,445,485,551,554,555,557,643,

%T 662,663,666,735,739,772,775,777,827,881,884,888,919,993,999,1011,

%U 1101,1111,1121,1144,1276,1333,1414,1453,1771,2022,2177,2202,2222,2225,2242,2288,2355,2531,2532,2537,2666,2828

%N Numbers n with property that n reduced mod (sum of all the other digits) is d, for each digit d.

%C Suppose the decimal expansion of n is n = d(p)d(p-1)…d(0).

%C Then we require that n mod (s-d(k)) = d(k) for k=0..p. [_D. S. McNeil_, Nov 21 2010; _N. J. A. Sloane_, Nov 20 2010]

%H David A. Corneth, <a href="/A172189/b172189.txt">Table of n, a(n) for n = 1..10000</a>

%e 2537 is in the sequence because 2537 mod (5+3+7) = 2, 2537 mod (2+3+7) = 5, etc.

%e 11 is not a member because 11 mod 1 is 0 not 1.

%p with(numtheory):T:=array(1..2000):for n from 1 to 3000 do:ind:=0: l:=length(n)

%p : n0:=n:indic:=0:s:=0:p:=1:for m from 1 to l do: q:=n0:u:=irem(q,10):v:=iquo(q,10):n0:=v

%p :s:=s+u: T[m]:=u:od:for i from 1 to l do:x:=T[i]: if (s-x) <>0 and irem(n,s-x)=x

%p then ind:=ind+1:else fi:od:if ind=l then printf(`%d, `, n):else fi:od:

%t Quiet@ Select[ Range[3000], (d = IntegerDigits@#; Mod[#, Total[d] - d] == d) &] (* _Giovanni Resta_, Mar 12 2019 *)

%o (PARI) isok(n) = {my(d = digits(n), s = vecsum(d)); for (k=1, #d, if (!(s-d[k]) || ((n % (s-d[k]) != d[k])), return(0));); 1;} \\ _Michel Marcus_, Mar 12 2019

%Y Cf. A007953 (sum of digits).

%K nonn,base

%O 1,1

%A _Michel Lagneau_, Nov 20 2010

%E Definition clarified by _D. S. McNeil_, Nov 20 2010

%E I rewrote the definition, comments and the example to take into account _D. S. McNeil_'s clarifications. - _N. J. A. Sloane_, Nov 20 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 April 24 14:32 EDT 2024. Contains 371960 sequences. (Running on oeis4.)