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.

A055236 Sums of two powers of 4.

This page as a plain text file.
%I A055236 #24 Apr 08 2025 12:39:42
%S A055236 2,5,8,17,20,32,65,68,80,128,257,260,272,320,512,1025,1028,1040,1088,
%T A055236 1280,2048,4097,4100,4112,4160,4352,5120,8192,16385,16388,16400,16448,
%U A055236 16640,17408,20480,32768,65537,65540,65552,65600,65792,66560,69632,81920,131072
%N A055236 Sums of two powers of 4.
%H A055236 T. D. Noe, <a href="/A055236/b055236.txt">Rows n = 0..100 of triangle, flattened</a>
%F A055236 a(n) = 4^(n-trinv(n))+4^trinv(n), where trinv(n) = floor((1+sqrt(1+8*n))/2) = A002262(n) and n-trinv(n) = A003056(n).
%F A055236 Regarded as a triangle T(n, k) = 4^n + 4^k, so as a sequence a(n) = 4^A002262(n) + 4^A003056(n).
%t A055236 t = 4^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* _T. D. Noe_, Oct 09 2011 *)
%t A055236 Union[Total/@Tuples[4^Range[0,9], 2]] (* _Harvey P. Dale_, Mar 25 2012 *)
%o A055236 (Python)
%o A055236 from math import isqrt
%o A055236 def A055236(n): return (1<<((a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)<<1))+(1<<(n-1-(a*(a+1)>>1)<<1)) # _Chai Wah Wu_, Apr 08 2025
%Y A055236 Cf. A052216.
%Y A055236 T(2n,n) gives 2*A026244.
%Y A055236 T(n,n) gives A004171 = 2*A000302.
%Y A055236 T(n,0) gives A052539.
%K A055236 easy,nonn,tabl
%O A055236 0,1
%A A055236 _Henry Bottomley_, Jun 22 2000