Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #23 Sep 08 2022 08:46:07
%S 2,1,3,3,3,3,5,3,5,3,3,3,5,5,5,7,5,5,5,7,5,7,3,5,5,5,5,7,3,5,5,7,5,5,
%T 7,7,7,3,5,5,7,5,5,5,7,5,7,7,7,7,9,9,9,5,5,5,7,3,5,5,5,7,5,7,7,7,5,5,
%U 7,7,5,7,7,7,5,7,7,7,9,5,7,7,9,5,7,7,9
%N Base 3 sum of digits of prime(n).
%H Vincenzo Librandi, <a href="/A239619/b239619.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A053735(A000040(n)).
%e The fifth prime is 11, 11 in base 3 is (1,0,2) so a(5)=1+0+2=3.
%t Table[Plus @@ IntegerDigits[Prime[n], 3], {n, 1, 100}] (* _Vincenzo Librandi_, Mar 25 2014 *)
%o (Sage) [sum(i.digits(base=3)) for i in primes_first_n(200)]
%o (Magma) [&+Intseq(NthPrime(n),3): n in [1..100]]; // _Vincenzo Librandi_, Mar 25 2014
%o (PARI) a(n) = vecsum(digits(prime(n), 3)); \\ _Michel Marcus_, Mar 07 2020
%Y Cf. A007605, A014499, A053735.
%K nonn,base,easy
%O 1,1
%A _Tom Edgar_, Mar 22 2014