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!)
A061875 |First digit - second digit + third digit - fourth digit ...| = 6. 1
6, 17, 28, 39, 60, 71, 82, 93, 105, 116, 127, 138, 149, 170, 181, 192, 204, 215, 226, 237, 248, 259, 280, 291, 303, 314, 325, 336, 347, 358, 369, 390, 402, 413, 424, 435, 446, 457, 468, 479, 501, 512, 523, 534, 545, 556, 567, 578, 589, 600, 611, 622, 633, 644 (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 ] ] == 6, Print[ n ] ], {n, 1, 1000} ]
Select[Range[700], Abs[Total[Times@@@Partition[Riffle[IntegerDigits[#], {1, -1}, {2, -1, 2}], 2]]]==6&] (* Harvey P. Dale, May 21 2020 *)
PROG
(Python)
def ok(n): return abs(sum(int(d)*(-1)**i for i, d in enumerate(str(n))))==6
print(list(filter(ok, range(645)))) # Michael S. Branicky, Jun 17 2021
CROSSREFS
Sequence in context: A166025 A171786 A017461 * A063230 A212461 A204059
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 23 13:11 EDT 2024. Contains 371913 sequences. (Running on oeis4.)