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 #23 May 19 2023 19:56:54
%S 9,21,29,39,44,45,47,48,59,71,84,96,101,105,107,108,111,116,129,139,
%T 144,145,147,148,179,189,194,195,197,198,204,214,219,220,222,223,225,
%U 227,228,235,237,238,240,242,243,259,271,279,289
%N Numbers whose base-5 representation contains exactly one 1 and one 4.
%H Robert Israel, <a href="/A045252/b045252.txt">Table of n, a(n) for n = 1..10000</a>
%p d:= 4: # for all terms with up to d base-5 digits.
%p Res:= NULL;
%p for m from 0 to 3^(d-2)-1 do
%p L:= subs(1=3,convert(3^(d-2)+m,base,3));
%p for i from 0 to d-2 do
%p for j from i+1 to d-1 do
%p xpos:= subs(i=NULL,j=NULL, [$0..d-1]);
%p x:= add(L[i]*5^xpos[i],i=1..d-2);
%p Res:= Res, x + 5^i+4*5^j, x+4*5^i+5^j
%p od od od:
%p sort([Res]); # _Robert Israel_, Jan 19 2020
%t Select[Range[300],DigitCount[#,5,1]==DigitCount[#,5,4]==1&] (* _Harvey P. Dale_, May 04 2021 *)
%o (Magma) [k:k in [1..300]| Multiplicity(Intseq(k,5),1) eq 1 and Multiplicity(Intseq(k,5),4) eq 1]; // _Marius A. Burtea_, Jan 20 2020
%Y Cf. A007091.
%K nonn,base
%O 1,1
%A _Clark Kimberling_