This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A339107 #24 Mar 24 2023 02:49:42 %S A339107 3,6,12,24,8,56,42,21,28,70,30,15,10,40,60,20,80,48,16,112,84,14,35, %T A339107 140,105,120,72,9,18,36,45,90,135,108,54,27,216,270,180,144,240,160, %U A339107 96,32,224,168,126,63,378,189,252,315,210,231,132,44,77,462,22,99,198,165,110,374,204,68,221,2652 %N A339107 a(1) = 3; for n>1, a(n) = the smallest positive number not occurring earlier such that a(n-1)*a(n) is divisible by a(n-1)+a(n), where a(n) is not a prime or 4. %C A339107 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. %C A339107 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). %C A339107 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. %C A339107 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. %C A339107 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. %H A339107 Robert Israel, <a href="/A339107/b339107.txt">Table of n, a(n) for n = 1..10000</a> %H A339107 Scott R. Shannon, <a href="/A339107/a339107.png">Line graph of the first 100000 terms</a>. %e A339107 a(2) = 6. The only candidate for a(2) that satisfies 3*a(2) being divisible by 3+a(2) is a(2) = 6. %e A339107 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. %e A339107 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. %e A339107 a(5) = 8. There are 10 candidates for a(5) given a(4) = 24, the smallest that has not appeared is 8. %p A339107 R:= 3: a:= 3: S:= {4,3}: %p A339107 for i from 2 to 100 do %p A339107 Cands:= remove (t -> t < 1 or isprime(t), map(`-`,numtheory:-divisors(a^2),a) minus S); %p A339107 a:= min(Cands); R:= R, a; S:= S union {a}; %p A339107 od: %p A339107 R; # _Robert Israel_, Mar 23 2023 %Y A339107 Cf. A339133, A063647, A063427, A027750, A000040, A098550, A336957, A064413. %K A339107 nonn %O A339107 1,1 %A A339107 _Scott R. Shannon_, Nov 23 2020