#!/usr/bin/env python3 print([(p,p%3,pow(2,(p-1)//3,p) if p%3==1 else None) for p in [29,101,281,121499449]]) print(sum([310,305,290,312,302,291,300,303,308,282]))