%I #20 Feb 20 2021 02:57:54
%S 0,1,2,19,20,3,4,35,36,9,10,239,240,55,56,57,58,13,14,83,84,16,15,
%T 1059,1060,255,256,23,24,259,260,265,266,25,26,615,616,145,146,39,40,
%U 272,271,1763,1764,423,424,427,428,435,436,51,52,443,444,947,948,241,242
%N a(n) is the position of phi(A038568(n)^2)/phi(A038569(n)^2) in the enumeration of the rationals by A038568 and A038569, where phi is A000010.
%H Rémy Sigrist, <a href="/A340922/b340922.txt">Table of n, a(n) for n = 0..10000</a>
%H Hongjian Li, Pingzhi Yuan, and Hairong Bai, <a href="https://doi.org/10.1080/00029890.2021.1850142">Positive Rational Numbers of the Form phi(n^2)/phi(m^2)</a>, The American Mathematical Monthly, 128:2 (2021), 174-176.
%H Rémy Sigrist, <a href="/A340922/a340922.gp.txt">PARI program for A340922</a>
%e n 0 1 2 3 4 5 6 7 8 9 10
%e j/k 1 1/2 2 1/3 3 2/3 3/2 1/4 4 3/4 4/3
%e phi(j^2)/phi(k^2) 1 1/2 2 1/6 6 1/3 3 1/8 8 3/4 4/3
%e a(n) 0 1 2 19 20 3 4 35 36 9 10
%e .
%e n 11 12 13 14 15 16 17 18 19 20
%e j/k 1/5 5 2/5 5/2 3/5 5/3 4/5 5/4 1/6 6
%e phi(j^2)/phi(k^2) 1/20 20 1/10 10 3/10 10/3 2/5 5/2 1/12 12
%e a(n) 239 240 55 56 57 58 13 14 83 84
%o (PARI) \\ It is assumed that a38568 and a38569 are available as vectors,
%o \\ e.g. from the corresponding b-files.
%o \\ a38568=readvec("[path] a38568"); a38569=readvec("[path] a38569");
%o findinlist(n,d)={my(num=numerator(n/d),den=denominator(n/d));for(k=1,#a38568,if(num==a38568[k]&&den==a38569[k],return(k)));0};
%o for(k=1,60,my(m=a38568[k],n=a38569[k],num=eulerphi(m^2),den=eulerphi(n^2));print1(findinlist(num,den)-1,", "))
%o (Julia)
%o using Nemo
%o function A340922List(len)
%o num(a) = euler_phi(numerator(a)^2)
%o den(a) = euler_phi(denominator(a)^2)
%o a, q, A, R = QQ(0), QQ(0), [], Int[]
%o for n in 1:len
%o q = next_minimal(q)
%o x = num(q)//den(q)
%o while true
%o i = findfirst(isequal(x), A)
%o if i == nothing
%o a = next_minimal(a)
%o push!(A, a)
%o else
%o push!(R, i - 1)
%o break
%o end
%o end
%o end
%o R
%o end
%o A340922List(59) |> println # _Peter Luschny_, Feb 19 2021
%Y Cf. A000010, A038568, A038569.
%K nonn
%O 0,3
%A _Hugo Pfoertner_, Feb 19 2021