login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A275339 a(n) is the smallest number which has a water-capacity of n. 0
60, 120, 440, 168, 264, 840, 2448, 528, 1904, 624, 1360, 2295, 816, 1632, 20128, 1824, 48300, 3105, 15392, 2208, 13024, 2400, 10656, 4080, 8288, 2784, 5920, 2976, 3552, 9120 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Define the water-capacity of a number as follows: If n has the prime factorization p1^e1*p2^e2*...*pk^ek let ci be a column of height pi^ei and width 1. Juxtaposing the ci leads to a bar graph which figuratively can be filled by water from the top. The water-capacity of a number is the maximum number of cells which can be filled with water.

LINKS

Table of n, a(n) for n=1..30.

Guy L. Steele, Four Solutions to a Trivial Problem, Google Tech Talk 12/1/2015.

EXAMPLE

For example 48300 has the prime factorization 2^2*3*5^2*7*23. The bar graph below has to be rotated counterclockwise for 90 degree.

2^2   ****

3     ***W

5^2   *************************

7     *******WWWWWWWWWWWWWWWW

23    ***********************

48300 is the smallest number which has a water-capacity of 17.

MAPLE

water_capacity := proc(N) option remember; local x, k, n, left, right, wc;

x := [seq(f[1]^f[2], f = op(2, ifactors(N)))]; n := nops(x);

if n = 0 then return 0 fi; left := [seq(0, i=1..n)]; left[1] := x[1];

for k from 2 to n do left[k] := max(left[k-1], x[k]) od;

right := [seq(0, i=1..n)]; right[n] := x[n];

for k from n-1 by -1 to 1 do right[k] := max(right[k+1], x[k]) od;

wc := 0; for k from 1 to n do wc := wc + min(left[k], right[k]) - x[k] od;

wc end:

a := proc(n, search_limit) local j;

for j from 1 to search_limit do if water_capacity(j) = n then return j fi od:

return 0; end: seq(a(n, 50000), n=1..30);

MATHEMATICA

w[k_] := With[{fi = Power @@@ FactorInteger[k]}, (fi //. {a___, b_, c__, d_, e___} /; AllTrue[{c}, # < b && # < d &] :> {a, b, Sequence @@ Table[ Min[b, d], {Length[{c}]}], d, e}) - fi // Total];

a[n_] := For[k = 1, True, k++, If[w[k] == n, Return[k]]];

Array[a, 30] (* Jean-Fran├žois Alcover, Jul 21 2019 *)

CROSSREFS

Sequence in context: A177871 A252953 A309315 * A049058 A056501 A056491

Adjacent sequences:  A275336 A275337 A275338 * A275340 A275341 A275342

KEYWORD

nonn

AUTHOR

Peter Luschny, Aug 03 2016

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 14 17:24 EST 2019. Contains 329126 sequences. (Running on oeis4.)