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.

Showing 1-2 of 2 results.

A230354 Even numbers n such that digit sum of n = digit sum of largest odd divisor of n.

Original entry on oeis.org

12, 18, 36, 54, 60, 72, 90, 108, 126, 132, 144, 156, 162, 180, 198, 204, 216, 228, 234, 240, 252, 270, 276, 306, 320, 324, 342, 348, 360, 372, 378, 396, 414, 420, 432, 450, 504, 516, 522, 540, 558, 594, 612, 624, 630, 636, 660, 702, 708, 720, 732, 738, 756, 774, 780, 792, 810, 900
Offset: 1

Views

Author

Antonio Roldán, Oct 16 2013

Keywords

Examples

			Largest odd divisor of 162 is 81. Digit_sum(162)=9, digit_sum(81)=9
		

Crossrefs

Programs

  • PARI
    mdi(n)= n / 2^valuation(n, 2)
    digsum(n)={local (d, p); d=0; p=n; while(p, d+=p%10; p=floor(p/10)); return(d)}
    {for (n=2, 10^3,m=mdi(n);if(digsum(n)==digsum(mdi(n))&&m<>n,print(n)));}

A345309 Numbers whose digital sum coincides with digital sum of their largest proper divisor.

Original entry on oeis.org

18, 27, 36, 54, 72, 81, 90, 108, 126, 135, 144, 162, 180, 198, 216, 234, 243, 252, 270, 297, 306, 324, 342, 351, 360, 361, 378, 396, 405, 414, 432, 450, 504, 513, 522, 540, 551, 558, 567, 576, 594, 612, 621, 630, 702, 703, 720, 738, 756, 774, 792, 810, 837
Offset: 1

Views

Author

Tanya Khovanova, Jun 13 2021

Keywords

Comments

Many of the numbers are multiples of 9. The ones that are not form sequence A219340.

Examples

			The largest proper divisor of 54 is 27. The sum of digits of 54 and 27 are the same. Thus 54 is in this sequence.
The largest proper divisor of 63 is 21. The sum of digits of 63 and 21 are not the same. Thus 63 is not in this sequence.
		

Crossrefs

Cf. A219340.

Programs

  • Mathematica
    Select[Range[2, 10000], Total[IntegerDigits[#]] == Total[IntegerDigits[Divisors[#][[-2]]]] &]
  • Python
    from sympy import divisors
    def sd(n): return sum(map(int, str(n)))
    def ok(n): return sd(n) == sd(divisors(n)[-2])
    print(list(filter(ok, range(2, 840)))) # Michael S. Branicky, Jun 13 2021
Showing 1-2 of 2 results.