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-10 of 12 results. Next

A385744 The number of iterations of the infinitary analog of the totient function A384247 that are required to reach from n to 1.

Original entry on oeis.org

0, 1, 2, 3, 4, 2, 3, 4, 5, 4, 5, 3, 4, 3, 5, 6, 7, 5, 6, 4, 4, 5, 6, 5, 6, 4, 6, 6, 7, 5, 6, 7, 5, 7, 6, 6, 7, 6, 6, 7, 8, 4, 5, 6, 8, 6, 7, 6, 7, 6, 8, 7, 8, 6, 8, 6, 7, 7, 8, 6, 7, 6, 7, 7, 7, 5, 6, 7, 7, 6, 7, 8, 9, 7, 7, 7, 7, 6, 7, 7, 8, 8, 9, 7, 8, 5, 7
Offset: 1

Views

Author

Amiram Eldar, Jul 08 2025

Keywords

Comments

First differs from A049865 at n = 24.

Examples

			  n | a(n) | iterations
  --+------+----------------------
  2 |    1 | 2 -> 1
  3 |    2 | 3 -> 2 -> 1
  4 |    3 | 4 -> 3 -> 2 -> 1
  5 |    4 | 5 -> 4 -> 3 -> 2 -> 1
  6 |    2 | 6 -> 2 -> 1
		

Crossrefs

Similar sequences: A003434, A049865, A225320, A333609.

