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!)
A098670 Start with a(1) = 5. Construct slowest growing sequence such that the statement "the a(n)-th digit is a 2" is true for all n. 4

%I #16 Feb 02 2015 05:23:18

%S 5,6,7,8,22,220,221,222,223,224,225,226,227,228,229,230,231,232,233,

%T 234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,

%U 251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270

%N Start with a(1) = 5. Construct slowest growing sequence such that the statement "the a(n)-th digit is a 2" is true for all n.

%C 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

%H <a href="/index/Se#self-referencing_sequences">Index to the OEIS: Entries related to self-referencing sequences</a>.

%e The 5th digit of the sequence is a "2", the 6th digit also, then the 7th, the 8th, the 22nd etc.

%o (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_

%Y Cf. A114134, A098645, A210414-A210423.

%K base,easy,nonn

%O 1,1

%A _Eric Angelini_, Oct 27 2004

%E Edited and extended by _Max Alekseyev_, Feb 06 2010

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 April 23 15:17 EDT 2024. Contains 371916 sequences. (Running on oeis4.)