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!)
A014838 Sum of all the digits of n in every prime base from 2 to n-1. 3
2, 3, 5, 6, 9, 11, 11, 10, 14, 16, 21, 21, 21, 23, 29, 32, 39, 42, 42, 39, 47, 52, 53, 49, 52, 53, 62, 66, 76, 83, 82, 76, 77, 82, 93, 87, 85, 90, 102, 107, 120, 123, 129, 120, 134, 144, 147, 153, 150, 151, 166, 176, 178, 185, 181, 168, 184, 194, 211, 199, 207 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,1
LINKS
MATHEMATICA
Table[Sum[If[PrimeQ[i], Mod[Total[IntegerDigits[n, i]], n], 0], {i, 2, n-1}], {n, 3, 63}] (* Stefano Spezia, Sep 06 2022 *)
PROG
(PARI) a(n) = {s = 0; forprime (i=2, n-1, d = digits(n, i); s += sum(j=1, #d, d[j]); ); s; } \\ Michel Marcus, May 30 2014
(Python)
from sympy.ntheory import digits, isprime
def a(n): return sum(sum(digits(n, b)[1:]) for b in range(2, n) if isprime(b))
print([a(n) for n in range(3, 64)]) # Michael S. Branicky, Sep 06 2022
CROSSREFS
Sequence in context: A137809 A219035 A273042 * A026459 A026461 A026168
KEYWORD
nonn,base
AUTHOR
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 20 11:27 EDT 2024. Contains 371838 sequences. (Running on oeis4.)