login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A130604
Numbers whose base-10 and base-7 representations are permutations of the same multiset of digits.
0
0, 1, 2, 3, 4, 5, 6, 23, 46, 265, 316, 1030, 1234, 1366, 1431, 1454, 2060, 2116, 10144, 10342, 10542, 11425, 12415, 12450, 12564, 12651, 13045, 13245, 13534, 14610, 15226, 15643, 16255, 16546, 16633, 101046, 101264, 102615, 103260, 103316, 103460, 103461, 103462, 103463, 103464, 103465, 103466, 104126, 104632, 104650, 104651, 104652, 104653, 104654, 104655, 104656, 105266, 106235, 106253, 113256, 116336
OFFSET
1,3
COMMENTS
The sequence is finite and full since any d-digit number is < 7^d in base 7 and > 10^(d-1) in base 10. But 1000000 = 10^6 > 7^7 = 823543, so any term must have 6 or fewer digits and all those are present. - Michael S. Branicky, Apr 22 2023
EXAMPLE
14610 is represented as 14610 in base 10 and as 60411 in base 7. Each representation is a permutation of the multiset {0,1,1,4,6}.
MATHEMATICA
Select[Range[10, 110000], Sort[IntegerDigits[#]]==Sort[IntegerDigits[#, 7]]&] (* Harvey P. Dale, Sep 23 2017 *)
PROG
(Python)
from sympy.ntheory import digits
def ok(n): return sorted(map(int, str(n))) == sorted(digits(n, 7)[1:])
print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Apr 22 2023
CROSSREFS
Sequence in context: A342999 A037404 A037440 * A359224 A262434 A246908
KEYWORD
nonn,base,fini,full
AUTHOR
Paul Lusch, Aug 10 2007
EXTENSIONS
a(1)-a(7) inserted and a(43)-a(61) from Michael S. Branicky, Apr 22 2023
STATUS
approved