login
Numbers not in any sequence defined by a recurrence b(n) = 3*b(n-1) + b(n-2) having initial values b(0), b(1) in {0 ... 9}.
2

%I #40 Jun 16 2021 15:06:19

%S 100,110,112,115,118,120,121,122,124,125,127,128,130,131,133,134,135,

%T 137,138,140,141,143,144,145,147,148,150,151,153,154,155,157,158,160,

%U 161,163,164,166,167,168,170,171,173,174,176,177,178,180,181,183,184,186,187,188,190

%N Numbers not in any sequence defined by a recurrence b(n) = 3*b(n-1) + b(n-2) having initial values b(0), b(1) in {0 ... 9}.

%e 99 is not in this sequence because it is in the sequence with the recurrence a(n) = 3*a(n-1) + a(n-2) starting with 3 and 0: 3, 0, 3, 9, 30, 99, ....

%e One may check that 100 is the smallest number not in any recurrent sequence of the form a(n+2) = 3a(n+1) + a(n) with a(0) and a(1) in {0, ..., 9}. Therefore a(1) = 100.

%o (PARI) list(lim)=if(lim<100, return([0..lim\1])); my(v=List([0..99])); for(t=1,9, my(x=10*t,y=33*t); while(y<=lim, listput(v,y); [x,y]=[y,x+3*y])); for(m=1,9, for(n=1,9, my(x=m+3*n,y=3*x+n); while(y<=lim, listput(v,y); [x,y]=[y,x+3*y]))); Set(v) \\ _Charles R Greathouse IV_, Aug 14 2017 [This computes the complement.]

%Y Cf. A003688, A277605, A291179.

%K nonn

%O 1,1

%A _Bobby Jacobs_, Aug 14 2017

%E Entry revised by _M. F. Hasler_ and _N. J. A. Sloane_, Nov 24 2018

%E Definition corrected by _N. J. A. Sloane_, Jun 16 2021 (changing "a()" to "b()"). This is a list, so it has offset 1. - _N. J. A. Sloane_, Jun 16 2021