login
A379730
a(1)=1. For n>1 if a(n-1) is a novel term a(n)=A083720(a(n-1)), else a(n) = k*a(n-1), where k(>1) is the number of times a(n-1) has occurred.
1
1, 1, 2, 1, 3, 2, 4, 1, 4, 8, 1, 5, 6, 1, 6, 12, 1, 7, 30, 1, 8, 16, 1, 9, 2, 6, 18, 1, 10, 3, 6, 24, 1, 11, 210, 1, 12, 24, 48, 1, 13, 2310, 1, 14, 15, 2, 8, 24, 72, 1, 15, 30, 60, 1, 16, 32, 1, 17, 30030, 1, 18, 36, 1, 19, 510510, 1, 20, 3, 9, 18, 54, 1, 21
OFFSET
1,3
COMMENTS
In other words if a(n-1) is a novel term, a(n) is the product of all primes < Gpf(a(n-1) which do not divide a(n-1), else if a(n-1) seen k times already, up to and including itself then a(n)=k*a(n-1). All positive integers appear eventually in the sequence, and the first occurrences of primes appear in order.
Every squarefree number appears infinitely many times (consequent to both conditions of the definition), whereas numbers m which are not squarefree can appear only from the second condition, and therefore appear finitely many (at most A000005(m)-1) times; see Example.
LINKS
Michael De Vlieger, Log log scatterplot of log_10(a(n)), n = 1..2^20.
FORMULA
If a(n-1) is a novel term and rad(a(n-1)) is primorial then a(n)=1.
EXAMPLE
a(1)=1 is a primorial term so a(2)=1. 1 has now occurred twice so a(3)=2*1=2.
a(3)=2 is a novel primorial term so a(4)=1, and then a(5)=3. Since 3 is novel a(6)=A083720(3)=2.
4 appears twice = A5(4)-1 (as 2*2=a(7), and 4*1=a(9)). It never appears again since A083720(m)!=4 for any m, so 4 can only arise as consequence of the second condition of the definition. Similarly 8 appears only 3 (A5(8)-1) times: 2*4=a(10), 8*1=a(21), and 4*2 a(47). However 16 appears not 5 (A5(16)-1) times but 4 times because 4*4 is prevented since 4 appears only twice.
MATHEMATICA
nn = 120; c[_] := 0; j = 1;
{j}~Join~Reap[Do[
If[c[j] == 0,
k = Product[Prime[i], {i, PrimePi[#[[-1]] ] } ]/Apply[Times, #] &[
FactorInteger[j][[All, 1]] ]; c[j]++,
k = ++c[j]*j ];
j = Sow[k], {nn}] ][[-1, 1]]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved