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!)
A343481 a(n) is the sum of all digits of n in every prime base 2 <= p <= n. 1
1, 3, 3, 6, 6, 10, 11, 11, 10, 15, 16, 22, 21, 21, 23, 30, 32, 40, 42, 42, 39, 48, 52, 53, 49, 52, 53, 63, 66, 77, 83, 82, 76, 77, 82, 94, 87, 85, 90, 103, 107, 121, 123, 129, 120, 135, 144, 147, 153, 150, 151, 167, 176, 178, 185, 181, 168, 185, 194, 212, 199 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,2
LINKS
Robin Fissum, Digit sums and the number of prime factors of the factorial n!=1.2...n, Bachelor's project in BMAT, Norwegian University of Science and Technology, 2020; ResearchGate link.
FORMULA
a(n) ~ (1-Pi^2/12)*n^2/log(n) + c*n^2/log(n)^2 + o(n^2/log(n)^2), where c = 1 - Pi^2/24 + zeta'(2)/2 = 1 - A222171 - (1/2)*A073002 = 0.1199923561... (Fissum, 2020).
EXAMPLE
a(5) = 6 since in the prime bases 2, 3 and 5 the representations of 5 are 101_2, 12_3 and 10_5, respectively, and (1 + 0 + 1) + (1 + 2) + (1 + 0) = 6.
MATHEMATICA
s[n_, b_] := Plus @@ IntegerDigits[n, b]; ps[n_] := Select[Range[n], PrimeQ]; a[n_] := Sum[s[n, b], {b, ps[n]}]; Array[a, 100, 2]
PROG
(PARI) a(n) = sum(b=2, n, if (isprime(b), sumdigits(n, b))); \\ Michel Marcus, Apr 17 2021
CROSSREFS
Sequence in context: A008805 A188270 A026925 * A237665 A355394 A088528
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Apr 16 2021
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 March 28 10:31 EDT 2024. Contains 371240 sequences. (Running on oeis4.)