Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 Jul 17 2020 14:47:56
%S 24,60,96,132,144,168,204,240,276,312,348,360,384,420,456,492,528,564,
%T 576,600,636,672,708,744,780,792,816,852,864,924,960,996,1008,1032,
%U 1068,1104,1140,1176,1212,1224,1248,1284,1320,1356
%N Numbers n such that string 4,0 occurs in the base 6 representation of n but not of n-1.
%C All terms == 4*6^k (mod 6^(k+1)) for some k >= 1. However, not all numbers of this form are in the sequence, e.g., 888. - _Robert Israel_, Jun 13 2018
%H Robert Israel, <a href="/A044126/b044126.txt">Table of n, a(n) for n = 1..10000</a>
%p N:= 10^4: # for all terms <= N
%p filter:= proc(n) local L;
%p L:= convert(n-1,base,6);
%p select(t -> L[t]=0 and L[t+1]=4, [$1..nops(L)-1])=[]
%p end proc:
%p S:= convert(`union`(seq({seq(i, i=4*6^k .. N, 6^(k+1))},k=1..floor(log[6](N/4)))),list):
%p sort(select(filter, S)); # _Robert Israel_, Jun 13 2018
%t SequencePosition[Table[If[SequenceCount[IntegerDigits[n,6],{4,0}]>0,1,0],{n,1500}],{0,1}][[All,2]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jul 17 2020 *)
%K nonn,base
%O 1,1
%A _Clark Kimberling_