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.

A225563 Numbers whose totient-trajectory can be partitioned into two sets with the same sum.

This page as a plain text file.
%I A225563 #21 May 24 2020 02:44:36
%S A225563 3,5,7,9,11,13,15,17,25,27,31,33,35,39,41,49,51,55,61,65,69,77,81,85,
%T A225563 87,91,95,97,103,111,115,119,121,123,125,133,137,141,143,145,153,155,
%U A225563 159,161,175,183,185,187,193,201,203,205,209,213,215,217,219,221
%N A225563 Numbers whose totient-trajectory can be partitioned into two sets with the same sum.
%C A225563 The "totient-trajectory" of a number m is the sequence obtained by starting with m and repeatedly applying the map x -> phi(x) (cf. A000010) until reaching 1.
%C A225563 Because all totient-trajectories contain only even numbers apart from the final 1 and (perhaps) the initial term ending in 1, only odd numbers will be in the sequence.
%C A225563 Conjecture: No totient-trajectory can be partitioned into an odd number of sets with the same sum.
%C A225563 Observation: for the first 1000 terms, numbers ending in 5 are more than twice as frequent as those ending in any other number.
%H A225563 Amiram Eldar, <a href="/A225563/b225563.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Christian N. K. Anderson)
%H A225563 Christian N. K. Anderson, <a href="/A225563/a225563.txt">Decomposition of the first 1000 terms.</a>
%e A225563 17 is in the sequence because its totient-trajectory is {17,16,8,4,2,1}, which can be partitioned into 17+4+2+1 = 16+8.
%t A225563 totQ[n_] := Module[{it = Most@FixedPointList[EulerPhi, n], sum, x}, sum = Plus @@ it; If[OddQ[sum], False, CoefficientList[Product[1 + x^i, {i, it}], x][[1 +sum/2]] > 0]]; Select[Range[221], totQ] (* _Amiram Eldar_, May 24 2020 *)
%o A225563 (R)library(numbers); totseq<-function(x) { while(x[length(x)]>1) x[length(x)+1]=eulersPhi(x[length(x)]); x };
%o A225563 eqsum<-function(xvec) {
%o A225563 mkgrp<-function(grp) {
%o A225563     if(length(grp)==length(xvec)) {
%o A225563         tapply(xvec,grp,sum)->tot;
%o A225563         if(length(tot)==2) if(tot[1]==tot[2]) {faxp<<-grp; return(T)}; return(F);
%o A225563     }
%o A225563     ifelse(mkgrp(c(grp,1)),T,mkgrp(c(grp,2)));
%o A225563 }
%o A225563 ifelse(length(xvec)<2,F,mkgrp(c()));
%o A225563 }
%o A225563 which(sapply(2*(1:100)-1,function(x) eqsum(totseq(x))))*2-1
%Y A225563 Cf. A008683, A003434, A007755, A049108, A002202, A000010, A083207.
%K A225563 nonn
%O A225563 1,1
%A A225563 _Kevin L. Schwartz_ and _Christian N. K. Anderson_, May 10 2013
%E A225563 Edited by _N. J. A. Sloane_, May 17 2013