OFFSET
1,3
LINKS
Robert Israel, Table of n, a(n) for n = 1..372
EXAMPLE
a(6) = 15, 1 and 5 are the two coprime numbers less than 6.
a(7) = 123456. 7 is a prime. phi(7) = 6 hence all the numbers less than 7 are concatenated.
MAPLE
f:= proc(n) local i, t;
t:= 1;
for i from 2 to n-1 do if igcd(i, n)=1 then t:= t*10^(1+ilog10(i))+i fi od;
t
end proc:
map(f, [$1..30]); # Robert Israel, Jun 13 2018
PROG
(PARI) a(n)=j=0; for(k=1, n, if(gcd(k, n)==1, j=j*10^#digits(k)+k)); j \\ Eric Chen, Jun 13 2018
(PARI) a(n) = eval(concat(apply(x->Str(x), select(x->(gcd(n, x) == 1), [1..n])))); \\ Michel Marcus, Jun 14 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Apr 19 2001
EXTENSIONS
a(11)-a(19) from Carl Najafi, Apr 30 2011
STATUS
approved