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.

A375036 Perimeter of n when it is considered as a "histonumber" (see Comments for definition).

This page as a plain text file.
%I A375036 #20 Aug 01 2024 18:25:03
%S A375036 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,
%T A375036 16,18,20,22,10,10,10,10,12,14,16,18,20,22,12,12,12,12,12,14,16,18,20,
%U A375036 22,14,14,14,14,14,14,16,18,20,22,16,16,16,16,16,16,16,18
%N A375036 Perimeter of n when it is considered as a "histonumber" (see Comments for definition).
%C A375036 A histonumber is a geometric figure that appears when we transform each digit "d" of n into a column of unit squares of height "d". The number zero becomes a horizontal segment of unit length.
%C A375036 All histonumbers are even.
%H A375036 Alois P. Heinz, <a href="/A375036/b375036.txt">Table of n, a(n) for n = 0..23000</a>
%H A375036 Eric Angelini, <a href="https://cinquantesignes.blogspot.com/2024/07/histonumbers.html">Histonumbers</a>
%e A375036 Histonumbers "1234", "2024" and "1000"
%e A375036 .
%e A375036             +---+                    +---+
%e A375036             |   |                    |   |
%e A375036         +---+   +                    +   +
%e A375036         |   |   |                    |   |
%e A375036     +---+   +   +        +---+   +---+   +
%e A375036     |   |   |   |        |   |   |   |   |
%e A375036 +---+   +   +   +        +   +   +   +   +        +---+
%e A375036 | 1   2 | 3 | 4 |        | 2 | 0 | 2 | 4 |        | 1 | 0   0   0
%e A375036 +---+---+---+---+        +---+---+---+---+        +---+---+---+---+
%e A375036 .
%e A375036 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).
%e A375036 The “2024” histonumber is a figure with a perimeter P of 20 units and a surface S of 8 square units.
%e A375036 The “1000” histonumber is a figure with a perimeter P of 10 units and a surface S of 1 square unit.
%e A375036 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.
%p A375036 a:= n-> (l-> (h-> 2*h+l[1]+l[-1]+add(abs(l[i]-l[i-1])
%p A375036            , i=2..h))(nops(l)))(convert(n, base, 10)):
%p A375036 seq(a(n), n=0..67);  # _Alois P. Heinz_, Jul 29 2024
%o A375036 (Python)
%o A375036 def a(n):
%o A375036     d = [0] + list(map(int, str(n))) + [0]
%o A375036     return 2*(len(d)-2) + sum(abs(d[i+1]-d[i]) for i in range(len(d)-1))
%o A375036 print([a(n) for n in range(68)]) # _Michael S. Branicky_, Jul 28 2024
%Y A375036 Cf. A001477, A007953, A194025 (Histogram link in the Links section).
%K A375036 nonn,look,base
%O A375036 0,1
%A A375036 _Eric Angelini_, Jul 28 2024