A375036 Perimeter of n when it is considered as a "histonumber" (see Comments for definition).
2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 6, 6, 8, 10, 12, 14, 16, 18, 20, 22, 8, 8, 8, 10, 12, 14, 16, 18, 20, 22, 10, 10, 10, 10, 12, 14, 16, 18, 20, 22, 12, 12, 12, 12, 12, 14, 16, 18, 20, 22, 14, 14, 14, 14, 14, 14, 16, 18, 20, 22, 16, 16, 16, 16, 16, 16, 16, 18
Offset: 0
Examples
Histonumbers "1234", "2024" and "1000" . +---+ +---+ | | | | +---+ + + + | | | | | +---+ + + +---+ +---+ + | | | | | | | | | +---+ + + + + + + + + +---+ | 1 2 | 3 | 4 | | 2 | 0 | 2 | 4 | | 1 | 0 0 0 +---+---+---+---+ +---+---+---+---+ +---+---+---+---+ . The “1234” histonumber is a figure with a perimeter P of 16 units and a surface S of 10 square units (the surface of a histonumber is always the sum of its digits). The “2024” histonumber is a figure with a perimeter P of 20 units and a surface S of 8 square units. The “1000” histonumber is a figure with a perimeter P of 10 units and a surface S of 1 square unit. By definition, a histonumber can always be drawn in one go on a sheet of paper, without ever lifting the pencil. This seems obvious for the 1234 histonumber above but is less so for 2024 and 1000. However, this is also the case here because the pencil will pass twice below the zeros. This justifies the value P = 20 of the perimeter of 2024 and the value P = 10 of the perimeter of 1000.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..23000
- Eric Angelini, Histonumbers
Programs
-
Maple
a:= n-> (l-> (h-> 2*h+l[1]+l[-1]+add(abs(l[i]-l[i-1]) , i=2..h))(nops(l)))(convert(n, base, 10)): seq(a(n), n=0..67); # Alois P. Heinz, Jul 29 2024
-
Python
def a(n): d = [0] + list(map(int, str(n))) + [0] return 2*(len(d)-2) + sum(abs(d[i+1]-d[i]) for i in range(len(d)-1)) print([a(n) for n in range(68)]) # Michael S. Branicky, Jul 28 2024
Comments