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.

A038471 Sums of 3 distinct powers of 4.

This page as a plain text file.
%I A038471 #14 Apr 04 2025 11:27:17
%S A038471 21,69,81,84,261,273,276,321,324,336,1029,1041,1044,1089,1092,1104,
%T A038471 1281,1284,1296,1344,4101,4113,4116,4161,4164,4176,4353,4356,4368,
%U A038471 4416,5121,5124,5136,5184,5376,16389,16401,16404,16449,16452,16464,16641,16644,16656,16704
%N A038471 Sums of 3 distinct powers of 4.
%H A038471 Amiram Eldar, <a href="/A038471/b038471.txt">Table of n, a(n) for n = 1..10000</a>
%t A038471 Union[Total/@Subsets[4^Range[0,10],{3}]] (* _Harvey P. Dale_, Oct 20 2012 *)
%o A038471 (Python)
%o A038471 from math import isqrt, comb
%o A038471 from sympy import integer_nthroot
%o A038471 def A038471(n): return (1<<((r:=n-1-comb((m:=integer_nthroot(6*n,3)[0])+(t:=(n>comb(m+2,3)))+1,3))-comb((k:=isqrt(b:=r+1<<1))+(b>k*(k+1)),2)<<1))+(1<<((a:=isqrt(s:=n-comb(m-(t^1)+2,3)<<1))+((s<<2)>(a<<2)*(a+1)+1)<<1))+(1<<(m+t+1<<1)) # _Chai Wah Wu_, Apr 04 2025
%Y A038471 Base 4 interpretation of A038445.
%Y A038471 Cf. A000302, A038470, A038472, A038473.
%K A038471 nonn,easy
%O A038471 1,1
%A A038471 _Olivier Gérard_
%E A038471 Offset corrected by _Amiram Eldar_, Jul 13 2022