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.

A350300 Irregular triangle read by rows: The n-th row lists the "n-th power friends", numbers k such that digsum(digsum(k^n)^n) = k but digsum(k^n) is not k.

Original entry on oeis.org

13, 16, 19, 28, 18, 27, 23, 29, 31, 34, 38, 44, 46, 47, 55, 56, 62, 65, 64, 73, 35, 80, 109, 127, 52, 70, 112, 118, 121, 127, 136, 181, 97, 108, 117, 130, 144, 153, 88, 144, 153, 160, 139, 152, 153, 154, 161, 173, 176, 178, 181, 184, 187, 189, 189, 198
Offset: 2

Views

Author

Daniel Carter, Dec 23 2021

Keywords

Comments

Two numbers x and y with x < y are said to be "n-th power friends" if digsum(x^n)=y and digsum(y^n)=x. This sequence lists both x and y; A350301 lists just the x's and A350302 lists just the y's.
The name "n-th power friends" comes from "The Man Who Counted", where the n=2 case is discussed:
"The digits of the number 256 add up to 13. The square of 13 is 169. The digits of 169 add up to 16. As a result, the numbers 13 and 16 have a curious relation, which we could call a quadratic friendship" (p. 33).
There are finitely many such k for a particular n since digsum(digsum(k^n)^n) <= 9n log_10(9n log_10(k)). There are no such k for n=1 since either k is a single digit or else digsum(k) < k.

Examples

			Triangle begins:
  13, 16;
  19, 28;
  18, 27;
  23, 29, 31, 34;
  ;
  38, 44, 46, 47, 55, 56, 62, 65;
  64, 73;
  35, 80;
  ;
  ;
  109, 127;
  52, 70, 112, 118, 121, 127, 136, 181;
  97, 108, 117, 130;
  144, 153;
  88, 144, 153, 160;
  ...
18 and 27 are in row n=4 since 18^4 = 104976 and 1 + 0 + 4 + 9 + 7 + 6 = 27, and 27^4 = 531441 and 5 + 3 + 1 + 4 + 4 + 1 = 18.
		

References

  • M. Tahan, The Man Who Counted: A Collection of Mathematical Adventures, W. W. Norton & Company, 1993.

Crossrefs

Programs

  • Python
    from math import log
    n = 1
    while n <= 50:
        k = 2
        while 9*n*log(9*n*log(k,10),10) >= k:
            s1 = sum(int(d) for d in str(k**n))
            s2 = sum(int(d) for d in str(s1**n))
            if k != s1 and k == s2:
                print(k)
            k += 1
        n += 1

A350302 Irregular triangle read by rows: The n-th row lists the larger number in each "n-th power friendship", that is, numbers k such that digsum(digsum(k^n)^n) = k and digsum(k^n) < k.

Original entry on oeis.org

16, 28, 27, 29, 34, 47, 55, 62, 65, 73, 80, 127, 70, 121, 136, 181, 117, 130, 153, 153, 160, 161, 176, 181, 184, 187, 189, 198, 208, 221, 235, 193, 252, 190, 233, 220, 247, 220, 254, 257, 259, 277, 279, 289, 263, 319, 261, 331, 260, 297, 316, 280, 304, 313
Offset: 2

Views

Author

Daniel Carter, Dec 23 2021

Keywords

Examples

			Triangle begins:
  16;
  28;
  27;
  29, 34;
  ;
  47, 55, 62, 65;
  73;
  80;
  ;
  ;
  127;
  70, 121, 136, 181;
  117, 130;
  153;
  153, 160;
  ...
		

Crossrefs

Showing 1-2 of 2 results.