Last Updated: February 25, 2016
·
943
· gefei

number of 20 digit numbers where sum of no three consecutive digits is greater than 9?

Project Euler problem 164

How many 20 digit numbers n (without any leading zero) exist such that no three consecutive
digits of n have a sum greater than 9?

Solution in Python:

https://github.com/gefei/project-euler/blob/master/164.py