OFFSET
1,2
COMMENTS
n is in the sequence iff either n = 1 or n is a prime or n is a Giuga number, by one definition of Giuga numbers A007850.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Wikipedia, Giuga number
FORMULA
n such that A326690(n) = 1.
EXAMPLE
a(30) = denominator(Sum_{prime p | 30} 1/p - 1/30) = denominator(1/2 + 1/3 + 1/5 - 1/30) = denominator(1/1) = 1, and 30 is a Giuga number.
MAPLE
filter:= proc(n) local p;
denom(add(1/p, p = numtheory:-factorset(n))-1/n)=1
end proc:
select(filter, [$1..300]); # Robert Israel, Dec 15 2020
MATHEMATICA
PrimeFactors[n_] := Select[Divisors[n], PrimeQ];
f[n_] := Denominator[Sum[1/p, {p, PrimeFactors[n]}] - 1/n];
Select[Range[148], f[#] == 1 &]
CROSSREFS
KEYWORD
nonn
AUTHOR
Jonathan Sondow, Jul 20 2019
STATUS
approved