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

A349685 Irregular triangle read by rows: the n-th row contains the elements in the continued fraction of the abundancy index of n.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 1, 3, 1, 5, 2, 1, 7, 1, 1, 7, 1, 2, 4, 1, 1, 4, 1, 11, 2, 3, 1, 13, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 15, 1, 17, 2, 6, 1, 19, 2, 10, 1, 1, 1, 10, 1, 1, 1, 1, 3, 1, 23, 2, 2, 1, 4, 6, 1, 1, 1, 1, 1, 2, 1, 2, 13, 2, 1, 29, 2, 2, 2, 1, 31, 1, 1, 31
Offset: 1

Views

Author

Amiram Eldar, Nov 25 2021

Keywords

Comments

The abundancy index of n is sigma(n)/n = A000203(n)/n = A017665(n)/A017666(n).
For a prime p, the p-th row has a length 2 with a(p, 1) = 1 and a(p, 2) = p.
For multiply-perfect numbers m (A007691), the m-th row has a length 1, since their abundancy index is an integer. In particular, for a perfect number m (A000396), the m-th row has a length 1 with a(m, 1) = 2.

Examples

			The first ten rows of the triangle are:
1,
1, 2,
1, 3,
1, 1, 3,
1, 5,
2,
1, 7,
1, 1, 7,
1, 2, 4,
1, 1, 4,
...
		

Crossrefs

Programs

  • Mathematica
    row[n_] := ContinuedFraction[DivisorSigma[1, n]/n]; Table[row[k], {k, 1, 32}] // Flatten
  • PARI
    row(n) = contfrac(sigma(n)/n); \\ Michel Marcus, Nov 25 2021

A349474 a(n) is the length of the continued fraction of the harmonic mean of the divisors of n.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Nov 19 2021

Keywords

Comments

a(n) = 1 if and only if n is a harmonic number (A001599).
a(n) <= 2 if and only if n is in A348865.

Examples

			a(1) = 1 since the harmonic mean of the divisors of 1 is 1 and its continued fraction has 1 element, {1}.
a(2) = 2 since the harmonic mean of the divisors of 2 is 4/3 = 1 + 1/3 and its continued fraction has 2 elements, {1, 3}.
a(4) = 4 since the harmonic mean of the divisors of 4 is 12/7 = 1 + 1/(1 + 1/(2 + 1/2)) and its continued fraction has 4 elements, {1, 1, 2, 2}.
		

Crossrefs

Row length of A349473.

Programs

  • Mathematica
    a[n_] := Length @ ContinuedFraction[DivisorSigma[0, n] / DivisorSigma[-1, n]]; Array[a, 100]

A071865 Smallest k such that the simple continued fraction for Sum(d|k, 1/d) contains exactly n elements.

Original entry on oeis.org

1, 2, 4, 14, 22, 26, 75, 195, 330, 324, 935, 1598, 3422, 3663, 10191, 14066, 12099, 53661, 121555, 182169, 235509, 307615, 633945, 2097595, 2072198, 2643298, 6544282, 8675343, 13670722, 17573794, 85112326, 77295778, 235873898, 362150458, 544042486, 1457255474
Offset: 1

Views

Author

Benoit Cloitre, Jun 09 2002

Keywords

Examples

			sum(d|195, 1/d) = 112/65 and 112/65 continued fraction is [1, 1, 2, 1, 1, 1, 1, 3] which contains 8 elements. There is no smaller number than 195 with this property hence a(8)=195.
		

Crossrefs

Cf. A071862.

