OFFSET
1,1
COMMENTS
a(n) = 2 iff n is 1 or an odd prime (A006005); in this case, the two factorizations are 4n = 2 * 2n. - Bernard Schott, Nov 30 2020
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
FORMULA
a(2^k) = A000041(k+2). - Bernard Schott, Dec 01 2020
EXAMPLE
a(6)=4 because 6*4=24 can be factored as 24=12*2=6*4=6*2*2.
MAPLE
with(numtheory):
b:= proc(n, i) option remember; `if`(n<=i, 1, 0)+
add(`if`(d<=i and irem(d, 2)=0 and irem(n/d, 2)=0,
b(n/d, min(d, i)), 0), d=divisors(n) minus {1, n})
end:
a:= n-> b(4*n$2):
seq(a(n), n=1..100); # Alois P. Heinz, Feb 17 2015
MATHEMATICA
b[n_, i_] := b[n, i] = If[n <= i, 1, 0] + Sum[If[d <= i && Mod[d, 2]==0 && Mod[n/d, 2]==0, b[n/d, Min[d, i]], 0], {d, Divisors[n][[2 ;; -2]]}];
a[n_] := b[4n, 4n];
Array[a, 100] (* Jean-François Alcover, Nov 05 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Christian G. Bower, Jun 06 2005
STATUS
approved