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.

A218346 Numbers of the form a^a + b^b, with a > b > 0.

This page as a plain text file.
%I A218346 #18 May 28 2021 23:02:53
%S A218346 5,28,31,257,260,283,3126,3129,3152,3381,46657,46660,46683,46912,
%T A218346 49781,823544,823547,823570,823799,826668,870199,16777217,16777220,
%U A218346 16777243,16777472,16780341,16823872,17600759,387420490,387420493,387420516,387420745,387423614,387467145
%N A218346 Numbers of the form a^a + b^b, with a > b > 0.
%C A218346 Subsequence of A066846.
%H A218346 Robert Israel, <a href="/A218346/b218346.txt">Table of n, a(n) for n = 1..10000</a>
%e A218346 a(1) = 2^2 + 1^1 = 5,
%e A218346 a(2) = 3^3 + 1^1 = 28,
%e A218346 a(3) = 2^2 + 3^3 = 31.
%p A218346 N:= 10^12: # for terms <= N
%p A218346 S:= NULL:
%p A218346 for m from 1 do v:= m^m; if v > N then break fi; S:= S,v od:
%p A218346 sort(convert(select(`<=`,{seq(seq(S[i]+S[j],j=i+1..m-1),i=1..m-1)},N),list)); # _Robert Israel_, Aug 10 2020
%t A218346 nn = 10; Select[Union[Flatten[Table[a^a + b^b, {a, nn}, {b, a + 1, nn}]]], # <= nn^nn + 1 &] (* _T. D. Noe_, Nov 15 2012 *)
%o A218346 (Python)
%o A218346 from itertools import count, takewhile
%o A218346 def aupto(lim):
%o A218346   pows = list(takewhile(lambda x: x < lim, (i**i for i in count(1))))
%o A218346   sums = (aa+bb for i, bb in enumerate(pows) for aa in pows[i+1:])
%o A218346   return sorted(set(s for s in sums if s <= lim))
%o A218346 print(aupto(387467145))  # _Michael S. Branicky_, May 28 2021
%Y A218346 Cf. A000312, A066846, A218347.
%Y A218346 Cf. A068145: primes of the form a^a + b^b.
%K A218346 nonn
%O A218346 1,1
%A A218346 _Alex Ratushnyak_, Oct 26 2012