cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A048874 Almost-cubes: numbers n such that n/s(n) >= k/s(k) for all k

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 16, 18, 24, 27, 32, 36, 45, 48, 54, 60, 64, 72, 75, 80, 90, 96, 100, 112, 120, 125, 140, 144, 150, 168, 175, 180, 200, 210, 216, 240, 245, 252, 280, 288, 294, 320, 324, 336, 343, 378, 384, 392, 420, 432, 441, 448, 480, 486, 490, 504, 512
Offset: 1

Views

Author

Shawn Alspaugh (shalspau(AT)indiana.edu) and Matt DeLong (mtdelong(AT)tayloru.edu)

Keywords

Examples

			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.
		

Crossrefs

Cf. A033501.

Programs

  • 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 *)

Extensions

Offset corrected by Matthew House, Aug 13 2024
Showing 1-1 of 1 results.