login
A391471
Integers k such that floor((11/10)*k + 1/2) is a digit permutation of k.
1
1, 2, 3, 4, 89, 179, 269, 359, 449, 539, 629, 719, 809, 895, 896, 897, 898, 899, 1348, 1795, 1796, 1797, 1798, 1799, 2247, 2695, 2696, 2697, 2698, 2699, 3146, 3595, 3596, 3597, 3598, 3599, 4045, 4495, 4496, 4497, 4498, 4499, 4590, 4954, 5395, 5396, 5397, 5398, 5399, 6295, 6296, 6297, 6298, 6299
OFFSET
1,2
COMMENTS
Motivation: observed from 10% consumption-tax price rounding.
Leading zeros are not allowed.
If T = floor((11/10)*n + 1/2), then necessary conditions for a k-digit solution are: (i) T < 10^k (no carry to a new digit), (ii) T == n (mod 9), (iii) the multisets of digits of n and T coincide.
LINKS
FORMULA
Let T(n) = floor((11*n + 5)/10). Then n is a term iff length(n) = length(T(n)) and sort(digits(n)) = sort(digits(T(n))).
EXAMPLE
3598 is a term since T(3598) = floor((11/10)*3598 + 0.5) = 3958, a digit permutation of 3598.
89 is a term since T(89) = 98.
MAPLE
taxround := n -> floor(11*n/10 + 1/2):
isA := proc(n) local t, dn, dt;
t := taxround(n);
dn := convert(n, base, 10); dt := convert(t, base, 10);
if nops(dn) <> nops(dt) then return false fi;
sort(dn) = sort(dt)
end:
select(isA, [$1..10000]);
MATHEMATICA
T[n_] := Floor[11 n/10 + 1/2];
isA[n_] := With[{t = T[n]},
IntegerLength[n] == IntegerLength[t] &&
Sort[IntegerDigits[n]] === Sort[IntegerDigits[t]]
];
Select[Range[1, 10000], isA]
PROG
(Python)
def T(n): return (11*n + 5)//10
def ok(n):
s, t = str(n), str(T(n))
return len(s) == len(t) and sorted(s) == sorted(t)
print([k for k in range(1, 10**4) if ok(k)])
(Python)
from itertools import count, islice
def A391471_gen(): # generator of terms
return filter(lambda n:sorted(str(n))==sorted(str(11*n+5)[:-1]), count(1))
A391471_list = list(islice(A391471_gen(), 54)) # Chai Wah Wu, Dec 19 2025
(PARI)
T(n)=(11*n+5)\10;
isA(n)=
{
my(t=T(n));
if(#digits(n)!=#digits(t), return(0));
vecsort(digits(n))==vecsort(digits(t))
};
select(isA, [1..10000])
CROSSREFS
Sequence in context: A037395 A009496 A263281 * A191422 A008405 A037431
KEYWORD
nonn,base
AUTHOR
Masato Wada, Dec 14 2025
STATUS
approved