A376927 Totients whose inverses can be separated into ordered pairs (x, 2*x) with no remainder.
1, 6, 10, 18, 22, 28, 30, 42, 46, 52, 54, 58, 66, 70, 78, 82, 100, 102, 106, 110, 126, 130, 136, 138, 148, 150, 162, 166, 172, 178, 180, 190, 196, 198, 210, 222, 226, 228, 238, 250, 262, 268, 270, 282, 292, 294, 306, 310, 316, 330, 342, 346, 348, 358, 366, 372
Offset: 1
Keywords
Examples
1 is a totient and has totient inverses 1 and 2, giving an ordered pair (1, 2*1) 6 is a totient and has totient inverses 7, 9, 14, 18 giving ordered pairs (7,2*7) and (9, 2*9). 18 is a totient and has totient inverses 19, 27, 38, 54 giving ordered pairs (19,2*19) and (27, 2*27). 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).
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
- Max Alekseyev, PARI/GP Scripts for Miscellaneous Math Problems (invphi.gp).
Programs
-
Maple
q:= n-> (s-> s<>{} and ((x, y)-> x = map(t->t/2, y))( selectremove(x-> x::odd, s)))({numtheory[invphi](n)[]}): select(q, [$1..543])[]; # Alois P. Heinz, Nov 21 2024
-
Mathematica
okQ[k_] := With[{s = Sort[invphi[k]]}, s != {} && Select[s, EvenQ]/2 == Select[s, OddQ]]; 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) *)
-
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))} for(n = 1, 372, if(1 == evencardinality(invphi(n)), print1(n, ", ")));
Comments