%I #8 Feb 24 2015 06:53:32
%S 1,2,4,6,8,10,18,32,48,126,60,162,468,210,1050,98,2254,154,4704,9380,
%T 15750,33810,10584,78498,45096,79780,266760,362190,911262,46260,
%U 1862700,3713700,743052,5023454,13211688,26120556,52543890,15624468,48120150,89142066
%N a(0) = 1; a(n+1) is the smallest number not in the sequence such that a(n+1) - Sum_{i=1..n} a(i) divides a(n+1) - Product_{i=1..n} a(i).
%C If a(0) = 2, the sequence is the same; only a(0) and a(1) switch places.
%H Hiroaki Yamanouchi, <a href="/A254343/b254343.txt">Table of n, a(n) for n = 0..64</a>
%o (PARI) v=[1];print1(1,", ");n=1;while(n<10^4,p=prod(i=1,#v,v[i]);if(vecsum(v)!=n&&(p-n)\(vecsum(v)-n)==(p-n)/(vecsum(v)-n)&&!vecsearch(vecsort(v),n),v=concat(v,n);print1(n,", ");n=0);n++)
%Y Cf. A254344.
%K nonn
%O 0,2
%A _Derek Orr_, Jan 29 2015
%E a(34)-a(39) from _Hiroaki Yamanouchi_, Feb 24 2015
|