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.

Previous Showing 21-24 of 24 results.

A362025 a(n) is the least number that reaches 1 after n iterations of the infinitary totient function A064380.

Original entry on oeis.org

2, 3, 4, 5, 9, 11, 16, 17, 28, 29, 46, 47, 99, 145, 167, 205, 314, 397, 437, 793, 851, 1137, 1693, 2453, 2771, 2989, 3701, 5099, 6801, 9299, 12031, 15811, 16816, 21520, 21521, 29547, 39685, 62077, 83191, 103473, 112117, 149535, 157159, 196049, 200267, 303022
Offset: 1

Views

Author

Amiram Eldar, Apr 05 2023

Keywords

Crossrefs

Cf. A064380.
Indices of records of A362024.
Similar sequences: A003271, A007755, A333610.

Programs

  • Mathematica
    infCoprimeQ[n1_, n2_] := Module[{g = GCD[n1, n2]}, If[g == 1, True, AllTrue[FactorInteger[g][[;; , 1]], BitAnd @@ IntegerExponent[{n1, n2}, #] == 0 &]]];
    iphi[n_] := Sum[Boole[infCoprimeQ[j, n]], {j, 1, n - 1}];
    numiter[n_] := Length@ NestWhileList[iphi, n, # > 1 &] - 1;
    seq[kmax_] := Module[{v = {}, n = 1}, Do[If[numiter[k] == n, AppendTo[v, k]; n++], {k, 2, kmax}]; v]; seq[1000]
  • PARI
    isinfcoprime(n1, n2) = {my(g = gcd(n1, n2), p, e1, e2); if(g == 1, return(1)); p = factor(g)[, 1]; for(i=1, #p, e1 = valuation(n1, p[i]); e2 = valuation(n2, p[i]); if(bitand(e1, e2) > 0, return(0))); 1; }
    iphi(n) = sum(j = 1, n-1, isinfcoprime(j, n));
    numiter(n) = if(n==2, 1, numiter(iphi(n)) + 1);
    lista(kmax) = {my(n = 1); for(k = 2, kmax, if(numiter(k) == n, print1(k, ", "); n++)); }

Formula

A362024(a(n)) = n, and A362024(k) < n for all k < a(n).

A364802 Smallest number that reaches 1 after n iterations of the map x -> A356874(x).

Original entry on oeis.org

1, 2, 3, 5, 11, 29, 117, 879, 15279, 963957, 392158939, 2059426052079
Offset: 0

Views

Author

Amiram Eldar, Aug 08 2023

Keywords

Comments

a(n) is the smallest number k such that A364800(k) = n.

Crossrefs

Similar sequences: A007755, A364803.

Programs

  • Mathematica
    f[n_] := f[n] = Module[{d = IntegerDigits[n, 2], nd}, nd = Length[d]; Total[d * Fibonacci[Range[nd, 1, -1]]]]; (* A356874 *)
    iternum[n_] := Length@ NestWhileList[f, n, # > 1 &] - 1; (* A364800 *)
    seq[kmax_] := Module[{s = {}, imax = -1, i}, Do[i = iternum[k]; If[i > imax, imax = i; AppendTo[s, k]], {k, 1, kmax}]; s]
    seq[10^6]
  • PARI
    f(n) = {my(b = binary(n), nb = #b); sum(i = 1, nb, b[i] * fibonacci(nb - i + 1));} \\ A356874
    iternum(n) = if(n == 1, 0, iternum(f(n)) + 1); \\ A364800
    lista(kmax) = {my(imax = -1, i1); for(k = 1, kmax, i = iternum(k); if(i > imax, imax = i; print1(k, ", ")));}

Extensions

a(11) from Martin Ehrenstein, Aug 26 2023

A364803 Smallest number that reaches a fixed point after n iterations of the map x -> A022290(x).

Original entry on oeis.org

0, 4, 5, 6, 7, 10, 14, 23, 46, 117, 442, 3006, 47983, 2839934, 918486751, 3769839124330
Offset: 0

Views

Author

Amiram Eldar, Aug 08 2023

Keywords

Comments

a(n) is the smallest number k such that A364801(k) = n.

Crossrefs

Similar sequences: A007755, A364802.

Programs

  • Mathematica
    f[n_] := f[n] = Module[{d = IntegerDigits[n, 2], nd}, nd = Length[d]; Total[d * Fibonacci[Range[nd + 1, 2, -1]]]]; (* A022290 *)
    iternum[n_] := -2 + Length@ FixedPointList[f, n]; (* A364801 *)
    seq[kmax_] := Module[{s = {}, imax = -1, i}, Do[i = iternum[k]; If[i > imax, imax = i; AppendTo[s, k]], {k, 0, kmax}]; s]
    seq[10^6]
  • PARI
    f(n) = {my(b = binary(n), nb = #b); sum(i = 1, nb, b[i] * fibonacci(nb - i + 2)); } \\ A022290
    iternum(n) = if(n < 4, 0, iternum(f(n)) + 1); \\ A364801
    lista(kmax) = {my(imax = -1, i1); for(k = 0, kmax, i = iternum(k); if(i > imax, imax = i; print1(k, ", ")));}

Extensions

a(15) from Martin Ehrenstein, Aug 25 2023

A098197 Smallest number m such that the trajectory of m under iteration of cototient function[=A051953] contains exactly n distinct numbers (including m and the fixed point=0). Or: the required number of iterations[=operations,transitions] is n-1.

Original entry on oeis.org

0, 1, 2, 4, 6, 10, 18, 30, 42, 78, 114, 186, 294, 390, 582, 798, 1194, 1950, 2922, 4074, 5586, 7770, 11154, 15810, 22110, 30702, 42570, 53130, 68970, 105090, 159390, 206910, 278850, 361410, 462210, 688722, 1019202, 1389810, 2053770, 3011850
Offset: 1

Views

Author

Labos Elemer, Sep 16 2004

Keywords

Comments

Analogous to A007755. Separating prime and composite least numbers is not more informative [contrary to totient-iterations] because trajectory-length=3 for all primes and except 2, all terms here are composite numbers.

Examples

			Trajectories for lengths=n=1,2,3,4 are: {0},{1,0},{2,1,0},{4,2,1,0}
n=15:{390,294,210,162,108,72,48,32,16,8,4,2,1,0}
		

Crossrefs

Previous Showing 21-24 of 24 results.