login
|First digit - second digit + third digit - fourth digit ...| = 3.
1

%I #5 Nov 21 2013 12:47:30

%S 3,14,25,30,36,41,47,52,58,63,69,74,85,96,102,113,124,135,140,146,151,

%T 157,162,168,173,179,184,195,201,212,223,234,245,250,256,261,267,272,

%U 278,283,289,294,300,311,322,333,344,355,360,366,371,377,382,388,393

%N |First digit - second digit + third digit - fourth digit ...| = 3.

%H Harvey P. Dale, <a href="/A061872/b061872.txt">Table of n, a(n) for n = 1..1000</a>

%t 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 ] ] == 3, Print[ n ] ], {n, 1, 1000} ]

%t fdsdQ[n_]:=Module[{idn=IntegerDigits[n],o,e},o=Take[idn,{1,-1,2}];e= Take[ idn,{2,-1,2}];Abs[Total[o]-Total[e]]==3]; Select[Range[400],fdsdQ] (* _Harvey P. Dale_, Nov 01 2011 *)

%Y Cf. A008593, A060978-A060980, A060982, A061470-A061479, A061870-A061882.

%K nonn,base,easy

%O 1,1

%A _Robert G. Wilson v_, May 10 2001