|
|
A337692
|
|
a(n) is the sum of all positive integers whose digits in base n are strictly decreasing.
|
|
1
|
|
|
0, 3, 40, 495, 6816, 108255, 1980672, 41289759, 968750080, 25296994503, 728148203520, 22912992806847, 782690956959744, 28847447610890415, 1141156999457800192, 48228647947883167935, 2168834125678237974528
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
In base n=3, a(3) is the sum of the base-3 numbers {1, 2, 10, 20, 21, 210}, which sum to 1+2+3+6+7+21 = 40.
|
|
MAPLE
|
rebase := proc(digs, b)
add( op(i, digs)*b^(i-1), i=1..nops(digs)) ;
end proc:
local a, digs, len, p ;
a := 0 ;
digs := [seq(i, i=0..b-1)] ;
for len from 1 to b do
for p in permute(digs, len) do
if op(-1, p) <> 0 and sort(p) = p then
print(p) ;
a := a+rebase(p, b) ;
end if;
end do:
end do:
print() ;
a ;
end proc:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|