A166323 Numbers in which all the digits are larger than the arithmetic mean of their two neighbors.
110, 120, 121, 122, 130, 131, 132, 133, 134, 140, 141, 142, 143, 144, 145, 146, 150, 151, 152, 153, 154, 155, 156, 157, 158, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185
Offset: 1
Links
- Nathaniel Johnston, Table of n, a(n) for n = 1..3569 (full sequence)
Crossrefs
Cf. A135642. [R. J. Mathar, Oct 14 2009]
Programs
-
Maple
isA166323 := proc(n) local d,k: d:=convert(n,base,10): for k from 2 to nops(d)-1 do if(2*d[k]<=d[k-1]+d[k+1])then return NULL: fi: od: return n: end: seq(isA166323(n),n=100..200); # Nathaniel Johnston, Jun 17 2011
-
Mathematica
dlamQ[n_]:=And@@(#[[2]]>(#[[1]]+#[[3]])/2&/@Partition[IntegerDigits[n],3,1]) Select[Range[100,200],dlamQ] (* Harvey P. Dale, Feb 17 2011 *)
Extensions
keyword:base and most of the comment added by R. J. Mathar, Oct 14 2009
Comments