OFFSET
1,1
COMMENTS
The structure of digits represents a convex function or a convex object. In the graphic representation the points are connected by imaginary line segments from left to right.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
EXAMPLE
The number 742235 is a convex number.
. . . . . .
. . . . . .
7 . . . . .
. . . . . .
. . . . . 5
. 4 . . . .
. . . . 3 .
. . 2 2 . .
. . . . . .
. . . . . .
MATHEMATICA
convexQ[n_] := With[{dd = IntegerDigits[n]}, AllTrue[SequencePosition[dd, {_, _, _}][[All, 1]], dd[[#]] + dd[[#+2]] > 2 dd[[#+1]]&]];
Select[Range[100, 300], convexQ] (* Jean-François Alcover, Nov 01 2018 *)
PROG
(PARI) is(n) = my (d=digits(n), cvx=0, ccv=0, str=0); for (i=1, #d-2, my (x=d[i]+d[i+2]-2*d[i+1]); if (x>0, cvx++, x<0, ccv++, str++)); return (cvx>0 && ccv==0) \\ Rémy Sigrist, Aug 09 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Omar E. Pol, Nov 30 2007
STATUS
approved