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.

A096990 Initial values for f(x)=sigma(phi(x))=A062402(x) such that iteration of f ends in cycle of length=3.

This page as a plain text file.
%I A096990 #12 Jun 10 2024 15:00:12
%S A096990 17,19,27,29,31,32,34,35,38,39,40,41,45,47,48,52,54,55,56,58,59,60,62,
%T A096990 69,70,72,75,78,82,84,88,90,92,94,100,110,118,132,138,150,1057,1117,
%U A096990 1153,1201,1237,1241,1261,1271,1301,1313,1321,1333,1349,1351,1359,1381
%N A096990 Initial values for f(x)=sigma(phi(x))=A062402(x) such that iteration of f ends in cycle of length=3.
%H A096990 Robert Israel, <a href="/A096990/b096990.txt">Table of n, a(n) for n = 1..10000</a>
%p A096990 kT:= {}: kF:= {}:
%p A096990 f:= proc(t) uses numtheory; local S,R,i,val,s; global kT, kF;
%p A096990   if member(t,kT) then return true elif member(t,kF) then return false fi;
%p A096990   R[0]:= t;
%p A096990   S:= {t};
%p A096990   for i from 1 do
%p A096990     R[i]:= sigma(phi(R[i-1]));
%p A096990     if member(R[i], kT) then val:= true
%p A096990     elif member(R[i], kF) then val:= false
%p A096990     elif member(R[i],S) then
%p A096990       val:= evalb(R[i-3] = R[i]) and not member(R[i],[R[i-1],R[i-2]])
%p A096990     else val:= fail; S:= S union {R[i]}
%p A096990     fi;
%p A096990     if val = true then kT:= kT union {R[i]} union S; return true
%p A096990     elif val = false then kF:= kF union {R[i]} union S; return false
%p A096990     fi
%p A096990   od;
%p A096990 end proc:
%p A096990 select(f, [$1..3000]); # _Robert Israel_, Jun 09 2024
%t A096990 f[n_] := DivisorSigma[1, EulerPhi[n]]; g[n_] := Block[{l = NestWhileList[f, n, UnsameQ, All]}, -Subtract @@ Flatten[ Position[l, l[[ -1]]]]]; Select[ Range[ 1396], g[ # ] == 3 &] (* _Robert G. Wilson v_, Jul 23 2004 *)
%Y A096990 Cf. A062402, A095953.
%K A096990 nonn
%O A096990 1,1
%A A096990 _Labos Elemer_, Jul 19 2004
%E A096990 Edited and extended by _Robert G. Wilson v_, Jul 23 2004