cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A113028 a(n) is the largest integer whose base n digits are all different that is divisible by each of its individual digits.

This page as a plain text file.
%I A113028 #33 May 08 2024 14:49:33
%S A113028 1,2,54,108,152,16200,2042460,4416720,9867312,2334364200,421877610,
%T A113028 1779700673520,4025593863720,8605596007008,1147797065081426760,
%U A113028 2851241701975626960,6723295828605676320,5463472083393768444000,32677216797923569872,29966837620559153371200
%N A113028 a(n) is the largest integer whose base n digits are all different that is divisible by each of its individual digits.
%C A113028 Note that this definition precludes the digit 0 appearing anywhere in the base n representation of the number.
%D A113028 "Enigma 1343: Digital Dividend", New Scientist, Jun 04 2005, p. 28.
%H A113028 Jes Wolfe, <a href="/A113028/b113028.txt">Table of n, a(n) for n = 2..48</a>
%H A113028 Michael S. Branicky, <a href="/A113028/a113028.py.txt">Python program</a>
%H A113028 Jes Wolfe, <a href="/A113028/a113028.txt">Even faster python program</a>
%e A113028 a(2) = 1 trivially because that is the only number in base 2 that does not contain 0.
%e A113028 a(4) = 54 because in base 4, 54 is 312_4. There is only one number containing different digits and no zeros higher than that, namely 321_4, but 321_4 is not divisible by 2.
%o A113028 (Python) # see link for a faster version
%o A113028 from itertools import permutations
%o A113028 def fromdigits(d, b):
%o A113028     n = 0
%o A113028     for di in d: n *= b; n += di
%o A113028     return n
%o A113028 def a(n):
%o A113028     for digits in range(n-1, 0, -1):
%o A113028         for p in permutations(range(n-1, 0, -1), r=digits):
%o A113028             t = fromdigits(p, n)
%o A113028             if all(t%di == 0 for di in p):
%o A113028                 return t
%o A113028 print([a(n) for n in range(2, 11)]) # _Michael S. Branicky_, Jan 17 2022
%K A113028 nonn,base
%O A113028 2,2
%A A113028 _Peter Boothe_, Jan 03 2006
%E A113028 a(11)-a(13) from Francis Carr (fcarr(AT)alum.mit.edu), Feb 08 2006
%E A113028 a(14) from _Michael S. Branicky_, Jan 17 2022
%E A113028 a(15)-a(17) from _Michael S. Branicky_, Jan 20 2022
%E A113028 a(18)-a(21) from _Jes Wolfe_, Apr 26 2024