login
a(n) = numerator(-1/n + Sum_{k=1..n} 2^(k-1)/k).
2

%I #41 Sep 15 2024 02:25:54

%S 0,3,3,61,25,137,343,32663,2357,74689,66671,5299069,2416531,115545821,

%T 106974277,637525199,74575583,1588674349,4496071973,3234136824109,

%U 1535024393629,5843920343363,5575228585159,1961561381531581,93953561866435,9016382638527647,2888981280567587,200248741591132607,96525489421136333

%N a(n) = numerator(-1/n + Sum_{k=1..n} 2^(k-1)/k).

%C If p > 3 is a prime, then p^2 | a(p).

%C Does the above statement follow from Wolstenholme's theorem?

%C If p is a Wolstenholme prime (A088164), then p^3 | a(p).

%C However, it should be noted that also 7^3 | a(7).

%C Conjecture: there are no pseudoprimes m such that m^2 | a(m).

%C Is 7^2 the only weak pseudoprime (i.e., a composite m such that m | a(m))?

%H Robert Israel, <a href="/A332786/b332786.txt">Table of n, a(n) for n = 1..1367</a>

%F a(n) = numerator(-2/n + S(n))/2 for odd n and a(n) = numerator(-2/n + S(n)) for even n, where S(n) = Sum_{k=1..n} 2^k/k, see A108866 / A229726.

%F a(n) = numerator(Sum_{k=1..n} (2^(k-1)-1)/k + Sum_{k=1..n-1} 1/k), see A330718 / A330719 and A001008 / A002805.

%e a(5) = numerator(-1/5 + 1/1+2/2+4/3+8/4+16/5) = numerator(128/15 - 1/5) = numerator(25/3) = 25.

%p f:= proc(n) local k; numer(-1/n + add(2^(k-1)/k,k=1..n)) end proc:

%p map(f, [$1..30]); # _Robert Israel_, Sep 15 2024

%t n = 30; Numerator[Accumulate @ Table[(2^(k-1))/k, {k, 1, n}] - 1/Range[n]] (* _Amiram Eldar_, Feb 24 2020 *)

%o (PARI) a(n) = numerator(-1/n + sum(k=1, n, 2^(k-1)/k)); \\ _Michel Marcus_, Feb 24 2020

%Y Cf. A001008, A088164, A108866, A330718.

%K nonn,frac

%O 1,2

%A _Thomas Ordowski_, Feb 24 2020

%E More terms from _Amiram Eldar_, Feb 24 2020