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.

Showing 1-8 of 8 results.

A348213 a(n) is the number of iterations that n requires to reach a fixed point under the map x -> A348158(x).

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0
Offset: 1

Views

Author

Amiram Eldar, Oct 07 2021

Keywords

Comments

a(n) first differs from 1-A000035(n) at n = 63.
The number of iterations is finite for all n since A348158(n) <= n.
The fixed points are terms of A326835, so a(n) = 0 if and only if n is a term of A326835.

Examples

			a(1) = 0 since 1 is in A326835.
a(2) = 1 since there is one iteration of the map x -> A348158(x) starting from 2: 2 -> 1.
a(64) = 2 since there are 2 iterations of the map x -> A348158(x) starting from 64: 64 -> 63 -> 57.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ DeleteDuplicates @ Map[EulerPhi, Divisors[n]]; a[n_] := -2 + Length @ FixedPointList[f, n]; Array[a, 100]
  • Python
    from sympy import totient, divisors
    def A348213(n):
        c, k = 0, n
        m = sum(set(map(totient,divisors(k,generator=True))))
        while m != k:
            k = m
            m = sum(set(map(totient,divisors(k,generator=True))))
            c += 1
        return c # Chai Wah Wu, Nov 15 2021

A348215 a(n) is the sum of the iterated A348158 starting from n until a fixed point is reached.

Original entry on oeis.org

0, 1, 0, 3, 0, 3, 0, 7, 0, 5, 0, 7, 0, 7, 0, 15, 0, 9, 0, 15, 0, 11, 0, 15, 0, 13, 0, 21, 0, 15, 0, 31, 0, 17, 0, 25, 0, 19, 0, 31, 0, 21, 0, 33, 0, 23, 0, 31, 0, 25, 0, 39, 0, 27, 0, 49, 0, 29, 0, 31, 0, 31, 57, 120, 0, 33, 0, 51, 0, 35, 0, 57, 0, 37, 0, 57
Offset: 1

Views

Author

Amiram Eldar, Oct 07 2021

Keywords

Comments

The first odd number k with a(k) > 0 is k = 63.

Examples

			a(4) = 3 since the iterations of the map x -> A348158(x) starting from 4 are 4 -> 3.
a(64) = 120 since the iterations of the map x -> A348158(x) starting from 64 are 64 -> 63 -> 57, and 63 + 57 = 120.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ DeleteDuplicates @ Map[EulerPhi, Divisors[n]]; a[n_] := Plus @@ Most @ FixedPointList[f, n] - n; Array[a, 100]

Formula

a(n) = 0 if and only if n is in A326835.
a(2*n) > 0 for all n.

A348159 Indices k of records of low value in the ratios A348158(k)/k.

Original entry on oeis.org

1, 2, 126, 1638, 2394, 8190, 139230, 155610, 2645370, 5757570, 97878690, 420302610, 1963331370, 7145144370
Offset: 1

Views

Author

Amiram Eldar, Oct 03 2021

Keywords

Comments

The maximal possible value of the ratio A348158(k)/k is 1 which occurs at the terms of A326835.
The rounded values of the corresponding records are 1, 0.5, 0.452, 0.445, 0.437, 0.424, 0.420, 0.409, 0.404, 0.398, 0.3933, 0.3927, 0.3885, 0.3879, ...
a(15) <= 33376633290. - David A. Corneth, Oct 04 2021

Crossrefs

Programs

  • Mathematica
    r[n_] := Plus @@ DeleteDuplicates @ Map[EulerPhi, Divisors[n]]/n; rm = 2; s = {}; Do[If[(r1 = r[n]) < rm, rm = r1; AppendTo[s, n]], {n, 1, 2*10^5}]; s
  • PARI
    f(n) = vecsum(Set(apply(eulerphi, divisors(n)))); \\ A348158
    lista(nn) = {my(r=oo, x); for (i=1, nn, if ((x=f(i)/i) < r, print1(i, ", "); r = x););} \\ Michel Marcus, Oct 04 2021

A348160 Odd numbers not appearing in A348158.

Original entry on oeis.org

189, 273, 315, 513, 567, 585, 825, 945, 1071, 1323, 1365, 1539, 1575, 1701, 1755, 1911, 2079, 2205, 2255, 2457, 2565, 2835, 3003, 3069, 3075, 3213, 3465, 3549, 3591, 3969, 4125, 4329, 4347, 4617, 4641, 4725, 4995, 5103, 5187, 5265, 5425, 5481, 5733, 5775, 5859, 5985
Offset: 1

Views

Author

Amiram Eldar, Oct 03 2021

Keywords

Comments

a(19) = 2255 is the least term that is not divisible by 3.

Crossrefs

Cf. A348158.
Similar sequences: A005114, A005277.

Programs

  • Mathematica
    f[n_] := Plus @@ DeleteDuplicates @ Map[EulerPhi, Divisors[n]]; m = 6000; Complement[Range[1, m, 2], Array[f, m^2]]

A348173 a(n) is the sum of the distinct values obtained when the unitary totient function is applied to the unitary divisors of n.

Original entry on oeis.org

