The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A329162 a(n) = Sum_{k
 0, 0, 1, 1, 5, 4, 13, 14, 28, 30, 69, 60, 131, 144, 263, 267, 549, 530, 1077, 1100, 2085, 2140, 4301, 4186, 8364, 8558, 16623, 16744, 33515, 33164, 66357, 66936, 131849, 132656, 265187, 263571, 527177, 530100, 1052039, 1054214, 2108467, 2103240, 4206521, 4216716, 8400159, 8411752, 16823549 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,5 COMMENTS n is prime if and only if a(n) = 2*a(n-1) + n - 2. LINKS Robert Israel, Table of n, a(n) for n = 1..6636 FORMULA a(n) = 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)). EXAMPLE 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. MAPLE f:= proc(n) local k; add(2^(n mod k) - 1, k=2..n-1) end proc: map(f, [\$1..100]); PROG (Magma) [0] cat [&+[2^(n mod k)-1:k in [1..n-1]]:n in [2..50]]; // Marius A. Burtea, Nov 06 2019 CROSSREFS Sequence in context: A147685 A353151 A078930 * A344817 A094414 A158867 Adjacent sequences: A329159 A329160 A329161 * A329163 A329164 A329165 KEYWORD nonn AUTHOR J. M. Bergot and Robert Israel, Nov 06 2019 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.

Last modified February 5 09:25 EST 2023. Contains 360084 sequences. (Running on oeis4.)