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-4 of 4 results.

A090556 Beginning with 1, a(n) = least number m > a(n-1) such that phi(a(n-1)) divides phi(m).

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 10, 12, 13, 21, 26, 28, 35, 39, 45, 52, 56, 65, 97, 119, 153, 193, 221, 291, 357, 386, 388, 416, 442, 448, 476, 485, 579, 595, 663, 765, 769, 965, 1105, 1455, 1538, 1544, 1552, 1649, 1799, 2307, 2313, 2895, 3076, 3088, 3104, 3281, 3341, 3845, 4947
Offset: 1

Views

Author

Amarnath Murthy, Dec 10 2003

Keywords

Crossrefs

Programs

  • Mathematica
    NestList[Function[n, SelectFirst[Range[n + 1, 10^4], Divisible[EulerPhi@ #, EulerPhi@ n] &]], 1, 54] (* Michael De Vlieger, May 01 2016, Version 10 *)

Formula

a(1)=1, then a(n+1) = A069797(a(n)). - Ivan Neretin, May 01 2016

Extensions

Corrected and extended by Sam Handler (sam_5_5_5_0(AT)yahoo.com), Nov 03 2004

A353691 a(n) is the least number k > n such that h(k)/h(n) is an integer, where h(n) is the harmonic mean of the divisors of n, or -1 if no such k exists.

Original entry on oeis.org

6, 120, 28, 234, 30, 270, 42, 29792, 252, 1120, 66, 234, 78, 840, 140, 200, 102, 2016, 114, 1170, 945, 1320, 138, 1080, 150, 1560, 756, 270, 174, 3360, 186, 1272960, 308, 2040, 210, 9720, 222, 2280, 364, 148960, 246, 1890, 258, 2574, 1260, 2760, 282, 600, 294
Offset: 1

Views

Author

Amiram Eldar, May 04 2022

Keywords

Comments

Does a(n) exist for all n? If m is a harmonic number (A001599) and gcd(n, m) = 1, then a(n) exists and a(n) <= m*n, since h(m*n) = h(m)*h(n) and h(m) is an integer.

Examples

			a(2) = 120 since 120 is the least number > 2 such that h(120)/h(2) = (16/3)/(4/3) = 4 is an integer.
		

Crossrefs

Similar sequences: A069789, A069797, A069805, A353692.

Programs

  • Mathematica
    h[n_] := DivisorSigma[0, n]/DivisorSigma[-1, n]; a[n_] := Module[{k = n + 1, hn = h[n]}, While[!IntegerQ[h[k]/hn], k++]; k]; Array[a, 30]
  • Python
    from math import prod, gcd
    from sympy import factorint
    def A353691_helper(n):
        f = factorint(n).items()
        return prod(p**e*(p-1)*(e+1) for p, e in f), prod(p**(e+1)-1 for p, e in f)
    def A353691(n):
        Hnp, Hnq = A353691_helper(n)
        g = gcd(Hnp, Hnq)
        Hnp //= g
        Hnq //= g
        k = n+1
        Hkp, Hkq = A353691_helper(k)
        while (Hkp*Hnq) % (Hkq*Hnp):
            k += 1
            Hkp, Hkq = A353691_helper(k)
        return k # Chai Wah Wu, May 07 2022

Formula

a(p) = 6*p for a prime p > 3.

A353692 a(n) is the least number k > n such that uh(k)/uh(n) is an integer, where uh(n) is the harmonic mean of the unitary divisors of n, or -1 if no such k exists.

Original entry on oeis.org

6, 20, 45, 72, 30, 60, 42, 272, 756, 120, 66, 18, 78, 140, 1890, 720, 102, 180, 114, 24, 315, 220, 138, 360, 150, 260, 3321, 504, 174, 7560, 186, 1440, 495, 340, 210, 52416, 222, 380, 585, 1360, 246, 420, 258, 792, 1512, 460, 282, 720, 294, 600, 765, 936, 318
Offset: 1

Views

Author

Amiram Eldar, May 04 2022

Keywords

Examples

			a(2) = 20 since 20 is the least number > 2 such that uh(20)/uh(2) = (8/3)/(4/3) = 2 is an integer.
		

Crossrefs

Similar sequences: A069789, A069797, A069805, A353691.

Programs

  • Mathematica
    uh[n_] := Module[{f = FactorInteger[n]}, n*2^Length[f]/Times @@ (1 + Power @@@ f)]; a[n_] := Module[{k = n + 1, uhn = uh[n]}, While[!IntegerQ[uh[k]/uhn], k++]; k]; Array[a, 30]

Formula

a(p) = 6*p for a prime p > 3.

A282016 Least k > 0 such that phi(n) divides phi(n+k).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 2, 2, 4, 2, 11, 1, 8, 4, 1, 1, 15, 1, 8, 4, 5, 3, 23, 6, 8, 2, 10, 7, 29, 2, 30, 2, 8, 6, 4, 1, 20, 16, 6, 8, 14, 3, 6, 6, 7, 21, 47, 3, 37, 5, 13, 4, 53, 3, 20, 9, 6, 29, 59, 4, 16, 15, 10, 4, 32, 9, 67, 12, 20, 2, 71, 1, 18, 2, 7, 15, 16, 6, 78, 5, 28, 6, 83, 6, 43, 12, 26, 12
Offset: 1

Views

Author

Altug Alkan, Feb 09 2017

Keywords

Comments

See A171935 for least positive k such that phi(n) = phi(n+k), or 0 if no such k exists.
See also logarithmic scatterplot of this sequence. - Altug Alkan, Feb 09 2017

Examples

			a(5) = 3 because phi(5) = 4 divides phi(5 + 3) = 4 and 3 is the least positive number with this property.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[ Mod[ EulerPhi[n + k], EulerPhi[ n]] > 0, k++]; k]; Array[f, 88] (* Robert G. Wilson v, Feb 09 2017 *)
  • PARI
    a(n) = my(k = 1); while (eulerphi(n+k) % eulerphi(n) != 0, k++); k;

Formula

a(n) << n^5 as a consequence of Xylouris' form of Linnik's theorem: phi(n) is at most n-1, and a(n) is at most the least prime which is 1 mod phi(n). - Charles R Greathouse IV, Feb 09 2017
a(n) = A069797(n) - n. - Altug Alkan, Feb 10 2017
Showing 1-4 of 4 results.