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 A316658 #13 Nov 06 2021 18:08:23 %S A316658 0,0,1,0,-1,1,1,2,1,0,2,2,3,2,1,-1,-1,0,-1,-2,-2,-2,-1,-2,-3,4,4,5,4, %T A316658 3,5,5,6,5,4,6,6,7,6,5,3,3,4,3,2,2,2,3,2,1,3,3,4,3,2,4,4,5,4,3,5,5,6, %U A316658 5,4,2,2,3,2,1,1,1,2,1,0,-4,-4,-3,-4,-5,-3 %N A316658 For any n >= 0 with base-5 expansion Sum_{k=0..w} d_k * 5^k, let f(n) = Sum_{k=0..w} [d_k > 0] * (2 + i)^k * i^(d_k - 1) (where [] is an Iverson bracket and i denotes the imaginary unit); a(n) equals the imaginary part of f(n). %C A316658 See A316657 for the real part of f and additional comments. %H A316658 Rémy Sigrist, <a href="/A316658/b316658.txt">Table of n, a(n) for n = 0..15624</a> %F A316658 a(5^n) = A099456(n-1) for any n > 0. %t A316658 a[n_] := Module[{d, z}, d = IntegerDigits[n, 5] // Reverse; z = Sum[ If[d[[i]]>0, (2+I)^(i-1)*I^(d[[i]]-1), 0], {i, 1, Length[d]}]; Im[z]]; %t A316658 Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Nov 06 2021, after PARI code *) %o A316658 (PARI) a(n) = my (d=Vecrev(digits(n, 5)), z=sum(i=1, #d, if (d[i], (2+I)^(i-1) * I^(d[i]-1), 0))); imag(z) %Y A316658 Cf. A099456, A316657. %K A316658 sign,look,base %O A316658 0,8 %A A316658 _Rémy Sigrist_, Jul 09 2018