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.

A376927 Totients whose inverses can be separated into ordered pairs (x, 2*x) with no remainder.

Original entry on oeis.org

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

Views

Author

Torlach Rush, Oct 11 2024

Keywords

Comments

Conjecture: Numbers having an even number of totient inverses, the odd inverses being confined to the lower half of the list.

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

Crossrefs

Subset of A002202.

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, ", ")));