Problem 414  Discussion Forum
Spoiler free discussion here!!
Remind me

Go to problem 
Take the number 134431001 as an example. We can make pairs using the 2 digits following one another: [(1, 3), (3, 4), (4, 4), (4, 3), (3, 1), (1, 0), (0, 0), (0, 1)] If we assume that these are the lattice points, we can draw line segments in the same order and we can have a polygon. In general for a kdigit number like d_{1}d_{2}...d_{k} we can have a (k1)gon: [(d_{1},d_{2}), (d_{2},d_{3}), ..., (d_{k1},d_{k})] If the drawn polygon is a convex one then we will call this kind of number as convex number. How many positive convex numbers are there? Answer format: count,sum [My timing: < 1m] Notes:  Any two neighbouring line segments cannot be collinear.  All the generated pairs must be distinct.  Some polygons can be generated by more than one number. For example: 112321, 123211, 232112, 321123, 211232 Since the numbers are different, they are all counted.
sinan  1w:3d ago

I tried to specify it with the following: "In general for a kdigit number we can have a (k1)gon"
So for 2 or 3 digits numbers we cannot have a polygon. The numbers should at least have 4 digits. 
lesnik7  1w:3d ago

Just to clarify: any 2 or 3 digit numbers are not convex, as they do not generate a polygon? Im not sure, because such numbers satisfy the conditions titled "notes"? 
sinan  2w:1d ago

C_K_Yang, It's not necessary. For example 1122 corresponds to the following points: (1,1) (1,2) (2,2) 2311 is also valid: (2,3) (3,1) (1,1) Looks like if d1=dk then more than one number can generate the same polygon. edited*

C_K_Yang  2w:1d ago

Is it necessary that d1 is equal to dk for a kdigit convex number? In your example, d1 is always equal to dk Is 2311 a valid convex number? (d1 != d4) 
sinan  2w:3d ago

Yes those are all. There are 5 points and you can start from any of those hence 5 different numbers.
But since leading zeroes not allowed there may less in some cases where a zero digit is present in the number. 
nielkh  2w:3d ago

How many and which numbers generate the polygon with vertices: (1,1)(1,2)(2,3)(3,2)(2,1)? The wording suggests: 112321, 123211, 232112, 321123, 211232. Are those all? edited*

sinan  2w:5d ago

No, they aren't. First digit is not zero. 
liuguangxi  2w:5d ago

@sinan For positive convex number, whether leading zeros are permitted (e.g. 0011)? 
1 
New Members
 JMR03 1d:1h
 MrSexysPizza 2d:9h
 N3W70N 2d:12h
 cod3bluezer0 3d:19h
 cduruk 1w:2d
Fresh Problems

Segments 17h:27m
solved by 3 
Plowing the field 2d:15h
solved by 11 
Mertens Equations 1w:2d
solved by 9 
Vampire Numbers 2w:2d
solved by 11 
Convex numbers 2w:5d
solved by 4