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 A337921 #14 Jan 31 2021 16:42:03 %S A337921 1,3,18,38,195,585,607,3948,11976,42415,127921,56067,666938,2082798, %T A337921 10769251,22610393,110616780,315726436,408228944,2384863439, %U A337921 7159829169,23350950650,74348867826,49863537606,401947783347,1296027221145,6159163094580,13796041908620,60717334308629,181812784262527 %N A337921 a(n) is the sum of (3^n mod 2^k) for k such that 2^k < 3^n. %C A337921 a(n) == A056576(n) (mod 2). %H A337921 Robert P. P. McKone, <a href="/A337921/b337921.txt">Table of n, a(n) for n = 1..1000</a> %e A337921 a(3) = (3^3 mod 2^1) + (3^3 mod 2^2) + (3^3 mod 2^3) + (3^3 mod 2^4) = 18. %p A337921 f:= proc(n) local k; add(3 &^ n mod 2^k, k = 1 .. ilog2(3^n)) end proc: %p A337921 map(f, [$1..100]); %t A337921 A337921[n_] := Sum[Mod[3^n, 2^k], {k, 1, Floor[n*Log[2, 3]]}]; Table[A337921[n], {n, 1, 30}] (* _Robert P. P. McKone_, Jan 31 2021 *) %o A337921 (PARI) a(n) = sum(k=1, logint(3^n, 2), lift(Mod(3, 2^k)^n)); \\ _Michel Marcus_, Jan 30 2021 %Y A337921 Cf. A056576. %K A337921 nonn %O A337921 1,2 %A A337921 _J. M. Bergot_ and _Robert Israel_, Jan 29 2021