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!)
A014841 Sum modulo the base of all the digits of n in every base from 2 to n-1. 6

%I #20 Sep 07 2022 04:09:01

%S 0,3,2,7,6,13,13,18,19,31,24,37,40,48,48,65,59,79,76,85,93,117,105,

%T 121,132,148,143,176,163,193,191,208,226,250,225,262,277,302,290,332,

%U 320,359,363,376,394,444,419,455,462,491,495,551,540,577,564,601,625

%N Sum modulo the base of all the digits of n in every base from 2 to n-1.

%H Stefano Spezia, <a href="/A014841/b014841.txt">Table of n, a(n) for n = 3..10000</a>

%t Table[Sum[Mod[Total[IntegerDigits[n,i]], i], {i,2,n-1}], {n,3,59}] (* _Stefano Spezia_, Sep 06 2022 *)

%o (PARI) a(n) = sum(b=2, n-1, sumdigits(n, b) % b); \\ _Michel Marcus_, Sep 06 2022

%o (Python)

%o from sympy.ntheory import digits

%o def a(n): return sum(sum(digits(n, b)[1:])%b for b in range(2, n))

%o print([a(n) for n in range(3, 60)]) # _Michael S. Branicky_, Sep 06 2022

%Y Cf. A014836, A014837, A014838, A014839, A014840, A014842, A014843.

%K nonn,base

%O 3,2

%A _Olivier GĂ©rard_

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 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)