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.

A262092 Amicable digital pairs: The larger number of a pair (x,y) with x <> y such that, in decimal notation and with an appropriate number of leading zeros prepended, x=(x_m...x_1x_0){10}, y=(y_m...y_1y_0){10}, x = y_m^m + ... + y_1^m + y_0^m, and y = x_m^m + ... + x_1^m + x_0^m.

This page as a plain text file.
%I A262092 #27 Dec 31 2021 12:17:53
%S A262092 244,1459,6514,76438,157596,313625,6586433,9057586,1043820406,
%T A262092 756738746,344050075,11346057072,37878721692554416,375609204308055082,
%U A262092 40091536165423401387,244405038116365070846858,183144838903847612823687,2307549584666787613389634
%N A262092 Amicable digital pairs: The larger number of a pair (x,y) with x <> y such that, in decimal notation and with an appropriate number of leading zeros prepended, x=(x_m...x_1x_0)_{10}, y=(y_m...y_1y_0)_{10}, x = y_m^m + ... + y_1^m + y_0^m, and y = x_m^m + ... + x_1^m + x_0^m.
%H A262092 D. Knuth, <a href="http://www-cs-faculty.stanford.edu/~knuth/amicable_digit_powers.txt">Table of a(n) and its mate for n=1..36</a>
%H A262092 K. Oséki, <a href="http://dx.doi.org/10.3792/pja/1195523903">A problem of number theory</a>, Proceedings of the Japan Academy 36 (1960), 578-587.
%e A262092 a(1) is amicably paired to 136, because 1^3 + 3^3 + 6^3 = 244 and 2^3 + 4^3 + 4^3 = 136.
%o A262092 (Python)
%o A262092 from itertools import count, combinations_with_replacement, islice
%o A262092 def A262092_gen(): # generator of terms
%o A262092     for m in count(2):
%o A262092         for c in combinations_with_replacement(range(10),m+1):
%o A262092             n = sum(d**m for d in c)
%o A262092             r = sum(int(q)**m for q in str(n))
%o A262092             rlist = sorted(int(d) for d in str(r))
%o A262092             rlist = [0]*(m+1-len(rlist))+rlist
%o A262092             if n < r and rlist == list(c):
%o A262092                 yield r
%o A262092 A262092_list = list(islice(A262092_gen(),10)) # _Chai Wah Wu_, Dec 31 2021
%Y A262092 A262091 has the smaller element of each pair.
%K A262092 nonn,base
%O A262092 1,1
%A A262092 _Don Knuth_, Sep 10 2015
%E A262092 Definition clarified by _Chai Wah Wu_, Jan 04 2016