OFFSET
1,1
COMMENTS
pp * (pp + j) is a term if and only if pp is a prime power, j is in {1, 2} and gcd(pp, j) = 1 and pp + j is not a prime power. - David A. Corneth, Dec 29 2020
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000 (first 1016 terms from Robert Israel).
EXAMPLE
From David A. Corneth, Dec 29 2020: (Start)
30 is in the sequence as floor(sqrt(30)) = 5 and 5 is the largest prime power of 30.
90 is in the sequence via prime power 9 and factor 9+1 = 10 which is not a prime power and gcd(1, 9) = 1. (End)
MAPLE
filter:= proc(n) local t;
max(seq(t[1]^t[2], t = ifactors(n)[2])) = floor(sqrt(n));
end proc:
select(filter, [$1..1000]); # Robert Israel, Dec 29 2020
PROG
(PARI) upto(n) = { my(primepowers = List(), res = List()); forprime(p = 2, sqrtint(n), for(e = 1, logint(sqrtint(n), p), listput(primepowers, p^e) ) ); listsort(primepowers); for(i = 1, #primepowers, for(j = 1, 2, if(is(primepowers[i] * (primepowers[i] + j)), listput(res, primepowers[i] * (primepowers[i] + j)) ) ) ); Set(res) }
is(n) = { my(s = sqrtint(n), f); f = factor(n); vecmax(vector(#f~, i, f[i, 1]^f[i, 2])) == s } \\ David A. Corneth, Dec 29 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Benoit Cloitre, Apr 10 2003
STATUS
approved