OFFSET
1,4
COMMENTS
a(n) = 1 iff n is prime or n is 1.
Apart from 1-terms, the other duplicated terms are: a(24) = a(27), a(120) = a(125), a(140) = a(147), a(528) = a(539), etc, whose positions are listed by A293893 and A293894. - Antti Karttunen, Nov 01 2017
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..2001
MATHEMATICA
Array[Times @@ Select[Prime@ Range[#1, #1 + #2], Function[p, p <= #3]] & @@ {PrimePi@ NextPrime[FactorInteger[#][[-1, 1]]], PrimePi@ #, #} &, 43] (* Michael De Vlieger, Nov 01 2017 *)
PROG
(PARI) a(n) = {if (n==1, return (1)); my(gpf = vecmax(factor(n)[, 1])); my(pp = 1); forprime(p=gpf+1, n, pp *= p; ); pp; } \\ Michel Marcus, Jun 26 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 04 2003
EXTENSIONS
More terms from Michel Marcus, Jun 26 2016
STATUS
approved