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 A382691 #24 Apr 22 2025 07:52:36 %S A382691 0,0,0,1,0,0,0,-1,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1,0,-1,0,0,0,0,-1,0, %T A382691 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, %U A382691 0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0 %N A382691 Alternating sum of the characteristic functions of k-th powers, with k >= 2: characteristic function of squares - c.f. of cubes + c.f. of 4th powers - ... . %H A382691 Friedjof Tellkamp, <a href="/A382691/b382691.txt">Table of n, a(n) for n = 1..10000</a> %H A382691 Solomon W. Golomb, <a href="http://dx.doi.org/10.1016/0022-314X(73)90047-4">A new arithmetic function of combinatorial significance</a>, J. Number Theory, Vol. 5, No. 3 (1973), pp. 218-223. %F A382691 a(n) = A010052(n) - A010057(n) + A374016(n) - (...). %F A382691 Sum_{i=1..n} a(i) = A381042(n). %F A382691 G.f.: Sum_{j>=1, k>=2} (-1)^k * x^(j^k). %F A382691 Sum_{n>=1} a(n)/n = 1/2. %F A382691 Dirichlet g.f.: Sum_{k>=2} (-1)^k * zeta(k*s) = Sum_{k>=1} (zeta(2*k*s) - zeta((2*k+1)*s)). %e A382691 n: 1, 2, 3, 4, 5, 6, 7, 8, 9, ... %e A382691 Squares (+): 1, 0, 0, 1, 0, 0, 0, 0, 1, ... (A010052) %e A382691 Cubes (-): 1, 0, 0, 0, 0, 0, 0, 1, 0, ... (A010057) %e A382691 ... %e A382691 Sum: 0, 0, 0, 1, 0, 0, 0,-1, 1, ... (= this sequence). %t A382691 Table[Sum[(-1)^k Boole[IntegerQ[n^(1/k)]], {k, 2, Floor[Log[2, n]]}], {n, 1, 100}] %o A382691 (PARI) a(n) = sum(i=2, logint(n,2), (-1)^i*ispower(n, i)); \\ _Michel Marcus_, Apr 11 2025 %Y A382691 Cf. A010052, A010057, A374016, A001597, A381042, A382692. %Y A382691 Cf. A089723 (nonalternating, k>=1), A259362 (nonalternating, k>=2). %K A382691 sign %O A382691 1,16 %A A382691 _Friedjof Tellkamp_, Apr 05 2025