P458
projecteuler.net

Permutations of Project

ℹ️Published on Sunday, 9th February 2014, 07:00 am; Solved by 1050;
Difficulty rating: 30%

Consider the alphabet $A$ made out of the letters of the word "$\text{project}$": $A=\{\text c,\text e,\text j,\text o,\text p,\text r,\text t\}$.
Let $T(n)$ be the number of strings of length $n$ consisting of letters from $A$ that do not have a substring that is one of the $5040$ permutations of "$\text{project}$".

$T(7)=7^7-7!=818503$.

Find $T(10^{12})$. Give the last $9$ digits of your answer.



Soluzione

Last modified: May 01, 2025. Website built with Franklin.jl and the lovely Julia programming language.