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!)
A260348 Numbers n such that n is divisible by (10^k - digitsum(n)), where k equals the number of digits of digitsum(n). 1

%I #34 Aug 28 2015 17:48:15

%S 5,8,9,18,21,24,26,27,36,44,45,50,54,60,62,63,72,80,81,86,90,108,116,

%T 117,126,132,134,135,140,144,152,153,162,170,171,180,200,204,206,207,

%U 210,216,224,225,230,234,240,242,243,252,260,261,264,270,306,312,314

%N Numbers n such that n is divisible by (10^k - digitsum(n)), where k equals the number of digits of digitsum(n).

%C This sequence is infinite because all numbers with a digitsum equal to 9 are part of this sequence.

%H Pieter Post, <a href="/A260348/b260348.txt">Table of n, a(n) for n = 1..12089</a>

%e a(1) = 5, because 5 divided by (10 - 5) equals 1.

%e a(7) = 26, because digitsum(26) = 8 and 26 divided by (10 - 8) equals 13.

%e a(20) = 86, the first member of this sequence where digitsum(n) >= 10. Digitsum(86) = 14, so k = 10^2 - 14 = 86, so 86 is a member of this sequence.

%t fQ[n_] := Block[{d = Total@ IntegerDigits@ n, k}, k = IntegerLength@ d;

%t Divisible[n, 10^k - d]]; Select[Range@ 314, fQ] (* or *)

%t Select[Range@ 314, Divisible[#, (10^(Floor[Log[10, Total@ IntegerDigits@ #]] + 1) - Total@ IntegerDigits@ #)] &] (* _Michael De Vlieger_, Aug 05 2015 *)

%o (Python)

%o def sod(n,m):

%o ....kk = 0

%o ....while n > 0:

%o ........kk= kk+(n%m)

%o ........n =int(n//m)

%o ....return kk

%o for c in range (1, 10**6):

%o ....k=len(str(sod(c,10)))

%o ....kl=10**k-sod(c,10)

%o ....if c%kl==0:

%o ........print (c)

%o (PARI) isok(n)=my(sd = sumdigits(n), nsd = #digits(sd)); n % (10^nsd - sd) == 0; \\ _Michel Marcus_, Aug 05 2015

%Y Cf. A005349, A007953, A113315.

%K nonn,base,less

%O 1,1

%A _Pieter Post_, Jul 23 2015

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 23 13:02 EDT 2024. Contains 371913 sequences. (Running on oeis4.)