OFFSET
1,1
COMMENTS
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 20 because 20 = 2 + 18 = 4 + 16 = 8 + 12 = 10 + 10; 2, 4, 8, 10, 12, 16, 18 are in A002202 and 20 is the least number with this property.
PROG
(PARI) a281687(n) = sum(k=1, n, istotient(k) && istotient(2*n-k));
a(n) = my(k=1); while(a281687(k) != n, k++); 2*k;
(PARI) do(n)=my(u=select(istotient, [1..n]), v=vector(n), t); for(i=1, #u, for(j=i, #u, t=u[i]+u[j]; if(t>n, break); v[t]++)); t=vector(vecmax(v)); for(i=1, #v, if(v[i] && t[v[i]]==0, t[v[i]]=i)); for(i=1, #t, if(t[i]==0, return(t[1..i-1]))); t \\ Charles R Greathouse IV, Jan 29 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Jan 28 2017
STATUS
approved