OFFSET
1,2
COMMENTS
Number of 3D grids of n congruent boxes with two different edge lengths, in a box, modulo rotation (cf. A034836 for cubes instead of boxes and A007425 for boxes with three different edge lengths; cf. A000005 for the 2D case). - Manfred Boergens, Feb 25 2021
Number of distinct faces obtainable by arranging n unit cubes into a cuboid. - Chris W. Milson, Mar 14 2021
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
Chris W. Milson, Constructing Cuboids
Chris W. Milson, A faster algorithm for a(n)
FORMULA
a(n) = Sum_{m|n} A038548(m) = Sum_{m|n} ceiling(d(m)/2), where d(m) = number of divisors of m (A000005). - Manfred Boergens, Feb 25 2021
a(n) = Sum_{d|n} A135539(d,n/d). - Ridouane Oudra, Jul 10 2021
EXAMPLE
The divisors of 20 are 1,2,4,5,10,20. There are 10 pairs of divisors whose product divides 20: 1*1=1, 1*2=2, 1*4=4, 1*5=5, 1*10=10, 1*20=20, 2*2=4, 2*5=10, 2*10=20, 4*5 = 20. Likewise, there are 10 products that are divisible by 20: 4*5=20, 2*10=20, 4*10=40, 10*10=100, 1*20=20, 2*20=40, 4*20=80, 5*20=100, 10*20=200, 20*20=400. So a(20) = 10.
MATHEMATICA
(* first do *) Needs["Combinatorica`"] (* then *) f[n_] := Count[ n/Times @@@ Union[Sort /@ Tuples[Divisors@ n, 2]], _Integer]; Array[f, 91] (* Robert G. Wilson v, May 31 2008 *)
d=Divisors[n]; r=Length[d]; Sum[Ceiling[Length[Divisors[d[[j]]]]/2], {j, r}] (* Manfred Boergens, Feb 25 2021 *)
PROG
(PARI)
\\ Two implementations, after the two different interpretations given by the author of the sequence:
A140773v1(n) = { my(ds = divisors(n), s=0); for(i=1, #ds, for(j=i, #ds, if(!(n%(ds[i]*ds[j])), s=s+1))); s; }
A140773v2(n) = { my(ds = divisors(n), s=0); for(i=1, #ds, for(j=i, #ds, if(!((ds[i]*ds[j])%n), s=s+1))); s; }
\\ Antti Karttunen, May 19 2017
(Python) # See C. W. Milson link.
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, May 29 2008
EXTENSIONS
Corrected and extended by Robert G. Wilson v, May 31 2008
STATUS
approved