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.

Original entry on oeis.org

17, 19, 27, 29, 31, 32, 34, 35, 38, 39, 40, 41, 45, 47, 48, 52, 54, 55, 56, 58, 59, 60, 62, 69, 70, 72, 75, 78, 82, 84, 88, 90, 92, 94, 100, 110, 118, 132, 138, 150, 1057, 1117, 1153, 1201, 1237, 1241, 1261, 1271, 1301, 1313, 1321, 1333, 1349, 1351, 1359, 1381
Offset: 1

Views

Author

Labos Elemer, Jul 19 2004

Keywords

Crossrefs

Programs

  • Maple
    kT:= {}: kF:= {}:
    f:= proc(t) uses numtheory; local S,R,i,val,s; global kT, kF;
      if member(t,kT) then return true elif member(t,kF) then return false fi;
      R[0]:= t;
      S:= {t};
      for i from 1 do
        R[i]:= sigma(phi(R[i-1]));
        if member(R[i], kT) then val:= true
        elif member(R[i], kF) then val:= false
        elif member(R[i],S) then
          val:= evalb(R[i-3] = R[i]) and not member(R[i],[R[i-1],R[i-2]])
        else val:= fail; S:= S union {R[i]}
        fi;
        if val = true then kT:= kT union {R[i]} union S; return true
        elif val = false then kF:= kF union {R[i]} union S; return false
        fi
      od;
    end proc:
    select(f, [$1..3000]); # Robert Israel, Jun 09 2024
  • Mathematica
    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 *)

Extensions

Edited and extended by Robert G. Wilson v, Jul 23 2004