OFFSET
1,2
COMMENTS
Here all three of A, B and C are positive; if A and B are distinct then the solutions A X B = C and B X A = C are regarded as distinct; while A x A is counted once. A substring may be used any number of times.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
When n=6 = (110)_2 we get the substrings 1=(1)_2, 2=(10)_2, 3=(11)_2 and 6=(110)_2 with the products 1*1=1, 1*2=2, 2*1=2, 1*3=3, 3*1=3, 1*6=6, 6*1=6, 2*3=6, 3*2=6 for a total of 9. When n=8 = (1000)_2 we get the substrings 1=(1)_2, 2=(10)_2, 4=(100)_2 and 8=(1000)_2 with the products 1*1=1, 1*2=2, 2*1=2, 1*4=4, 4*1=4, 1*8=1, 8*1=1, 2*2=4, 2*4=8, 4*2=8 for a total of 10.
MAPLE
F:= proc(n) local L, ss;
L:= convert(n, base, 2);
ss:= {seq(seq(add(2^(i-j)*L[i], i=j..k), j=1..k), k=1..nops(L))} minus {0};
numboccur(true, [seq(seq(member(a*b, ss), a=ss), b=ss)]);
end proc:
seq(F(n), n=1..100); # Robert Israel, Nov 30 2015
PROG
(Haskell)
a265008 n = length [() | let cs = a165416_row n, c <- cs,
let as = takeWhile (<= c) cs, a <- as, b <- as, a * b == c]
-- Reinhard Zumkeller, Dec 05 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Marko Riedel, Nov 29 2015
STATUS
approved