cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A215730 a(n) is the smallest m for which 7^m contains n consecutive identical digits.

This page as a plain text file.
%I A215730 #45 Nov 09 2024 14:38:54
%S A215730 0,6,31,71,172,175,1961,6176,33836,61282,305871,856635,2135396,
%T A215730 7291510,11032874,30775389
%N A215730 a(n) is the smallest m for which 7^m contains n consecutive identical digits.
%C A215730 a(13) > 1116000. - _Chai Wah Wu_, Dec 17 2014
%C A215730 a(14) > 7*10^6. - _Giovanni Resta_, Apr 20 2016
%e A215730 7^31 = 157775382034845806615042743 contains 3 consecutive identical digits.
%o A215730 (Python)
%o A215730 import sys
%o A215730 sys.set_int_max_str_digits(200000)
%o A215730 def a(n):
%o A215730   st = "0123456789"
%o A215730   for k in range(10**6):
%o A215730     s = str(7**k)
%o A215730     tot = 0
%o A215730     for i in st:
%o A215730       if s.count(i*n) > 0:
%o A215730         tot += 1
%o A215730         break
%o A215730     if tot > 0:
%o A215730       return k
%o A215730 n = 1
%o A215730 while n < 10:
%o A215730   print(a(n), end=', ')
%o A215730   n += 1
%o A215730 # _Derek Orr_, Jul 28 2014
%o A215730 (Python)
%o A215730 def A215730(n):
%o A215730     l, x = [str(d)*n for d in range(10)], 1
%o A215730     for m in range(10**9):
%o A215730         s = str(x)
%o A215730         for k in l:
%o A215730             if k in s:
%o A215730                 return m
%o A215730         x *= 7
%o A215730     return 'search limit reached'
%o A215730 # _Chai Wah Wu_, Dec 17 2014
%Y A215730 Cf. A215736, A045875.
%K A215730 nonn,base,hard
%O A215730 1,2
%A A215730 _V. Raman_, Aug 22 2012
%E A215730 Added a(10), _Rick van der Hoorn_, Mar 26 2013
%E A215730 a(11)-a(12) from _Hiroaki Yamanouchi_, Aug 29 2014
%E A215730 a(13) from _Giovanni Resta_, Apr 19 2016
%E A215730 a(14)-a(15) from _Bert Dobbelaere_, Feb 15 2019
%E A215730 a(16) from _Paul Geneau de Lamarlière_, Jul 16 2024