login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239619 Base 3 sum of digits of prime(n). 7
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, 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, 7, 7, 5, 7, 7, 7, 5, 7, 7, 7, 9, 5, 7, 7, 9, 5, 7, 7, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n) = A053735(A000040(n)).
EXAMPLE
The fifth prime is 11, 11 in base 3 is (1,0,2) so a(5)=1+0+2=3.
MATHEMATICA
Table[Plus @@ IntegerDigits[Prime[n], 3], {n, 1, 100}] (* Vincenzo Librandi, Mar 25 2014 *)
PROG
(Sage) [sum(i.digits(base=3)) for i in primes_first_n(200)]
(Magma) [&+Intseq(NthPrime(n), 3): n in [1..100]]; // Vincenzo Librandi, Mar 25 2014
(PARI) a(n) = vecsum(digits(prime(n), 3)); \\ Michel Marcus, Mar 07 2020
CROSSREFS
Sequence in context: A038565 A344869 A248605 * A085599 A299966 A302395
KEYWORD
nonn,base,easy
AUTHOR
Tom Edgar, Mar 22 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 08:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)