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!)
A329162 a(n) = Sum_{k<n} ((2^n-1) mod (2^k-1)). 1

%I #21 Sep 08 2022 08:46:24

%S 0,0,1,1,5,4,13,14,28,30,69,60,131,144,263,267,549,530,1077,1100,2085,

%T 2140,4301,4186,8364,8558,16623,16744,33515,33164,66357,66936,131849,

%U 132656,265187,263571,527177,530100,1052039,1054214,2108467,2103240,4206521,4216716,8400159,8411752,16823549

%N a(n) = Sum_{k<n} ((2^n-1) mod (2^k-1)).

%C n is prime if and only if a(n) = 2*a(n-1) + n - 2.

%H Robert Israel, <a href="/A329162/b329162.txt">Table of n, a(n) for n = 1..6636</a>

%F a(n) = Sum_{k<n} (2^(n mod k) - 1).

%F G.f.: Sum_{k>=1} ((2^k-2)*z^(2*k+1)+(1-2^k)*z^(2*k)+z^(k+1))/((1-z^k)*(1-z)*(1-2*z)).

%e 2^5-1 == 0 (mod 2^1-1), == 1 (mod 2^2-1), == 3 (mod 2^3-1), == 1 (mod 2^4-1), so a(5) = 0+1+3+1 = 5.

%p f:= proc(n) local k;

%p add(2^(n mod k) - 1,k=2..n-1)

%p end proc:

%p map(f, [$1..100]);

%o (Magma) [0] cat [&+[2^(n mod k)-1:k in [1..n-1]]:n in [2..50]]; // _Marius A. Burtea_, Nov 06 2019

%K nonn

%O 1,5

%A _J. M. Bergot_ and _Robert Israel_, Nov 06 2019

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 03:28 EDT 2024. Contains 371235 sequences. (Running on oeis4.)