login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A061877 |First digit - second digit + third digit - fourth digit ...| = 8. 1
8, 19, 80, 91, 107, 118, 129, 190, 206, 217, 228, 239, 305, 316, 327, 338, 349, 404, 415, 426, 437, 448, 459, 503, 514, 525, 536, 547, 558, 569, 602, 613, 624, 635, 646, 657, 668, 679, 701, 712, 723, 734, 745, 756, 767, 778, 789, 800, 811, 822, 833, 844, 855 (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 ]] == 8, Print[ n ]], {n, 1, 1000} ]
Select[Range[1000], Abs[Total[Times@@@Partition[Riffle[IntegerDigits[#], {1, -1}, {2, -1, 2}], 2]]]==8&] (* Harvey P. Dale, Jan 28 2019 *)
PROG
(Python)
def ok(n): return abs(sum((-1)**i*int(d) for i, d in enumerate(str(n))))==8
print(list(filter(ok, range(860)))) # Michael S. Branicky, Aug 19 2021
CROSSREFS
Sequence in context: A347125 A057452 A091560 * A297459 A297696 A242188
KEYWORD
nonn,base,easy
AUTHOR
Robert G. Wilson v, May 10 2001
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)