OFFSET
3,1
COMMENTS
Probably, there are no composite terms in this sequence.
For n > 2, a(n) = gcd(n, A001008(n-1)).
By Wolstenholme's theorem, if p is an odd prime, then a(p) = p.
Conjecture: for n > 2, if a(n) = n, then n is a prime.
If so, then there are no pseudoprimes n such that a(n) = n.
Composite numbers m <> p^2 for which a(m) > 1 are 88, 1290, 9339, ...
LINKS
Robert Israel, Table of n, a(n) for n = 3..10000
Romeo Mestrovic, Wolstenholme's theorem: Its Generalizations and Extensions in the last hundred and fifty years (1862--2012), arXiv:1111.3057 [math.NT], 2001.
Eric Weisstein's World of Mathematics, Wolstenholme's Theorem.
Wikipedia, Wolstenholme's theorem.
FORMULA
a(p) = p for every odd prime p.
a(p^2) = p iff p > 3 is a prime.
Note that a(n) >= A089026(n) for n > 2.
EXAMPLE
MAPLE
H:= 0:
for n from 3 to 100 do
H:= H + 1/(n-2);
A[n]:= igcd(n, numer(H)-denom(H));
od:
seq(A[i], i=3..100); # Robert Israel, Aug 04 2019
MATHEMATICA
a[n_] := GCD[n, Numerator[(h = HarmonicNumber[n-2])] - Denominator[h]]; Array[a, 81, 3]
PROG
(Magma) [Gcd(k, Numerator(a)-Denominator(a)) where a is HarmonicNumber(k-2):k in [3..90]]; // Marius A. Burtea, Jul 29 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar and Thomas Ordowski, Jul 28 2019
STATUS
approved