cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A061097 #35 Jun 14 2018 04:38:26
%S A061097 1,1,12,13,1234,15,123456,1357,124578,1379,12345678910,15711,
%T A061097 123456789101112,13591113,12478111314,13579111315,
%U A061097 12345678910111213141516,157111317,123456789101112131415161718
%N A061097 a(n) is the concatenation of the phi(n) numbers between 1 and n that are relatively prime to n.
%H A061097 Robert Israel, <a href="/A061097/b061097.txt">Table of n, a(n) for n = 1..372</a>
%e A061097 a(6) = 15, 1 and 5 are the two coprime numbers less than 6.
%e A061097 a(7) = 123456. 7 is a prime. phi(7) = 6 hence all the numbers less than 7 are concatenated.
%p A061097 f:= proc(n) local i,t;
%p A061097   t:= 1;
%p A061097   for i from 2 to n-1 do if igcd(i,n)=1 then t:= t*10^(1+ilog10(i))+i fi od;
%p A061097   t
%p A061097 end proc:
%p A061097 map(f, [$1..30]); # _Robert Israel_, Jun 13 2018
%o A061097 (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 A061097 (PARI) a(n) = eval(concat(apply(x->Str(x), select(x->(gcd(n, x) == 1), [1..n])))); \\ _Michel Marcus_, Jun 14 2018
%Y A061097 Cf. A000010, A038566.
%K A061097 nonn,base
%O A061097 1,3
%A A061097 _Amarnath Murthy_, Apr 19 2001
%E A061097 a(11)-a(19) from _Carl Najafi_, Apr 30 2011