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!)
A341008 Numbers whose sum of even digits and sum of odd digits differ by 7. 2

%I #19 Jul 18 2021 12:20:03

%S 7,18,29,70,81,92,108,115,126,133,144,151,162,180,209,216,238,261,283,

%T 290,313,328,331,346,364,382,414,436,441,458,463,485,511,548,566,584,

%U 612,621,634,643,656,665,678,687,700,768,786,801,810,823,832,845,854,867,876,889,898

%N Numbers whose sum of even digits and sum of odd digits differ by 7.

%H Carole Dubois, <a href="/A341008/b341008.txt">Table of n, a(n) for n = 1..5001</a>

%t Select[Range[1000], Abs[Plus @@ Select[(d = IntegerDigits[#]), OddQ] - Plus @@ Select[d, EvenQ]] == 7 &] (* _Amiram Eldar_, Feb 02 2021 *)

%o (Python)

%o def ok(n):

%o s = str(n)

%o return abs(sum(map(int, s))-2*sum(int(d) for d in s if d in "2468")) == 7

%o print(list(filter(ok, range(900)))) # _Michael S. Branicky_, Jul 18 2021

%Y Cf. A036301 (sums are equal), A341002 to A341010 (sums differ by 1 to 9).

%K base,nonn,less

%O 1,1

%A _Eric Angelini_ and _Carole Dubois_, Feb 02 2021

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 May 3 00:26 EDT 2024. Contains 372203 sequences. (Running on oeis4.)