Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
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!)

Revision History for A348730

(Underlined text is an addition; strikethrough text is a deletion.)

Showing entries 1-10 | older changes
A348730 Largest remainder of an n-digit number when divided by its sum of digits.
(history; published version)
#50 by Alois P. Heinz at Mon Nov 08 13:24:49 EST 2021
STATUS

reviewed

approved

#49 by Michel Marcus at Mon Nov 08 13:05:58 EST 2021
STATUS

proposed

reviewed

#48 by Chai Wah Wu at Mon Nov 08 12:58:45 EST 2021
STATUS

editing

proposed

#47 by Chai Wah Wu at Mon Nov 08 12:58:28 EST 2021
PROG

c = max(c, max(s % l for s in (int(''.join(q)) for p in intpartition(l, n) for q in multiset_permutations(p)) if s >= k)))

return c # Chai Wah Wu, Nov 03-08 2021

STATUS

approved

editing

#46 by Alois P. Heinz at Wed Nov 03 17:12:56 EDT 2021
STATUS

proposed

approved

#45 by Chai Wah Wu at Wed Nov 03 14:40:17 EDT 2021
STATUS

editing

proposed

#44 by Chai Wah Wu at Wed Nov 03 14:40:06 EDT 2021
PROG

c = max(s % l for s in (int(''.join(q)) % l )) for p in intpartition(l, n) for q in multiset_permutations(p) )) if int(''.join(q)) >= s >= k)

#43 by Chai Wah Wu at Wed Nov 03 14:37:52 EDT 2021
PROG

return c # Chai Wah Wu, Nov 03 2021

STATUS

proposed

editing

#42 by Chai Wah Wu at Wed Nov 03 14:17:18 EDT 2021
STATUS

editing

proposed

#41 by Chai Wah Wu at Wed Nov 03 14:17:05 EDT 2021
PROG

from sympy.utilitiescombinatorics.iterablespartitions import multiset_permutationsIntegerPartition

from sympy.utilities.iterables import partitions, multiset_permutations

def intpartition(n, m): return tuple(''.join(str(d) for d in IntegerPartition(p).partition+[0]*(m-s)) for s, p in partitions(n, k=9, m=m, asize=1):True))

if m == 1: return (str(n), ) if 1 <= n <= 9 else ()

return tuple(str(i)+s for i in range(a, min(n//m+1, 10)) for s in intpartition(n-i, m-1, i))

l, c, k = 9*n, 0, 10**(n-1)

c = max(int(''.join(q)) % l for p in intpartition(l, n) for q in multiset_permutations(p))) if int(''.join(q)) >= k)

return c # Chai Wah Wu, Nov 0203 2021

STATUS

approved

editing

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 September 12 01:49 EDT 2024. Contains 375842 sequences. (Running on oeis4.)