login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers having four 1's in base 5.
1

%I #19 Apr 24 2021 01:59:28

%S 156,656,756,776,780,782,783,784,786,791,796,806,831,856,906,1031,

%T 1156,1406,2031,2656,3156,3256,3276,3280,3282,3283,3284,3286,3291,

%U 3296,3306,3331,3356,3406,3531,3656,3756,3776,3780

%N Numbers having four 1's in base 5.

%H Robert Israel, <a href="/A043356/b043356.txt">Table of n, a(n) for n = 1..10000</a>

%p F:= proc(d,m) option remember;

%p local A,B;

%p if m > d then return [] fi;

%p if d = 0 then return [0] fi;

%p A:= seq(seq(seq(t+i*5^(d-1),t=procname(dd,m)),dd = 0..d-1),i=2..4);

%p if m = 0 then [A]

%p else [seq(seq(t+5^(d-1),t=procname(dd,m-1)),dd=0..d-1),A]

%p fi

%p end proc:

%p map(op,[seq(F(d,4),d=4..6)]); # _Robert Israel_, Jul 02 2018

%o (PARI) isok(n) = #select(x->(x==1), digits(n, 5)) == 4; \\ _Michel Marcus_, Jul 02 2018

%Y Cf. A007091 (numbers in base 5).

%K nonn,base

%O 1,1

%A _Clark Kimberling_