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!)
A058899 Inconsummate numbers in base 3: no number is this multiple of the sum of its digits (in base 3). 4

%I #18 May 10 2023 12:18:28

%S 17,32,44,51,94,95,96,106,107,112,118,132,148,153,199,224,226,232,235,

%T 236,238,256,265,268,269,274,277,281,282,284,285,288,296,308,318,321,

%U 334,336,343,352,354,368,396,442,443,444,454,459,469,472

%N Inconsummate numbers in base 3: no number is this multiple of the sum of its digits (in base 3).

%H Daniel Mondot, <a href="/A058899/b058899.txt">Table of n, a(n) for n = 1..13275</a>

%p For Maple code see A058906.

%t base=3; Do[k=n; While[Apply[Plus, IntegerDigits[k, base]] n!=k&&k<250 n, k+=n]; If[k==250 n, Print[n]], {n, 1, 10^3}] (* _Vincenzo Librandi_, Sep 23 2017 *)

%o (Python)

%o from itertools import count, islice, combinations_with_replacement

%o from sympy.ntheory import digits

%o def A058899_gen(startvalue=1): # generator of terms >= startvalue

%o for n in count(max(startvalue,1)):

%o for l in count(1):

%o if 2*l*n < 3**(l-1):

%o yield n

%o break

%o for d in combinations_with_replacement((0,1,2),l):

%o if (s:=sum(d)) > 0 and sorted(digits(s*n,3)[1:]) == list(d):

%o break

%o else:

%o continue

%o break

%o A058899_list = list(islice(A058899_gen(),20)) # _Chai Wah Wu_, May 10 2023

%Y Cf. A003635, A052491, A058898-A058907.

%K nonn,base

%O 1,1

%A _N. J. A. Sloane_, Jan 09 2001

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 19 08:45 EDT 2024. Contains 371782 sequences. (Running on oeis4.)