OFFSET
1,2
EXAMPLE
a(1)=1 and n=1 is odd -> a(2)=12 because is the smallest abundant number not yet in the sequence such that a(1) || a(2) = 112 is abundant.
Now n=2 is even -> a(3)=2 because is the smallest deficient number not yet in the sequence such that a(2) || a(3) = 122 is deficient. And so on.
MAPLE
with(numtheory): P:=proc(q) local a, b, k, n; a:=[1];
for n from 2 to q do for k from 2 do if numboccur(k, a)=0
then b:=a[nops(a)]*10^length(k)+k;
if (n mod 2=0 and 2*b<sigma(b) and 2*k<sigma(k)) or
(n mod 2=1 and 2*b>sigma(b) and 2*k>sigma(k))
then a:=[op(a), k]; break; fi; fi; od; od; print(op(a)); end: P(65);
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Aug 17 2024
STATUS
approved