1, 1, 3, 4, 5, 3, 7, 8, 9, 5, 11, 12, 13, 7, 15, 16, 17, 9, 19, 20, 21, 11, 23, 24, 25, 13, 27, 28, 29, 15, 31, 32, 33, 17, 35, 36, 37, 19, 39, 40, 41, 21, 43, 44, 45, 23, 47, 48, 49, 25, 51, 52, 53, 27, 55, 56, 57, 29, 59, 60, 61, 31, 63, 64, 65, 33, 67, 68, 69, 35, 71, 72, 73, 37, 75, 76, 77, 39, 79, 80, 81, 41, 83, 78
Offset: 1

Views

Author

Amiram Eldar, Oct 04 2021

Keywords

Comments

First differs from A283971 at n = 84.

Examples

			The unitary divisors of 18 are {1, 2, 9, 18} and their uphi values are {1, 1, 8, 8}. The set of distinct values is {1, 8} whose sum is 9. Therefore, a(18) = 9.
		

Crossrefs

The unitary version of A348158.

Programs

  • Mathematica
    f[p_, e_] := p^e - 1; uphi[1] = 1; uphi[n_] := Times @@ f @@@ FactorInteger[n]; a[n_] := Plus@@ DeleteDuplicates[uphi /@ Select[Divisors[n], CoprimeQ[#, n/#] &]]; Array[a, 100]

Formula

a(n) <= n, with equality if and only if n is in A348004.

A348214 a(n) is the least number k such that A348213(k) = n, or -1 if no such number exists.

Original entry on oeis.org

1, 2, 64, 50624, 235053, 15800785, 36903321, 4038974856
Offset: 0

Views

Author

Amiram Eldar, Oct 07 2021

Keywords

Examples

			n The n iterations of a(n) under the map x -> A348158(x)
- --------------------------------------------------------------------------------
0 1
1 2 -> 1
2 64 -> 63 -> 57
3 50624 -> 49833 -> 49155 -> 48819
4 235053 -> 231363 -> 223245 -> 222885 -> 210693
5 15800785 -> 15775305 -> 15763125 -> 15761925 -> 15208875 -> 14889335
6 36903321 -> 36323991 -> 35049465 -> 34992945 -> 33078801 -> 32940117 -> 29802963
7 4038974856 -> 2855346375 -> 2854284615 -> 2556863361 -> 2549117805 -> 2536180173 -> 2447191395 -> 2445883515
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ DeleteDuplicates @ Map[EulerPhi, Divisors[n]]; s[n_] := -2 + Length @ FixedPointList[f, n]; seq[m_, lim_] := Module[{t = Table[0, {m}], c = 0, n = 1}, While[c < m && n < lim, i = s[n] + 1; If[i <= m && t[[i]] == 0, c++; t[[i]] = n]; n++]; TakeWhile[t, # > 0 &]]; seq[5, 10^6]

A348216 Numbers k such that A348215(k) = k.

Original entry on oeis.org

120, 1320, 2760, 3480, 3720, 4920, 5160, 5640, 6360, 7080, 7320, 8040, 8520, 8760, 9480, 9960, 10680, 11640, 12120, 12360, 12840, 13080, 13560, 14520, 15240, 15720, 16440, 16680, 17880, 18120, 18840, 19560, 20040, 20760, 21480, 21720, 22920, 23160, 23640, 23880
Offset: 1

Views

Author

Amiram Eldar, Oct 07 2021

Keywords

Comments

Are there odd terms in this sequence? There are none below 10^8.

Examples

			120 is a term since the iterations of the map x -> A348158(x) starting from 120 are 120 -> 63 -> 57 and A348215(120) = 57 + 63 = 120.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ DeleteDuplicates @ Map[EulerPhi, Divisors[n]]; s[n_] := Plus @@ Most @ FixedPointList[f, n] - n; Select[Range[24000], s[#] == # &]

A363320 a(n) is the product of the frequencies of the distinct values obtained when the Euler totient function is applied to the divisors of n.

Original entry on oeis.org

1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 1, 6, 1, 4, 1, 2, 1, 8, 1, 4, 1, 4, 1, 12, 1, 4, 1, 4, 1, 16, 1, 2, 1, 4, 1, 12, 1, 4, 1, 6, 1, 16, 1, 4, 1, 4, 1, 24, 1, 8, 1, 4, 1, 16, 1, 4, 1, 4, 1, 54, 1, 4, 2, 2, 1, 16, 1, 4, 1, 16, 1, 24, 1, 4, 1, 4, 1, 16, 1, 12, 1, 4, 1, 36, 1, 4, 1, 4, 1, 64
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 27 2023

Keywords

Comments

The product of the multiplicities of distinct values of the n-th row of A102190.

Examples

			The divisors of 12 are {1, 2, 3, 4, 6, 12} and their phi values are {1, 1, 2, 2, 2, 4} whose sum is also 12. The set of distinct values are {1, 2, 4} which occur with multiplicities {2, 3, 1} respectively. Therefore, a(12) = 2*3*1 = 6.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Times @@ Tally[EulerPhi[Divisors[n]]][[;; , 2]]; Array[a, 100] (* Amiram Eldar, May 27 2023 *)
  • PARI
    a(n)=my(f=vector(n)); fordiv(n,d,f[eulerphi(d)]++); vecprod([t | t<-f, t>0]) \\ Andrew Howroyd, May 27 2023
Showing 1-8 of 8 results.