login
a(n) = 2p - number of digits of p^p, where p = n-th prime.
0

%I #11 Mar 08 2019 03:30:09

%S 3,4,6,8,10,11,13,13,14,15,15,15,15,15,15,14,13,13,11,10,9,8,6,4,1,-1,

%T -2,-4,-5,-6,-14,-16,-19,-20,-26,-28,-31,-35,-38,-42,-46,-47,-54,-56,

%U -59,-60,-69,-78,-81,-83

%N a(n) = 2p - number of digits of p^p, where p = n-th prime.

%p a:=proc(n) local np, npp: np:=ithprime(n): npp:=convert(np^np,base,10); 2*np-nops(npp) end proc: seq(a(n),n=1..50); # _Emeric Deutsch_, Aug 10 2008

%t 2#-IntegerLength[#^#]&/@Prime[Range[50]] (* _Harvey P. Dale_, Nov 01 2011 *)

%Y Cf. A051674.

%K base,sign

%O 1,1

%A _Juri-Stepan Gerasimov_, Jul 24 2008

%E Corrected and extended by _Emeric Deutsch_, Aug 10 2008