OFFSET
1,1
COMMENTS
Inspired by Saturday Morning Breakfast Cereal comics.
The "Fouriest" numbers. The number shown in the comment, 624, is correctly identified as a term of the sequence.
LINKS
David Consiglio, Jr., Table of n, a(n) for n = 1..461
Saturday Morning Breakfast Cereal comics, Teaching math was way more fun after tenure, Feb 01 2013.
EXAMPLE
624 is a member of this sequence because 624 expressed in base 5 is 4444. 4444 has 4 digits and 624 has only 3.
PROG
(Python)
from math import log
def A349031(limit):
super_fours = []
for length in range(4, int(log(limit, 5))+1):
fours = "4"*length
for base in range(5, 10):
keep = 4*(1-base**length)//(1-base)
if len(str(keep)) < len(fours) and keep < limit:
super_fours.append(keep)
return sorted(super_fours)
result = A349031(10**20)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
David Consiglio, Jr., Nov 06 2021
STATUS
approved
