← RoseCode

ROSECODE 338

All steps

sinan · Math ·

A number for which every pair of consecutive digits has a difference of one is called a step number. For example 234321 is a step number. A pandigital number in a base B contains every digit from 0 to B-1 at least once. Let F(B,ND) denote the number of pandigital step numbers in base B with ND or less digits. You are given: F(7, 100) % 1020 = 1717291099033442979 F(10, 1000) % 1020 = 45956531342004698861 What is F(19, 191919) % 1020 ? [My timing: <10s]