login
a(n) = gcd(n, A064169(n-2)) for n > 2.
2

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

%S 3,1,5,1,7,1,1,1,11,1,13,1,1,1,17,1,19,1,1,1,23,1,5,1,1,1,29,1,31,1,1,

%T 1,1,1,37,1,1,1,41,1,43,1,1,1,47,1,7,1,1,1,53,1,1,1,1,1,59,1,61,1,1,1,

%U 1,1,67,1,1,1,71,1,73,1,1,1,1,1,79,1,1,1,83,1,1,1,1,11,89,1

%N a(n) = gcd(n, A064169(n-2)) for n > 2.

%C Probably, there are no composite terms in this sequence.

%C For n > 2, a(n) = gcd(n, A001008(n-1)).

%C By Wolstenholme's theorem, if p is an odd prime, then a(p) = p.

%C Conjecture: for n > 2, if a(n) = n, then n is a prime.

%C If so, then there are no pseudoprimes n such that a(n) = n.

%C Composite numbers m <> p^2 for which a(m) > 1 are 88, 1290, 9339, ...

%H Robert Israel, <a href="/A309391/b309391.txt">Table of n, a(n) for n = 3..10000</a>

%H Romeo Mestrovic, <a href="https://arxiv.org/abs/1111.3057">Wolstenholme's theorem: Its Generalizations and Extensions in the last hundred and fifty years (1862--2012)</a>, arXiv:1111.3057 [math.NT], 2001.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/WolstenholmesTheorem.html">Wolstenholme's Theorem</a>.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Wolstenholme%27s_theorem">Wolstenholme's theorem</a>.

%F a(p) = p for every odd prime p.

%F a(p^2) = p iff p > 3 is a prime.

%F Note that a(n) >= A089026(n) for n > 2.

%e a(25) = gcd(25, A064169(25-2)) = gcd(25, 325333835) = 5,

%e a(25) = gcd(25, A001008(25-1)) = gcd(25, 1347822955) = 5.

%e It should be noted that a(88) = 11, a(1290) = 43, a(9339) = 11, ...

%p H:= 0:

%p for n from 3 to 100 do

%p H:= H + 1/(n-2);

%p A[n]:= igcd(n, numer(H)-denom(H));

%p od:

%p seq(A[i],i=3..100); # _Robert Israel_, Aug 04 2019

%t a[n_] := GCD[n, Numerator[(h = HarmonicNumber[n-2])] - Denominator[h]]; Array[a, 81, 3]

%o (Magma) [Gcd(k, Numerator(a)-Denominator(a)) where a is HarmonicNumber(k-2):k in [3..90]]; // _Marius A. Burtea_, Jul 29 2019

%Y Cf. A001008, A002805, A007406 (see our comment), A064169, A065091, A089026, A309397.

%K nonn

%O 3,1

%A _Amiram Eldar_ and _Thomas Ordowski_, Jul 28 2019