login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A358180 Indices for A358168. 4
1, 30, 162, 1150, 11603, 104511, 1041245, 10226995, 101514698, 1008495923, 10060201866 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(6)-a(7) from Chuck Gaydos.
LINKS
MATHEMATICA
nn = 2^20; q[_] = False; q[0] = True; a[_] = 0; c[_] = -1; c[0] = 2; m = 1; {1}~Join~Reap[Do[j = c[m]; a[n] = m; c[m] = n; m = 0; If[j > 0, m = n - j]; If[! q[#2], Sow[n]; q[#2] = True] & @@ {a[n], IntegerLength[a[n]]}, {n, 3, nn}] ][[-1, -1]] (* Michael De Vlieger, Nov 05 2022 *)
PROG
(Python)
from itertools import count
def A358180(n):
b, bdict, k = 0, {0:(1, )}, 10**(n-1) if n > 1 else 0
for m in count(2):
if b >= k:
return m-1
if len(l := bdict[b]) > 1:
b = m-1-l[-2]
if b in bdict:
bdict[b] = (bdict[b][-1], m)
else:
bdict[b] = (m, )
else:
b = 0
bdict[0] = (bdict[0][-1], m) # Chai Wah Wu, Nov 05 2022
CROSSREFS
Sequence in context: A064240 A141221 A159884 * A359025 A074357 A140594
KEYWORD
nonn,hard,more
AUTHOR
G. L. Honaker, Jr., Nov 02 2022
EXTENSIONS
a(8) from Michael De Vlieger, Nov 05 2022
a(9)-a(10) from Chai Wah Wu, Nov 05 2022
a(11) from Martin Ehrenstein, Nov 05 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 2 10:51 EDT 2024. Contains 372196 sequences. (Running on oeis4.)