login
Sum of digits of the squares of prime numbers.
12

%I #7 Jul 05 2013 04:40:55

%S 4,9,7,13,4,16,19,10,16,13,16,19,16,22,13,19,16,13,25,10,19,13,31,19,

%T 22,4,16,19,19,25,19,16,31,16,7,13,25,28,34,31,10,19,22,25,28,19,16,

%U 31,22,16,28,16,22,10,25,31,19,19,31,31,25,34,28,25,40,22,22,25,16,13,22,28

%N Sum of digits of the squares of prime numbers.

%H Albert Frank, <a href="http://www.paulcooijmans.com/oth/intcont2003.html">International Contest Of Logical Sequences</a>, 2002 - 2003. Item 11

%H Albert Frank, <a href="http://www.paulcooijmans.com/oth/intcont2003ans.html">Solutions of International Contest Of Logical Sequences</a>, 2002 - 2003.

%p read("transforms"):

%p A123157 := proc(n)

%p digsum(ithprime(n)^2) ;

%p end proc: # _R. J. Mathar_, Jul 05 2013

%t Total[IntegerDigits[#]]&/@(Prime[Range[80]]^2) (* _Harvey P. Dale_, Nov 04 2012 *)

%o (PARI) for(n=1,100,dp2=eval(Vec(Str(prime(n)^2)));print1(sum(i=1,length(dp2),dp2[i]),","))

%K nonn,base

%O 1,1

%A Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 01 2006