OFFSET
1,1
COMMENTS
Given a(n-1) the candidates for a(n) are k*a(n-1)/(a(n-1)-k), where 1<=k<a(n-1) and k*a(n-1) is divisible by a(n-1)-k. The number of these candidates for a given n is given by A063647(n). The values of a(n-1)*a(n)/(a(n-1)+a(n)) are given by the companion sequence A339133.
The first term is 3 as one can easily show 1 and 2 cannot occur in the sequence; if a(n-1)=1 then 1*a(n)/(1+a(n)) has no integer solution while if a(n-1)=2 then 2*a(n)/(2+a(n)) has the one integer solution a(n)=2, but that is a(n-1).
One can also show that a(n) can never be a prime. The only way a(n)=p can be produced is if a(n-1) = p*(p-1). However the only candidate for a(n+1) if a(n)=p is the number p*(p-1), but that is a(n-1). Thus allowing a(n) to be a prime will halt the sequence; if a number of the form p*(p-1) occurs in the sequence the smallest candidate other than p must be chosen for the next term.
Likewise to avoid halting the sequence the number 4 cannot be chosen; if a(n-1)=4 the only candidates for a(n) would be 4 and 12, but a(3)=12 and 4 cannot occur again, thus a(n-1)=4 would halt the sequence.
It is likely all numbers other than 1,2,4 and the primes appear in the sequence, although this is unknown. The smallest composite not to have appeared after 100 thousand terms is 794. The one fixed point in the first 100 thousand terms is a(20572) = 20572.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Scott R. Shannon, Line graph of the first 100000 terms.
EXAMPLE
a(2) = 6. The only candidate for a(2) that satisfies 3*a(2) being divisible by 3+a(2) is a(2) = 6.
a(3) = 12. The candidates for a(3) given a(2) = 6 are 3,6,12,30, all of which satisfy 6*a(3) being divisible by 6+a(3). 3 and 6 have already appeared so the next smallest candidate is chosen, being 12.
a(4) = 24. The candidates for a(4) given a(3) = 12 are 4,6,12,24,36,60,132, all of which satisfy 12*a(4) being divisible by 12+a(4). 4 is not allowed as there would be no candidates for a(5), and 6 and 12 have already appeared, so the next smallest candidate is chosen, being 24.
a(5) = 8. There are 10 candidates for a(5) given a(4) = 24, the smallest that has not appeared is 8.
MAPLE
R:= 3: a:= 3: S:= {4, 3}:
for i from 2 to 100 do
Cands:= remove (t -> t < 1 or isprime(t), map(`-`, numtheory:-divisors(a^2), a) minus S);
a:= min(Cands); R:= R, a; S:= S union {a};
od:
R; # Robert Israel, Mar 23 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Nov 23 2020
STATUS
approved