OFFSET
1,2
LINKS
Matthew House, Table of n, a(n) for n = 1..10000
S. Alspaugh, Farmer Ted Goes 3D, Mathematics Magazine, Vol. 78, No. 3 (Jun., 2005), pp. 192-204.
M. DeLong, Undergraduate Mathematics Research at Taylor University [broken link]
EXAMPLE
A rectangular parallelepiped with side lengths 1,2 and 3 has volume 6 and surface area 22. The ratio of volume to surface area is 6/22, which is greater than the ratio of volume to surface area for any rectangular parallelepiped with integer sides and volume < 6. Therefore 6 is an almost-cube.
MATHEMATICA
s[m_] := s[m] = First[Minimize[{a*b + b*c + c*a, a*b*c == m, 1 <= a <= b <= c}, {a, b, c}, Integers]]; almostCubeQ[ n_] := (r = For[k = 1, k < n, k++, If[n/s[n] < k/s[k], Return[False]] ] ; r =!= False); Reap[For[n = 1, n <= 512, n++, If[almostCubeQ[n], Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 03 2012 *)
CROSSREFS
KEYWORD
easy,nonn,nice
AUTHOR
Shawn Alspaugh (shalspau(AT)indiana.edu) and Matt DeLong (mtdelong(AT)tayloru.edu)
EXTENSIONS
Offset corrected by Matthew House, Aug 13 2024
STATUS
approved