A061876 |First digit - second digit + third digit - fourth digit ...| = 7.
7, 18, 29, 70, 81, 92, 106, 117, 128, 139, 180, 191, 205, 216, 227, 238, 249, 290, 304, 315, 326, 337, 348, 359, 403, 414, 425, 436, 447, 458, 469, 502, 513, 524, 535, 546, 557, 568, 579, 601, 612, 623, 634, 645, 656, 667, 678, 689, 700, 711, 722, 733, 744
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Do[ a = IntegerDigits[ n ]; l = Length[ a ]; e = o = {}; Do[ o = Append[ o, a[[ 2k - 1 ] ]], {k, 1, l/2 + .5} ]; Do[ e = Append[ e, a[[ 2k ] ]], {k, 1, l/2} ]; If[ Abs[ Apply[ Plus, o ] - Apply[ Plus, e ]] == 7, Print[ n ]], {n, 1, 1000} ] Select[Range[1000],Abs[Total[Times@@@Partition[Riffle[IntegerDigits[#],{1,-1},{2,-1,2}],2]]]==7&] (* Harvey P. Dale, Jan 05 2013 *)