← Complete problem index

PROJECT EULER · #0925

Larger Digit Permutation III

Statement only · UnsolvedOriginal problem ↗

Let B(n) be the smallest number larger than n that can be formed by rearranging digits of n, or 0 if no such number exists. For example, B(245)=254 and B(542)=0.

Define T(N)=n=1NB(n2). You are given T(10)=270 and T(100)=335316.

Find T(1016). Give your answer modulo 109+7.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.