login
Numbers which contain only the digit 5 in their base-6 representation, with at most one exception. If the exception is the most-significant digit, it must be the digit 1, 2, 3, or 4, otherwise the exception must be the digit 4.
4

%I #20 Nov 14 2014 08:14:40

%S 1,2,3,4,5,11,17,23,29,34,35,71,107,143,179,209,214,215,431,647,863,

%T 1079,1259,1289,1294,1295,2591,3887,5183,6479,7559,7739,7769,7774,

%U 7775,15551,23327,31103,38879,45359,46439,46619,46649,46654,46655,93311,139967

%N Numbers which contain only the digit 5 in their base-6 representation, with at most one exception. If the exception is the most-significant digit, it must be the digit 1, 2, 3, or 4, otherwise the exception must be the digit 4.

%C The sequence lists the positive binomial coefficient predictors in base 6. For definition, see paper in link.

%H Alois P. Heinz, <a href="/A188532/b188532.txt">Table of n, a(n) for n = 1..1000</a>

%H V. Shevelev, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL14/Shevelev/shevelev14.html">Binomial Coefficient Predictors</a>, Journal of Integer Sequences, Vol. 14 (2011), Article 11.2.8

%p a:= proc(n) option remember; local i, l, m, t;

%p m:= `if`(n=1, 0, a(n-1));

%p l:=NULL;

%p for t while m>0 do l:=l, irem(m, 6, 'm') od;

%p l:= array([l, 0]);

%p for i while l[i]=5 do od;

%p if l[i]<4 then l[i]:= l[i]+1

%p else l[i]:= 5;

%p if i>1 then l[i-1]:= 4 fi

%p fi;

%p add(l[i] *6^(i-1), i=1..t)

%p end:

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Apr 03 2011

%Y Cf. A089633, A188341, A188499, A188529, A188531.

%K nonn,base

%O 1,2

%A _Vladimir Shevelev_, Apr 03 2011