Programs

  • Mathematica
    f[p_, e_] := p^e*(1 - 1/p^(2^(IntegerExponent[e, 2]))); iphi[1] = 1; iphi[n_] := iphi[n] = Times @@ f @@@ FactorInteger[n];
    a[n_] := Length @ NestWhileList[iphi, n, # != 1 &] - 1; Array[a, 100]
  • PARI
    iphi(n) = {my(f = factor(n)); n * prod(i = 1, #f~, (1 - 1/f[i, 1]^(1 << valuation(f[i, 2], 2))));}
    a(n) = if(n ==  1, 0, 1 + a(iphi(n)));

Formula

a(n) = a(A384247(n)) + 1 for n >= 2.

A385745 The sum of the iterated infinitary analog of the totient function A384247 when started at n.

Original entry on oeis.org

0, 1, 3, 6, 10, 3, 9, 10, 18, 10, 20, 9, 21, 9, 18, 33, 49, 18, 36, 21, 21, 20, 42, 18, 42, 21, 36, 36, 64, 18, 48, 49, 41, 49, 42, 42, 78, 36, 42, 49, 89, 21, 63, 48, 81, 42, 88, 48, 96, 42, 81, 78, 130, 36, 89, 42, 78, 64, 122, 42, 102, 48, 96, 96, 96, 41, 107
Offset: 1

Views

Author

Amiram Eldar, Jul 08 2025

Keywords

Examples

			  n | iterations            | a(n)
  --+-----------------------+--------------------
  2 | 2 -> 1                | 1
  3 | 3 -> 2 -> 1           | 2 + 1 = 3
  4 | 4 -> 3 -> 2 -> 1      | 3 + 2 + 1 = 6
  5 | 5 -> 4 -> 3 -> 2 -> 1 | 4 + 3 + 2 + 1 = 10
  6 | 6 -> 2 -> 1           | 2 + 1 = 3
		

Crossrefs

Similar sequences: A092693, A329153, A333611.

Programs

  • Mathematica
    f[p_, e_] := p^e*(1 - 1/p^(2^(IntegerExponent[e, 2]))); iphi[1] = 1; iphi[n_] := iphi[n] = Times @@ f @@@ FactorInteger[n];
    a[n_] := Plus @@ NestWhileList[iphi, n, # != 1 &] - n; Array[a, 100]
  • PARI
    iphi(n) = {my(f = factor(n)); n * prod(i = 1, #f~, (1 - 1/f[i, 1]^(1 << valuation(f[i, 2], 2)))); }
    a(n) = if(n ==  1, 0, my(i = iphi(n)); i + a(i));

A385746 Numbers that are equal to the sum of their iterated infinitary analog of the totient function A384247.

Original entry on oeis.org

3, 10, 18, 21, 48, 160, 288, 3252, 9304, 13965, 68526, 719631, 1531101, 1954782, 28900572, 39189195, 14708055957
Offset: 1

Views

Author

Amiram Eldar, Jul 08 2025

Keywords

Comments

Numbers k such that A385745(k) = k.

Examples

			  n | a(n) | iterations                        | sum
  --+------+-----------------------------------+----------------------------
  1 |    3 | 3 -> 2 -> 1                       | 2 + 1 = 3
  2 |   10 | 10 -> 4 -> 3 -> 2 -> 1            | 4 + 3 + 2 + 1 = 10
  3 |   18 | 18 -> 8 -> 4 -> 3 -> 2 -> 1       | 8 + 4 + 3 + 2 + 1 = 18
  4 |   21 | 21 -> 12 -> 6 -> 2 -> 1           | 12 + 6 + 2 + 1 = 21
  5 |   48 | 48 -> 30 -> 8 -> 4 -> 3 -> 2 -> 1 | 30 + 8 + 4 + 3 + 2 + 1 = 48
		

Crossrefs

Similar sequences: A082897, A286067, A330273.

Programs

  • Mathematica
    f[p_, e_] := p^e*(1 - 1/p^(2^(IntegerExponent[e, 2]))); iphi[1] = 1; iphi[n_] := iphi[n] = Times @@ f @@@ FactorInteger[n];
    infPerfTotQ[n_] := Plus @@ FixedPointList[iphi, n] == 2*n + 1; infPerfTotQ[1] = False; Select[Range[10^5], infPerfTotQ]
  • PARI
    iphi(n) = {my(f = factor(n)); n * prod(i = 1, #f~, (1 - 1/f[i, 1]^(1 << valuation(f[i, 2], 2)))); }
    s(n) = if(n == 1, 0, my(i = iphi(n)); i + s(i));
    isok(k) = s(k) == k;

A385747 Least number that reaches 1 after exactly n iterations of the infinitary analog of the totient function A384247.

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 16, 17, 41, 73, 101, 197, 467, 829, 1109, 2761, 4849, 7831, 12401, 26189, 52379, 85853, 139589, 237007, 395533, 947043, 1967027, 3446033, 5396427, 9510437, 17502533, 35005067, 71202449, 90187609, 164664701, 395199461, 705113873, 1265735729, 1803553457
Offset: 0

Views

Author

Amiram Eldar, Jul 08 2025

Keywords

Comments

a(n) is the least number k such that A385744(k) = n.
Also, indices of records of A385744.

Examples

			  n | a(n) | iterations
  --+------+---------------------------
  1 |    2 | 2 -> 1
  2 |    3 | 3 -> 2 -> 1
  3 |    4 | 4 -> 3 -> 2 -> 1
  4 |    5 | 5 -> 4 -> 3 -> 2 -> 1
  5 |    9 | 9 -> 8 -> 4 -> 3 -> 2 -> 1
		

Crossrefs

Similar sequences: A003271, A005424, A007755, A333610.

Programs

  • Mathematica
    f[p_, e_] := p^e*(1 - 1/p^(2^(IntegerExponent[e, 2]))); iphi[1] = 1; iphi[n_] := iphi[n] = Times @@ f @@@ FactorInteger[n];
    numiter[n_] := Length @ NestWhileList[iphi, n, # != 1 &] - 1;
    seq[len_] := Module[{s = {}, k = 0, i = 0}, While[Length[s] < len, k++; If[numiter[k] == i, AppendTo[s, k]; i++]]; s]; seq[25]
  • PARI
    iphi(n) = {my(f = factor(n)); n * prod(i = 1, #f~, (1 - 1/f[i, 1]^(1 << valuation(f[i, 2], 2))));}
    numiter(n) = if(n ==  1, 0, 1 + numiter(iphi(n)));
    list(len) = {my(k = 0, i = 0, c = 0); while(c < len, k++; if(numiter(k) == i, c++; print1(k, ", "); i++));}

A385743 Numbers k such that A384247(k) = A384247(k+1).

Original entry on oeis.org

1, 20, 27, 35, 63, 64, 104, 143, 194, 208, 740, 836, 1220, 1299, 1419, 1803, 1892, 2625, 3255, 3705, 3716, 3843, 4096, 5184, 5186, 5635, 5695, 7868, 10659, 13365, 16904, 17948, 18507, 18914, 21007, 22935, 25388, 25545, 27675, 30380, 31599, 32304, 32864, 34595
Offset: 1

Views

Author

Amiram Eldar, Jul 08 2025

Keywords

Comments

63 is the only number k below 10^11 such that A384247(k) = A384247(k+1) = A384247(k+2). Are there any other such terms?

Examples

			1 is a term since A384247(1) = A384247(2) = 1.
20 is a term since A384247(20) = A384247(21) = 12.
		

Crossrefs

Cf. A384247.
Similar sequences: A001274, A287055, A293184, A301866, A326403, A349307.

Programs

  • Mathematica
    f[p_, e_] := p^e*(1 - 1/p^(2^(IntegerExponent[e, 2]))); iphi[1] = 1; iphi[n_] := iphi[n] = Times @@ f @@@ FactorInteger[n]; Select[Range[35000], iphi[#] == iphi[# + 1] &]
  • PARI
    iphi(n) = {my(f = factor(n)); n * prod(i = 1, #f~, (1 - 1/f[i, 1]^(1 << valuation(f[i, 2], 2)))); }
    list(lim) = {my(s1 = iphi(1), s2); for(k = 2, lim, s2 = iphi(k); if(s1 == s2, print1(k-1, ", ")); s1 = s2);}

A385748 Numbers k such that A384247(k) divides k.

Original entry on oeis.org

1, 2, 6, 8, 12, 24, 32, 54, 96, 108, 128, 192, 216, 240, 384, 486, 512, 864, 972, 1536, 1728, 1944, 2048, 2160, 3072, 3456, 4374, 6000, 6144, 7776, 8192, 8748, 13824, 15552, 17496, 19440, 24576, 27648, 31104, 32768, 39366, 49152, 54000, 55296, 61440, 65280, 69984
Offset: 1

Views

Author

Amiram Eldar, Jul 08 2025

Keywords

Comments

(2^(2^k)-1) * 2^(2^k) is a term for k = 0..5.
Apparently, the only prime factors of any term are 2 and the Fermat primes (A019434), i.e., A092506.
Apparently, except for n = 1, a(n) / A384247(a(n)) is either 2 or 3.

Examples

			  n | a(n) | a(n) / A384247(a(n))
  --+------+---------------------
  1 |    1 | 1 / 1 = 1
  2 |    2 | 2 / 1 = 2
  3 |    6 | 6 / 2 = 3
  4 |    8 | 8 / 4 = 2
  5 |   12 | 12 / 6 = 2
		

Crossrefs

Similar sequences: A007694, A298759, A319481, A335327, A373057.

Programs

  • Mathematica
    f[p_, e_] := p^e*(1 - 1/p^(2^(IntegerExponent[e, 2]))); iphi[1] = 1; iphi[n_] := iphi[n] = Times @@ f @@@ FactorInteger[n]; q[n_] := Divisible[n, iphi[n]]; Select[Range[70000], q]
  • PARI
    iphi(n) = {my(f = factor(n)); n * prod(i = 1, #f~, (1 - 1/f[i, 1]^(1 << valuation(f[i, 2], 2))));}
    isok(k) = !( k % iphi(k));

A384246 Triangle in which the n-th row gives the numbers from 1 to n whose largest divisor that is an infinitary divisor of n is 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 5, 1, 2, 3, 4, 5, 6, 1, 3, 5, 7, 1, 2, 3, 4, 5, 6, 7, 8, 1, 3, 7, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 5, 7, 10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 3, 5, 9, 11, 13, 1, 2, 4, 7, 8, 11, 13, 14, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
Offset: 1

Views

Author

Amiram Eldar, May 23 2025

Keywords

Examples

			Triangle begins:
  1
  1
  1, 2
  1, 2, 3
  1, 2, 3, 4
  1, 5
  1, 2, 3, 4, 5, 6
  1, 3, 5, 7
  1, 2, 3, 4, 5, 6, 7, 8
  1, 3, 7, 9
  1, 2, 3, 4, 5, 6, 7, 8, 9, 10
  1, 2, 5, 7, 10, 11
  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
  1, 3, 5, 9, 11, 13
  1, 2, 4, 7, 8, 11, 13, 14
		

Crossrefs

Cf. A064379, A384046, A384245, A384247 (row lengths), A384248 (row sums).

Programs

  • Mathematica
    infdivs[n_] := If[n == 1, {1}, Sort@ Flatten@ Outer[Times, Sequence @@ (FactorInteger[n] /. {p_, m_Integer} :> p^Select[Range[0, m], BitOr[m, #] == m &])]]; (* Michael De Vlieger at A077609 *)
    infGCD[n_, k_] := Max[Intersection[infdivs[n], Divisors[k]]];
    row[n_] := Select[Range[n], infGCD[n, #] == 1 &]; Array[row, 16] // Flatten
  • PARI
    isidiv(d, f) = {if (d==1, return (1)); for (k=1, #f~, bne = binary(f[k, 2]); bde = binary(valuation(d, f[k, 1])); if (#bde < #bne, bde = concat(vector(#bne-#bde), bde)); for (j=1, #bne, if (! bne[j] && bde[j], return (0)); ); ); return (1); }
    infdivs(n) = {my(f = factor(n), d = divisors(f), idiv = []); for (k=1, #d, if (isidiv(d[k], f), idiv = concat(idiv, d[k])); ); idiv; } \\ Michel Marcus at A077609
    infgcd(n, k) = vecmax(setintersect(infdivs(n), divisors(k)));
    row(n) = select(x -> infgcd(n, x) == 1, vector(n, i, i));

A384249 The number of integers k from 1 to n such that the greatest divisor of k that is an infinitary divisor of n is squarefree.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 7, 6, 8, 10, 11, 9, 13, 14, 15, 15, 17, 16, 19, 15, 21, 22, 23, 18, 24, 26, 24, 21, 29, 30, 31, 30, 33, 34, 35, 24, 37, 38, 39, 30, 41, 42, 43, 33, 40, 46, 47, 45, 48, 48, 51, 39, 53, 48, 55, 42, 57, 58, 59, 45, 61, 62, 56, 48, 65, 66, 67, 51
Offset: 1

Views

Author

Amiram Eldar, May 23 2025

Keywords

Crossrefs

Analogous sequences: A063659, A384048.
The number of integers k from 1 to n such that the greatest divisor of k that is an infinitary divisor of n is: A384247(1), this sequence (squarefree), A384250 (powerful), A384251 (odd), A384252 (power of 2).

Programs

  • Mathematica
    f[p_, e_] := p^e*(1 - 1/p^(2^IntegerExponent[e - Mod[e, 2], 2])); f[p_, 1] := p; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); n * prod(i = 1, #f~, if(f[i,2] == 1, 1, 1 - 1/f[i,1]^(1 << valuation(f[i,2] - f[i,2]%2, 2))));}

Formula

Multiplicative with a(p) = p, and a(p^e) = p^e * (1 - 1/p^A065176(e)) for e >= 2.
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Product_{p prime} f(1/p) = 0.93444998595445071889..., and f(x) = 1 - (1-x^2) * Sum_{k>=2} x^(2^k)/(1-x^(2^k));

A384250 The number of integers k from 1 to n such that the greatest divisor of k that is an infinitary divisor of n is a powerful number.

Original entry on oeis.org

1, 1, 2, 4, 4, 2, 6, 6, 9, 4, 10, 8, 12, 6, 8, 16, 16, 9, 18, 16, 12, 10, 22, 12, 25, 12, 21, 24, 28, 8, 30, 18, 20, 16, 24, 36, 36, 18, 24, 24, 40, 12, 42, 40, 36, 22, 46, 32, 49, 25, 32, 48, 52, 21, 40, 36, 36, 28, 58, 32, 60, 30, 54, 64, 48, 20, 66, 64, 44
Offset: 1

Views

Author

Amiram Eldar, May 23 2025

Keywords

Crossrefs

Analogous sequences: A384039, A384050.
The number of integers k from 1 to n such that the greatest divisor of k that is an infinitary divisor of n is: A384247(1), A384249 (squarefree), this sequence (powerful), A384251 (odd), A384252 (power of 2).

Programs

  • Mathematica
    f[p_, e_] := If[EvenQ[e], p^e, p^e*(1 - 1/p + 1/p^(2^IntegerExponent[e-1, 2]))]; f[p_, 1] := p-1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,2] == 1, f[i,1]-1, f[i,1]^f[i,2] * if(!(f[i,2]%2), 1, 1 - 1/f[i,1] + 1/f[i,1]^(1 << valuation(f[i,2]-1, 2)))));}

Formula

Multiplicative with a(p^e) = p^e if e is even, a(p) = p-1, and a(p^e) = p^e * (1 - 1/p + 1/p^A006519(e-1)) if e is odd >= 3.
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Product_{p prime} f(1/p) = 0.7218055778498707651047..., and f(x) = (1 + x - x^2)/(1 + x) + (1 - x) * Sum_{k>=2} x^(2^k + 1) / (1 - x^(2^k));

A384251 The number of integers k from 1 to n such that the greatest divisor of k that is an infinitary divisor of n is odd.

Original entry on oeis.org

1, 1, 3, 3, 5, 3, 7, 4, 9, 5, 11, 9, 13, 7, 15, 15, 17, 9, 19, 15, 21, 11, 23, 12, 25, 13, 27, 21, 29, 15, 31, 16, 33, 17, 35, 27, 37, 19, 39, 20, 41, 21, 43, 33, 45, 23, 47, 45, 49, 25, 51, 39, 53, 27, 55, 28, 57, 29, 59, 45, 61, 31, 63, 48, 65, 33, 67, 51, 69
Offset: 1

Views

Author

Amiram Eldar, May 23 2025

Keywords

Crossrefs

Analogous sequences: A026741, A384055.
The number of integers k from 1 to n such that the greatest divisor of k that is an infinitary divisor of n is: A384247(1), A384249 (squarefree), A384250 (powerful), this sequence (odd), A384252 (power of 2).

Programs

  • Mathematica
    a[n_] := n * If[OddQ[n], 1, 1 - 1/2^(2^(IntegerExponent[IntegerExponent[n, 2], 2]))]; Array[a, 100]
  • PARI
    a(n) = n * if(n%2, 1, (1 - 1/(1 << (1 << valuation(valuation(n, 2), 2)))));

Formula

Multiplicative with a(2^e) = 2^e * (1 - 1/2^A006519(e)), and a(p^e) = p^e if p is an odd prime.
a(n) = A384247(n)/A384252(n).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = (3 - A048649)/2 = 0.79803158605891083971... .
Showing 1-10 of 12 results. Next