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.
%I A055260 #20 Apr 09 2025 19:46:44 %S A055260 2,10,18,82,90,162,730,738,810,1458,6562,6570,6642,7290,13122,59050, %T A055260 59058,59130,59778,65610,118098,531442,531450,531522,532170,538002, %U A055260 590490,1062882,4782970,4782978,4783050,4783698,4789530,4842018,5314410,9565938,43046722 %N A055260 Sums of two powers of 9. %H A055260 T. D. Noe, <a href="/A055260/b055260.txt">Rows n = 0..100 of triangle, flattened</a> %F A055260 a(n) = 9^(n-trinv(n))+9^trinv(n), where trinv(n) = floor((1+sqrt(1+8*n))/2) = A002262(n) and n-trinv(n) = A003056(n) %F A055260 Regarded as a triangle T(n, k) = 9^n + 9^k, so as a sequence a(n) = 9^A002262(n) + 9^A003056(n). %t A055260 t = 9^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* _T. D. Noe_, Oct 09 2011 *) %t A055260 Total/@Tuples[9^Range[0,10],2]//Union (* _Harvey P. Dale_, Jul 03 2019 *) %o A055260 (Python) %o A055260 def valuation(n, b): %o A055260 v = 0 %o A055260 while n > 1: n //= b; v += 1 %o A055260 return v %o A055260 def aupto(lim): %o A055260 pows = [9**i for i in range(valuation(lim-1, 9) + 1)] %o A055260 sum_pows = sorted([a+b for i, a in enumerate(pows) for b in pows[i:]]) %o A055260 return [s for s in sum_pows if s <= lim] %o A055260 print(aupto(43046722)) # _Michael S. Branicky_, Feb 10 2021 %o A055260 (Python) %o A055260 from math import isqrt %o A055260 def A055260(n): return 9**(a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)+9**(n-1-(a*(a+1)>>1)) # _Chai Wah Wu_, Apr 09 2025 %Y A055260 Cf. A001019, A052216. %K A055260 easy,nonn,tabl %O A055260 0,1 %A A055260 _Henry Bottomley_, Jun 22 2000