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.

A340922 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.

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