|
|
A061097
|
|
a(n) is the concatenation of the phi(n) numbers between 1 and n that are relatively prime to n.
|
|
1
|
|
|
1, 1, 12, 13, 1234, 15, 123456, 1357, 124578, 1379, 12345678910, 15711, 123456789101112, 13591113, 12478111314, 13579111315, 12345678910111213141516, 157111317, 123456789101112131415161718
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
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:
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|