login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A061097 a(n) is the concatenation of the phi(n) numbers between 1 and n that are relatively prime to n. 1

%I #35 Jun 14 2018 04:38:26

%S 1,1,12,13,1234,15,123456,1357,124578,1379,12345678910,15711,

%T 123456789101112,13591113,12478111314,13579111315,

%U 12345678910111213141516,157111317,123456789101112131415161718

%N a(n) is the concatenation of the phi(n) numbers between 1 and n that are relatively prime to n.

%H Robert Israel, <a href="/A061097/b061097.txt">Table of n, a(n) for n = 1..372</a>

%e a(6) = 15, 1 and 5 are the two coprime numbers less than 6.

%e a(7) = 123456. 7 is a prime. phi(7) = 6 hence all the numbers less than 7 are concatenated.

%p f:= proc(n) local i,t;

%p t:= 1;

%p for i from 2 to n-1 do if igcd(i,n)=1 then t:= t*10^(1+ilog10(i))+i fi od;

%p t

%p end proc:

%p map(f, [$1..30]); # _Robert Israel_, Jun 13 2018

%o (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

%o (PARI) a(n) = eval(concat(apply(x->Str(x), select(x->(gcd(n, x) == 1), [1..n])))); \\ _Michel Marcus_, Jun 14 2018

%Y Cf. A000010, A038566.

%K nonn,base

%O 1,3

%A _Amarnath Murthy_, Apr 19 2001

%E a(11)-a(19) from _Carl Najafi_, Apr 30 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 17:42 EDT 2024. Contains 371254 sequences. (Running on oeis4.)