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.

A381042 Alternating sum of floor(n^(1/k)), with k >= 2.

This page as a plain text file.
%I A381042 #13 Apr 22 2025 07:49:47
%S A381042 0,0,0,0,1,1,1,1,0,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,4,4,3,3,3,3,3,2,2,
%T A381042 2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,
%U A381042 5,5,5,5,5,5,5,5,5,5,5,5,5,7,7,7,7,7
%N A381042 Alternating sum of floor(n^(1/k)), with k >= 2.
%H A381042 Friedjof Tellkamp, <a href="/A381042/b381042.txt">Table of n, a(n) for n = 0..10000</a>
%F A381042 a(n) = A000196(n) - A048766(n) + A255270(n) - A178487(n) + ... .
%F A381042 a(n) = Sum_{k>=2} (-1)^k * floor(n^(1/k)) = Sum_{k>=1} (floor(n^(1/(2*k))) - floor(n^(1/(2*k+1)))).
%F A381042 a(n) = Sum_{i=1..n} A382691(i).
%F A381042 a(n) ~ A382692(n).
%F A381042 G.f.: Sum_{j>=1, k>=2} (-1)^k * x^(j^k)/(1-x).
%e A381042 n:       0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
%e A381042 k=2 (+): 0, 1, 1, 1, 2, 2, 2, 2, 2, 3, ... (A000196)
%e A381042 k=3 (-): 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, ... (A048766)
%e A381042 ...
%e A381042 Sum:     0, 0, 0, 0, 1, 1, 1, 1, 0, 1 ... (= this sequence).
%t A381042 z = 100; Table[Sum[(-1)^k Floor[n^(1/k)], {k, 2, 2 Floor@Log[2, z/2] - 1}], {n, 0, z}]
%Y A381042 Cf. A000196 (k=2), A048766 (k=3), A255270 (k=4), A178487 (k=5), A178489 (k=6).
%Y A381042 Cf. A089361 (nonalternating), A382691, A382692.
%K A381042 nonn
%O A381042 0,17
%A A381042 _Friedjof Tellkamp_, Apr 14 2025