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 A372924 #28 Jul 03 2024 09:27:26 %S A372924 0,0,2,2,2,1,1,1,0,3,-3,-1,2,2,1,1,1,0,0,3,-4,-1,-1,-2,-2,-2,0,0,-3, %T A372924 -1,-7,-1,-2,-2,-5,-3,-3,-6,-4,-4,-10,-5,-5,-5,-6,-9,-6,-10,-10,-7, %U A372924 -14,-11,-11,-6,-9,-9,-10,-10,-13,-11,-17,-11,-12,-15,-15,-13,-10 %N A372924 a(n) = (sum_digits(n^3)-n)/3. %C A372924 a(n) + floor((n+1)/3) is always a multiple of 3. - _Jon E. Schoenfield_, May 18 2024 %F A372924 a(n) = (A004164(n)-n)/3. %e A372924 For n=42, 42^3 = 74088 has sum of digits 27 so a(42) = (27 - 42)/3 = -5. %p A372924 read("transforms"): %p A372924 A372924 := proc(n) %p A372924 (digsum(n^3)-n)/3 ; %p A372924 end proc: %p A372924 seq(A372924(n),n=0..80) ; # _R. J. Mathar_, Jul 03 2024 %t A372924 Table[(DigitSum[n^3] - n)/3, {n, 0, 100}] (* _Paolo Xausa_, Jul 03 2024 *) %o A372924 (C) %o A372924 #include <stdint.h> %o A372924 #include <stdio.h> %o A372924 int32_t sumDigits(int64_t num) %o A372924 { %o A372924 int32_t sum = 0; %o A372924 while (num > 0) %o A372924 { %o A372924 sum += num % 10; %o A372924 num /= 10; %o A372924 } %o A372924 return sum; %o A372924 } %o A372924 int main() %o A372924 { %o A372924 for (int64_t i=0; i<10000; ++i) %o A372924 { %o A372924 int64_t num = i * i * i; %o A372924 int32_t sum = sumDigits(num); %o A372924 printf("%ld, ", (sum - i)/3); %o A372924 } %o A372924 return 0; %o A372924 } %Y A372924 Cf. A004164. %K A372924 sign,base,easy %O A372924 0,3 %A A372924 _Guy Harari_, May 16 2024