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.
%I A376927 #39 Apr 04 2025 11:25:37 %S A376927 1,6,10,18,22,28,30,42,46,52,54,58,66,70,78,82,100,102,106,110,126, %T A376927 130,136,138,148,150,162,166,172,178,180,190,196,198,210,222,226,228, %U A376927 238,250,262,268,270,282,292,294,306,310,316,330,342,346,348,358,366,372 %N A376927 Totients whose inverses can be separated into ordered pairs (x, 2*x) with no remainder. %C A376927 Conjecture: Numbers having an even number of totient inverses, the odd inverses being confined to the lower half of the list. %H A376927 Alois P. Heinz, <a href="/A376927/b376927.txt">Table of n, a(n) for n = 1..10000</a> %H A376927 Max Alekseyev, <a href="https://oeis.org/wiki/User:Max_Alekseyev/gpscripts">PARI/GP Scripts for Miscellaneous Math Problems</a> (invphi.gp). %e A376927 1 is a totient and has totient inverses 1 and 2, giving an ordered pair (1, 2*1) %e A376927 6 is a totient and has totient inverses 7, 9, 14, 18 giving ordered pairs (7,2*7) and (9, 2*9). %e A376927 18 is a totient and has totient inverses 19, 27, 38, 54 giving ordered pairs (19,2*19) and (27, 2*27). %e A376927 348 is a totient and has totient inverses 349, 413, 531, 698, 826, 1062 giving ordered pairs (349, 2*349), (413, 2*413), and (531, 2*531). %p A376927 q:= n-> (s-> s<>{} and ((x, y)-> x = map(t->t/2, y))( %p A376927 selectremove(x-> x::odd, s)))({numtheory[invphi](n)[]}): %p A376927 select(q, [$1..543])[]; # _Alois P. Heinz_, Nov 21 2024 %t A376927 okQ[k_] := With[{s = Sort[invphi[k]]}, s != {} && Select[s, EvenQ]/2 == Select[s, OddQ]]; %t A376927 Reap[For[k = 1, k <= 1000, k++, If[okQ[k], Print[k]; Sow[k]]]][[2, 1]] (* _Jean-François Alcover_, Apr 04 2025, using Maxim Rytin's 'invphi' program (see A007617) *) %o A376927 (PARI) evencardinality(list)={e=0;o=0;if(0 < #list,if(0 == Mod(#list, 2),for(i=1,#list,if(1==Mod(list[i],2),o++,e++)),o++), o++);return(if(o==e, 1, 0))} %o A376927 for(n = 1, 372, if(1 == evencardinality(invphi(n)), print1(n, ", "))); %Y A376927 Subset of A002202. %Y A376927 Cf. A000010, A007617, A032447. %K A376927 nonn %O A376927 1,2 %A A376927 _Torlach Rush_, Oct 11 2024