login
Integers k such that floor((11/10)*k + 1/2) is a digit permutation of k.
1

%I #60 Mar 03 2026 12:18:01

%S 1,2,3,4,89,179,269,359,449,539,629,719,809,895,896,897,898,899,1348,

%T 1795,1796,1797,1798,1799,2247,2695,2696,2697,2698,2699,3146,3595,

%U 3596,3597,3598,3599,4045,4495,4496,4497,4498,4499,4590,4954,5395,5396,5397,5398,5399,6295,6296,6297,6298,6299

%N Integers k such that floor((11/10)*k + 1/2) is a digit permutation of k.

%C Motivation: observed from 10% consumption-tax price rounding.

%C Leading zeros are not allowed.

%C 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.

%H Masato Wada, <a href="/A391471/b391471.txt">Table of n, a(n) for n = 1..484</a>.

%F 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))).

%e 3598 is a term since T(3598) = floor((11/10)*3598 + 0.5) = 3958, a digit permutation of 3598.

%e 89 is a term since T(89) = 98.

%p taxround := n -> floor(11*n/10 + 1/2):

%p isA := proc(n) local t, dn, dt;

%p t := taxround(n);

%p dn := convert(n, base, 10); dt := convert(t, base, 10);

%p if nops(dn) <> nops(dt) then return false fi;

%p sort(dn) = sort(dt)

%p end:

%p select(isA, [$1..10000]);

%t T[n_] := Floor[11 n/10 + 1/2];

%t isA[n_] := With[{t = T[n]},

%t IntegerLength[n] == IntegerLength[t] &&

%t Sort[IntegerDigits[n]] === Sort[IntegerDigits[t]]

%t ];

%t Select[Range[1, 10000], isA]

%o (Python)

%o def T(n): return (11*n + 5)//10

%o def ok(n):

%o s, t = str(n), str(T(n))

%o return len(s) == len(t) and sorted(s) == sorted(t)

%o print([k for k in range(1, 10**4) if ok(k)])

%o (Python)

%o from itertools import count, islice

%o def A391471_gen(): # generator of terms

%o return filter(lambda n:sorted(str(n))==sorted(str(11*n+5)[:-1]),count(1))

%o A391471_list = list(islice(A391471_gen(),54)) # _Chai Wah Wu_, Dec 19 2025

%o (PARI)

%o T(n)=(11*n+5)\10;

%o isA(n)=

%o {

%o my(t=T(n));

%o if(#digits(n)!=#digits(t), return(0));

%o vecsort(digits(n))==vecsort(digits(t))

%o };

%o select(isA, [1..10000])

%K nonn,base

%O 1,2

%A _Masato Wada_, Dec 14 2025