|
|
A060980
|
|
|First digit - second digit + third digit - fourth digit ...| = 12.
|
|
27
|
|
|
309, 408, 419, 507, 518, 529, 606, 617, 628, 639, 705, 716, 727, 738, 749, 804, 815, 826, 837, 848, 859, 903, 914, 925, 936, 947, 958, 969, 1409, 1508, 1519, 1607, 1618, 1629, 1706, 1717, 1728, 1739, 1805, 1816, 1827, 1838, 1849, 1904, 1915, 1926, 1937
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
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 ] ] == 12, Print[ n ] ], {n, 1, 2000} ]
Select[Range[2000], Abs[Total[Times@@@Partition[Riffle[IntegerDigits[#], {1, -1}, {2, -1, 2}], 2]]]==12&] (* Harvey P. Dale, Sep 12 2017 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|