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
5, 8, 9, 18, 21, 24, 26, 27, 36, 44, 45, 50, 54, 60, 62, 63, 72, 80, 81, 86, 90, 108, 116, 117, 126, 132, 134, 135, 140, 144, 152, 153, 162, 170, 171, 180, 200, 204, 206, 207, 210, 216, 224, 225, 230, 234, 240, 242, 243, 252, 260, 261, 264, 270, 306, 312, 314 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This sequence is infinite because all numbers with a digitsum equal to 9 are part of this sequence.
LINKS
EXAMPLE
a(1) = 5, because 5 divided by (10 - 5) equals 1.
a(7) = 26, because digitsum(26) = 8 and 26 divided by (10 - 8) equals 13.
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.
MATHEMATICA
fQ[n_] := Block[{d = Total@ IntegerDigits@ n, k}, k = IntegerLength@ d;
Divisible[n, 10^k - d]]; Select[Range@ 314, fQ] (* or *)
Select[Range@ 314, Divisible[#, (10^(Floor[Log[10, Total@ IntegerDigits@ #]] + 1) - Total@ IntegerDigits@ #)] &] (* Michael De Vlieger, Aug 05 2015 *)
PROG
(Python)
def sod(n, m):
....kk = 0
....while n > 0:
........kk= kk+(n%m)
........n =int(n//m)
....return kk
for c in range (1, 10**6):
....k=len(str(sod(c, 10)))
....kl=10**k-sod(c, 10)
....if c%kl==0:
........print (c)
(PARI) isok(n)=my(sd = sumdigits(n), nsd = #digits(sd)); n % (10^nsd - sd) == 0; \\ Michel Marcus, Aug 05 2015
CROSSREFS
Sequence in context: A046287 A051220 A102785 * A276934 A127493 A331442
KEYWORD
nonn,base,less
AUTHOR
Pieter Post, Jul 23 2015
STATUS
approved

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 16 08:27 EDT 2024. Contains 371698 sequences. (Running on oeis4.)