cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 31-33 of 33 results.

A351478 Numbers whose sum of even digits is twice the sum of odd digits.

Original entry on oeis.org

12, 21, 36, 63, 102, 114, 120, 138, 141, 183, 201, 210, 234, 243, 258, 285, 306, 318, 324, 342, 360, 381, 411, 423, 432, 456, 465, 528, 546, 564, 582, 603, 630, 645, 654, 678, 687, 768, 786, 813, 825, 831, 852, 867, 876, 1002, 1014, 1020, 1038, 1041, 1083, 1104, 1116, 1122, 1140, 1161, 1200, 1212
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Feb 12 2022

Keywords

Comments

The sequence is closed under concatenation (if k and m are terms, so are k.m and m.k); permutation of a term's string of digits; and insertion of 0's within a term's string of digits. - Michael S. Branicky, Feb 12 2022

Examples

			a(1) = 12 whose sum of even digits (4) is twice the sum of odd digits (2);
a(2) = 21 whose sum of even digits (4) is twice the sum of odd digits (2);
a(3) = 36 whose sum of even digits (6) is twice the sum of odd digits (3);
etc.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], Plus @@ Select[IntegerDigits[#], EvenQ] == 2 * Plus @@ Select[IntegerDigits[#], OddQ] &] (* Amiram Eldar, Feb 12 2022 *)
  • Python
    def ok(n):
        ds = list(map(int, str(n)))
        return sum(d for d in ds if d%2==0) == 2*sum(d for d in ds if d%2==1)
    print([k for k in range(1, 2173) if ok(k)]) # Michael S. Branicky, Feb 12 2022

A351479 Numbers whose sum of odd digits is twice the sum of even digits.

Original entry on oeis.org

123, 132, 147, 174, 213, 231, 312, 321, 345, 354, 369, 396, 417, 435, 453, 471, 534, 543, 567, 576, 639, 657, 675, 693, 714, 741, 756, 765, 789, 798, 879, 897, 936, 963, 978, 987, 1023, 1032, 1047, 1074, 1203, 1227, 1230, 1272, 1302, 1320, 1407, 1470, 1704, 1722, 1740, 2013, 2031, 2103, 2127, 2130, 2172
Offset: 1

Views

Author

Carole Dubois and Eric Angelini, Feb 12 2022

Keywords

Comments

The sequence is closed under concatenation (if k and m are terms, so are k.m and m.k); permutation of a term's string of digits; and insertion of 0's within a term's string of digits. - Michael S. Branicky, Feb 12 2022

Examples

			a(1) = 123 whose sum of odd digits (4) is twice the sum of even digits (2);
a(2) = 132 whose sum of odd digits (4) is twice the sum of even digits (2);
a(3) = 147 whose sum of odd digits (8) is twice the sum of even digits (4).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2000], Plus @@ Select[IntegerDigits[#], OddQ] == 2 * Plus @@ Select[IntegerDigits[#], EvenQ] &] (* Amiram Eldar, Feb 12 2022 *)
  • Python
    def ok(n):
        ds = list(map(int, str(n)))
        return sum(d for d in ds if d%2==1) == 2*sum(d for d in ds if d%2==0)
    print([k for k in range(1, 2173) if ok(k)]) # Michael S. Branicky, Feb 12 2022

A103877 Position of n in rearrangement of natural numbers A103849.

Original entry on oeis.org

1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 18, 21, 16, 24, 19, 27, 22, 30, 25, 33, 28, 31, 34, 36, 37, 39, 40, 42, 43, 45, 48, 51, 54, 57, 46, 60, 49, 63, 52, 66, 55, 58, 61, 64
Offset: 0

Views

Author

Zak Seidov, Feb 20 2005

Keywords

Comments

a(43)=64 because 43 in 64th place in A103849.

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Position[A103849, i], {i, 0, 43}]]
Previous Showing 31-33 of 33 results.