cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A188531 #29 Dec 14 2018 16:46:18
%S A188531 1,2,3,4,9,14,19,23,24,49,74,99,119,123,124,249,374,499,599,619,623,
%T A188531 624,1249,1874,2499,2999,3099,3119,3123,3124,6249,9374,12499,14999,
%U A188531 15499,15599,15619,15623,15624,31249,46874,62499,74999,77499,77999,78099,78119
%N A188531 Numbers which contain only the digit 4 in their base-5 representation, with at most one exception. If the exception is the most-significant digit, it must be the digit 1, 2, or 3, otherwise the exception must be the digit 3.
%C A188531 The sequence lists the positive binomial coefficient predictors in base 5. For definition, see paper in link.
%H A188531 Alois P. Heinz, <a href="/A188531/b188531.txt">Table of n, a(n) for n = 1..10000</a>
%H A188531 V. Shevelev, <a href="https://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 A188531 a:= proc(n) option remember; local i, l, m, t;
%p A188531       m:= `if`(n=1, 0, a(n-1));
%p A188531       l:=NULL;
%p A188531       for t while m>0 do l:=l, irem(m, 5, 'm') od;
%p A188531       l:= array([l, 0]);
%p A188531       for i while l[i]=4 do od;
%p A188531       if l[i]<3 then l[i]:= l[i]+1
%p A188531                 else l[i]:= 4;
%p A188531                      if i>1 then l[i-1]:= 3 fi
%p A188531       fi;
%p A188531       add(l[i] *5^(i-1), i=1..t)
%p A188531     end:
%p A188531 seq(a(n), n=1..100);  # _Alois P. Heinz_, Apr 03 2011
%t A188531 aQ[n_] := Module[{d=IntegerDigits[n,5]}, s=Select[d, #!=4 &]; s=={} || s =={3} || (d[[1]]<3 && s=={d[[1]]})]; Select[Range[100000], aQ] (* _Amiram Eldar_, Dec 14 2018 *)
%o A188531 (PARI) listb(nd) = {for (i = 1, nd, my(v = vector(nd, k, 4), kstart = if (i==1, 1, 3)); for (k=kstart,3, v[i] = k; print1(fromdigits(v, 5), ", "););); print1(fromdigits(vector(nd, k, 4), 5), ", ");}
%o A188531 lista(nnd) = {for (nd=1, nnd, listb(nd););} \\ _Michel Marcus_, Dec 14 2018
%Y A188531 Cf. A089633, A188341, A188499, A188529.
%K A188531 nonn,base
%O A188531 1,2
%A A188531 _Vladimir Shevelev_, Apr 03 2011