login
A339603
a(n) is the sum of (2^n mod k) for odd numbers k < 2^(n-1).
0
0, 0, 2, 4, 31, 103, 439, 1665, 6942, 27598, 110371, 438843, 1762848, 7052170, 28211223, 112799719, 451277874, 1804973952, 7220128542, 28880086112, 115521335176, 462085087138, 1848340368720, 7393350063050, 29573434659318, 118293733260264, 473174926753087
OFFSET
1,3
COMMENTS
Primes in this sequence include a(3) = 2, a(5) = 31, a(6) = 103, a(7) = 439, and a(16) = 112799719.
EXAMPLE
a(4) = (2^4 mod 1) + (2^4 mod 3) + (2^4 mod 5) + (2^4 mod 7) = 0+1+1+2 = 4.
MAPLE
f:= proc(m) local t; add(m mod t, t=1..m/2, 2) end proc:
seq(f(2^i), i=1..27);
MATHEMATICA
a[n_] := Sum[PowerMod[2, n, k], {k, 1, 2^(n-1) - 1, 2}];
Table[a[n], {n, 1, 27}] (* Jean-François Alcover, May 28 2024 *)
PROG
(PARI) a(n) = sum(k=0, 2^(n-2)-1, lift(Mod(2, 2*k+1)^n)); \\ Michel Marcus, Dec 22 2020
CROSSREFS
Sequence in context: A296249 A181620 A220283 * A188113 A259115 A051569
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Dec 22 2020
STATUS
approved