%I #31 Oct 02 2015 16:45:29
%S 6,10,210,34,399,58,651,82,903,795,1281,142,1533,2739,2037,214,6213,
%T 1965,2919,298,5285,3423,2595,3801,382,12545,7385,4683,3495,5061,8785,
%U 3945,5691,562,5943,9669,6447,10461,12909,694,7329,5385,12845,7959,5835,13895
%N a(1) = 6; for n > 1, a(n) = the least squarefree composite number whose sum of prime factors is prime and whose greatest prime factor is the sum of prime factors of a(n-1).
%C a(n) is a composite squarefree integer in order to avoid the trivial sequences 3, 6, 5, 5, 5, ... or 6, 10, 49, 49, 49, ... if a(1)=3 or a(1)=6.
%C The greatest prime factors of a(n) are 3, 5, 7, 17, 19, 29, 31, 41, 43, 53, 61, 71, 73, 83, 97, 107, 109, 131, 139, 149, 151, 163, 173, 181, 191, 193, 211, 223, 233, 241, ...
%C The definition expressed with A-numbers: a(1) = 6; for n > 1, a(n) = the least term k of A120944 such that A001414(k) is prime and A006530(k) = A001414(a(n-1)). Also A008472 could be used instead of A001414 because all terms are squarefree, thus all prime factors of any single term are distinct. - _Antti Karttunen_, Sep 28 2015
%H Michel Lagneau, <a href="/A262081/b262081.txt">Table of n, a(n) for n = 1..500</a>
%e {a(4), a(5), a(6)} = {34, 399, 58} because 34 = 2*17 => 2+17 = 19 is the greatest prime factor of 399 = 3*7*19, and 3+7+19 = 29 is the greatest prime divisor of 58 = 2*29 where 29+2 = 31 is prime.
%p with(numtheory):p0:=3:nn:=10^7:
%p for n from 1 to 50 do:
%p ii:=0:
%p for k from 4 to nn while(ii=0) do:
%p x:=factorset(k):n0:=nops(x):
%p s:=sum('x[i]', 'i'=1..n0):
%p if isprime(s) and x[n0]=p0 and issqrfree(k)and type(k,prime)=false
%p then
%p ii:=1: printf(`%d, `,k):p0:=s:k0:=k:
%p else
%p fi:
%p od:
%p od:
%o (PARI) gpf(k) = my(fk=factor(k)); fk[#fk~,1];
%o sc(k) = forcomposite(c = k,, if (issquarefree(c), return (c)));
%o sdpf(k)= my(fk=factor(k)); vecsum(fk[,1]);
%o scok(a) = {my(s = sdpf(a)); forcomposite(c = 1,,if (issquarefree(c) && (gpf(c)==s) && isprime(sdpf(c)), return (c)););}
%o lista(nn) = {print1(a=sc(1), ", ");for (n=2, nn, na = scok(a); print1(na, ", "); a = na;);} \\ _Michel Marcus_, Sep 27 2015
%Y Cf. A001414, A008472, A006530, A120944.
%K nonn
%O 1,1
%A _Michel Lagneau_, Sep 10 2015