Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #12 Mar 18 2018 11:47:41
%S 0,0,14,24,80,111,191,234,383,674,777,1098,1373,1536,1835,2459,3011,
%T 3237,3963,4403,4725,5496,6182,7148,8556,9305,9741,10442,10935,11786,
%U 14940,16034,17504,17994,20741,21381,23097,24939,26141,28133,30188
%N a(n) = p^2 - sum of digits of p^p, where p = prime(n).
%H Robert Israel, <a href="/A140499/b140499.txt">Table of n, a(n) for n = 1..2000</a>
%p sd:=proc(n) options operator, arrow: add(convert(n,base,10)[j],j=1..nops(convert(n,base,10))) end proc: a:=proc(n) options operator, arrow: ithprime(n)^2-sd(ithprime(n)^ithprime(n)) end proc: seq(a(n),n=1..45); # _Emeric Deutsch_, Aug 10 2008
%t Table[#^2 - Total@ IntegerDigits[#^#] &@ Prime@ n, {n, 41}] (* _Michael De Vlieger_, Oct 11 2017 *)
%o (PARI) a(n) = my(p=prime(n)); p^2 - sumdigits(p^p); \\ _Michel Marcus_, Mar 18 2018
%K nonn,base
%O 1,3
%A _Juri-Stepan Gerasimov_, Jul 24 2008
%E More terms from _Emeric Deutsch_, Aug 10 2008
%E Name edited by _Robert Israel_, Oct 11 2017