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!)
A357143 a(n) is sum of the base-5 digits of n each raised to the number of digits of n in base 5. 2
1, 2, 3, 4, 1, 2, 5, 10, 17, 4, 5, 8, 13, 20, 9, 10, 13, 18, 25, 16, 17, 20, 25, 32, 1, 2, 9, 28, 65, 2, 3, 10, 29, 66, 9, 10, 17, 36, 73, 28, 29, 36, 55, 92, 65, 66, 73, 92, 129, 8, 9, 16, 35, 72, 9, 10, 17, 36, 73, 16, 17, 24, 43, 80, 35, 36, 43, 62, 99, 72, 73, 80, 99, 136, 27 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{i=1..A110592(n)} d(i)^A110592(n), where d(i) is the i-th digit of n in base 5.
EXAMPLE
For n = 13_10 = 23_5 (2 digits in base 5): a(13) = 2^2 + 3^2 = 13.
For n = 73_10 = 243_5 (3 digits in base 5): a(73) = 2^3 + 4^3 + 3^3 = 99.
MAPLE
f:= proc(n) local L, d, i;
L:= convert(n, base, 5);
d:= nops(L);
add(L[i]^d, i=1..d)
end proc:
map(f, [$1..100]); # Robert Israel, Oct 26 2023
MATHEMATICA
a[n_] := Total[IntegerDigits[n, 5]^IntegerLength[n, 5]]; Array[a, 100] (* Amiram Eldar, Oct 30 2022 *)
PROG
(PARI) a(n) = my(d=digits(n, 5)); sum(k=1, #d, d[k]^#d); \\ Michel Marcus, Oct 29 2022
(Python)
from sympy.ntheory.factor_ import digits
def A357143(n):
t = len(s:=digits(n, 5)[1:])
return sum(d**t for d in s) # Chai Wah Wu, Oct 31 2022
CROSSREFS
Cf. in base 10: A157714, A101337, A151544.
Sequence in context: A074057 A299756 A163258 * A337210 A361258 A141063
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Corrected and extended by Michel Marcus, Oct 29 2022
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 August 22 04:18 EDT 2024. Contains 375356 sequences. (Running on oeis4.)