Programs

  • Mathematica
    a = Table[0, {50}]; Do[b = Length[ ContinuedFraction[ Apply[ Plus, 1/Divisors[n]]]]; If[ a[[b]] == 0, a[[b]] = n], {n, 1, 10^7}]
  • PARI
    for(n=1,21,s=1; while(length(contfrac(sumdiv(s,d,1/d)))
    				

Extensions

More terms from Robert G. Wilson v, Jun 11 2002
a(29)-a(36) from Michel Marcus, Sep 17 2012

A342866 The number of elements in the continued fraction for phi(n)/n, where phi is the Euler totient function (A000010).

Original entry on oeis.org

1, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 2, 3, 3, 4, 2, 3, 2, 3, 3, 4, 3, 3, 2, 3, 3, 3, 3, 3, 4, 3, 2, 6, 3, 5, 2, 3, 3, 6, 3, 3, 3, 3, 3, 4, 3, 3, 2, 3, 3, 6, 3, 3, 2, 5, 3, 6, 3, 3, 4, 3, 3, 4, 2, 7, 4, 3, 3, 6, 4, 3, 2, 3, 3, 4, 3, 6, 3, 3, 3, 3, 3, 3, 3, 4, 3, 6
Offset: 1

Views

Author

Amiram Eldar, Mar 27 2021

Keywords

Examples

			a(2) = 2 since the continued fraction of phi(2)/2 = 1/2 = 0 + 1/2 has 2 elements: {0, 2}.
a(3) = 3 since the continued fraction of phi(3)/3 = 2/3 = 0 + 1/(1 + 1/2) has 3 elements: {0, 1, 2}.
a(15) = 4 since the continued fraction of phi(15)/15 = 8/15 = 0 + 1/(1 + 1/(1 + 1/7)) has 4 elements: {0, 1, 1, 7}.
		

Crossrefs

Cf. A071862 (similar, with sigma(n)/n).

Programs

  • Mathematica
    a[n_] := Length @ ContinuedFraction[EulerPhi[n]/n]; Array[a, 100]
  • PARI
    a(n) = #contfrac(eulerphi(n)/n); \\ Michel Marcus, Mar 30 2021

Formula

a(n) = 2 if and only if n is in A007694.
a(p) = 3 for an odd prime p.

A071864 Nonprime n such that the number of elements in the continued fraction for Sum_{d|n} 1/d equals tau(n), the number of divisors of n.

Original entry on oeis.org

1, 4, 9, 14, 15, 21, 25, 49, 51, 55, 57, 63, 95, 98, 99, 115, 116, 121, 147, 161, 169, 172, 175, 188, 195, 203, 236, 244, 245, 247, 265, 284, 287, 289, 297, 299, 322, 328, 329, 351, 356, 361, 363, 370, 371, 374, 387, 406, 412, 413, 418, 423, 425, 437, 465, 488
Offset: 1

Views

Author

Benoit Cloitre, Jun 09 2002

Keywords

Comments

If p is prime p^2 is in the sequence since the continued fraction for Sum_{d|n} 1/d is [1, p-1, p+1] and there are 3 divisors for p^2.

Crossrefs

Programs

  • Mathematica
    aQ[n_] := ! PrimeQ[n] && Length@ContinuedFraction[DivisorSigma[1, n]/n] ==  DivisorSigma[0, n]; Select[Range[488], aQ] (* Amiram Eldar, Aug 30 2019 *)
  • PARI
    for(n=1,1000,if(length(contfrac(sumdiv(n,d,1/d)))==numdiv(n)*(1-isprime(n)),print1(n,",")))

A215012 Composite numbers n such that sigma(n)/n leaves a remainder which divides n.

Original entry on oeis.org

12, 18, 20, 24, 40, 56, 88, 104, 180, 196, 224, 234, 240, 360, 368, 420, 464, 540, 600, 650, 780, 992, 1080, 1344, 1504, 1872, 1888, 1890, 1952, 2016, 2184, 2352, 2376, 2688, 3192, 3276, 3724, 3744, 4284, 4320, 4680
Offset: 1

Views

Author

J. M. Bergot, Jul 31 2012

Keywords

Comments

The numbers and the program were provided by Charles R Greathouse IV.
If n belongs to the sequence, then sigma(n) = d*n + rem, so sigma(n)/n = d + rem/n. Since rem is a divisor of n, n = rem*r, thus rem/n = 1/r. Then sigma(n)/n = d + 1/r and contfrac(sigma(n)/n) = [d, r], and length(contfrac(sigma(n)/n)) = 2. That is, A071862(n) = 2. - Michel Marcus, Aug 29 2012

Examples

			24 has the divisors 1,2,3,4,6,12,24, which sum to be 60. Divide 60 by 24 and the remainder is 12, which is a divisor of 24.
		

Crossrefs

Programs

  • Mathematica
    a={}; For[n=1, n<=5000, n++, If[!PrimeQ[n], {s=DivisorSigma[1, n]; If[Mod[n, Mod[s,n]] == 0, AppendTo[a,n]]; }]; ]; a  (* John W. Layman, Jul 31 2012 *)
    Select[Range[5000],CompositeQ[#]&&Mod[#,Mod[DivisorSigma[1,#],#]]==0&] // Quiet (* Harvey P. Dale, May 24 2019 *)
  • PARI
    is(n)=my(t=sigma(n)%n);t && n%t==0 && !isprime(n)

Extensions

Terms a(24)-a(41) from John W. Layman, Jul 31 2012

A349686 Numbers k such that the continued fraction of the abundancy index of k contains a single distinct element.

Original entry on oeis.org

1, 6, 24, 28, 30, 120, 140, 348, 496, 672, 1080, 2480, 6048, 6200, 6552, 6786, 8128, 30240, 32760, 40640, 143880, 238080, 435708, 514080, 523776, 524160, 556920, 805728, 1997868, 2178540, 4713984, 23569920, 33550336, 37035180, 38958426, 45532800, 91963648, 142990848
Offset: 1

Views

Author

Amiram Eldar, Nov 25 2021

Keywords

Comments

All the multiply-perfect numbers (A007691) are terms of this sequence, since the continued fraction of their abundancy index contains a single element.
Up to 4*10^10 the continued fractions of the abundancy indices of the terms have lengths 1, 2, 3, 5 or 11. The least terms that are corresponding to these lengths are 1, 24, 30, 348 and 1997868, respectively. Are there terms with other lengths?

Examples

			24 is a term since the continued fraction of its abundancy index sigma(24)/24 = 5/2 = 2 + 1/2 has the elements {2, 2}.
30 is a term since the continued fraction of its abundancy index sigma(30)/30 = 12/5 = 2 + 1/(2 + 1/2) has the elements {2, 2, 2}.
143880 is a term since the continued fraction of its abundancy index sigma(143880)/143880 = 360/109 = 3 + 1/(3 + 1/(3 + 1/(3 + 1/3))) has the elements {3, 3, 3}.
		

Crossrefs

Programs

  • Mathematica
    c[n_] := ContinuedFraction[DivisorSigma[1, n] / n]; q[n_] := Length[Union[c[n]]] == 1; Select[Range[10^6], q]
  • PARI
    isok(k) = #Set(contfrac(sigma(k)/k)) == 1; \\ Michel Marcus, Nov 25 2021
Showing 1-7 of 7 results.