OFFSET
1,1
COMMENTS
The sequence goes 5, 6, 7, 8, 22, 220, 221, ..., 290, 2222, 22222, 222222, ... for 275 more digits, then for most of the rest of the sequence, a(n+1)=a(n)+1. Starting with a(1)=3 yields 3, 4, 22, 23, ..., 30, 32, 222, 2222, 2223,... for at least 2000 more digits. (The 222nd digit happens to be the initial digit of a(63)=2271.) Starting with a(1)=4 yields 4, 5, 6, 22, 23, ..., 30, 222, 2222, 2223, ... See A210416 for a variant without requirement of growth. - M. F. Hasler, Oct 08 2013
LINKS
EXAMPLE
The 5th digit of the sequence is a "2", the 6th digit also, then the 7th, the 8th, the 22nd etc.
PROG
(PARI) { a=5; P=Set(); L=0; while(1, print1(a, ", "); P=setunion(P, Set([a])); L+=#Str(a); until(g, g=1; a++; s=Vec(Str(a)); for(i=1, #s, if(setsearch(P, L+i)&&s[i]!="2", g=0; break)); ); ) } \\ Max Alekseyev
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Eric Angelini, Oct 27 2004
EXTENSIONS
Edited and extended by Max Alekseyev, Feb 06 2010
STATUS
approved