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
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Dec 22 2020
STATUS
approved