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.

A202358 Sum of digits of n^(n!).

This page as a plain text file.
%I A202358 #32 Oct 25 2021 22:20:07
%S A202358 0,1,4,18,73,334,2592,18919,164476,1558521,1,187044031,2326111614,
%T A202358 31214008090
%N A202358 Sum of digits of n^(n!).
%C A202358 a(10^k) = 1. - _Chai Wah Wu_, Dec 18 2019
%F A202358 a(n) = A007953(A053986(n)). - _Michel Marcus_, Aug 22 2013
%e A202358 a(3) = 18 because 3^3! = 729 with digit sum 7+2+9 = 18.
%p A202358 ds:= proc(n) local r;
%p A202358        `if`(n<10, n, ds(iquo(n, 10^iquo(length(n), 2), 'r'))+ds(r))
%p A202358      end:
%p A202358 a:= n-> ds(n^n!):
%p A202358 seq(a(n), n=0..10);  # _Alois P. Heinz_, Dec 17 2011
%o A202358 (Python)
%o A202358 from math import factorial
%o A202358 def a(n): return sum(map(int, str(n**(factorial(n)))))
%o A202358 print([a(n) for n in range(10)]) # _Michael S. Branicky_, Jan 28 2021
%Y A202358 Cf. A053986, A007953, A202336.
%K A202358 nonn,base,more
%O A202358 0,3
%A A202358 _Jacques ALARDET_, Dec 17 2011
%E A202358 a(11)-a(12) from _Lars Blomberg_, Jan 18 2013
%E A202358 a(13) from _Chai Wah Wu_, Oct 25 2021