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

A236355 Terms of A050973 that give maximum record values for A050973(k)/A050972(k).

Original entry on oeis.org

28, 224, 234, 496, 6200, 8128, 174592, 544635, 2886100, 33550336
Offset: 1

Views

Author

Michel Marcus, Jan 23 2014

Keywords

Comments

The corresponding terms in A050972 are: 6, 40, 12, 6, 30, 6, 40, 6, ...
Note the subsequence 28, 496, 8128, 33550336: friends of 6 (cf A000396).

Examples

			28/6 < 224/40 < 234/12 < 496/6 < 6200/30 < 8128/6 < 174592/40 < ....
		

Crossrefs

Programs

  • PARI
    isrmax(i, rmax) = {si = sigma(i); if (gcd(si, i) == 1, return (0)); s = si/i; for (j=1, i\rmax, if ((sigma(j)/j) == s, if ((newr = i/j) > rmax, return (newr)););); return (0);}
    lista(nn) = {rmax = 1; for (i = 1, nn, if ((newr = isrmax(i, rmax)), rmax = newr; print1(i, ", ");););}

A236372 Terms of A050973 that give minimum record values for A050973(k)/A050972(k).

Original entry on oeis.org

28, 200, 936, 7856640, 12103000, 8004519424
Offset: 1

Views

Author

Michel Marcus, Jan 24 2014

Keywords

Comments

The corresponding terms in A050972 are: 6, 80, 864, 7344000, 11804800, 7908221230.
Note that from n=1 to 4 sigma(a(n))/a(n) is increasing, but decreasing for n=5 and 6. Is this going on afterwards? - Michel Marcus, Feb 08 2014

Examples

			28/6 > 200/80 > 936/864 > 7856640/7344000 > 12103000/11804800 > ...
		

Crossrefs

Programs

  • PARI
    isrmin(i, rmin) = {si = sigma(i); if (gcd(si, i) == 1, return (0)); s = si/i; forstep (j=i-1, 1+i\rmin, -1, if ((sigma(j)/j) == s, if ((newr = i/j) < rmin, return (newr)););); return (0);}
    lista(nn) = {rmin = 1000; for (i=1, nn, if ((newr = isrmin(i, rmin)), rmin = newr; print1(i, ", ");););}

Extensions

a(6) from Michel Marcus, Feb 08 2014

A263118 Indices of the primitive friendly pairs in the sequence of friendly pairs (A050973, A050972) ordered by smallest maximal element.

Original entry on oeis.org

1, 3, 4, 5, 6, 10, 11, 18, 20, 29, 33, 70, 115, 116, 133, 136, 155, 156, 157, 212, 255, 360, 414, 468, 470, 477, 518, 519, 578, 771, 787, 830, 971, 1039, 1046, 1121, 1687, 1793, 2983, 3092, 3359, 3360, 3570, 4084, 4190, 4255, 5281, 7032, 7141, 7167, 8248, 8385, 8386, 8630, 8890
Offset: 1

Views

Author

Michel Marcus, Oct 10 2015

Keywords

Comments

Friends x and y are primitive friendly if and only if they have no common prime factor with the same multiplicity, that is, if A165430(x, y) = 1.

Examples

			The first pair (6, 28) is primitive since 6=2*3 and 28=2^2*7; their only common prime factor, 2, appears with different exponents, so 1 is a term.
The second pair (30, 140) is not primitive since 30=5*6 and 140=5*28; the prime factor 5 appears in each with the same exponent, so 2 is not a term.
		

Crossrefs

Programs

  • PARI
    udivs(n) = {my(d = divisors(n)); select(x->(gcd(x, n/x)==1), d);}
    ugcd(x,y) = vecmax(setintersect(udivs(x), udivs(y)));
    lista(vp, vg) = {for (n=1, #vp, if (ugcd(vp[n], vg[n])==1, print1(n, ", ")););} \\ where vp and vg are A050972 and A050973

Formula

A233039(n) = A050973(a(n)).

A263152 a(n) is the greatest common unitary divisor of the friendly pairs, A050972(n) and A050973(n).

Original entry on oeis.org

1, 5, 1, 1, 1, 1, 11, 13, 17, 1, 1, 19, 3, 23, 3, 25, 29, 1, 31, 1, 37, 41, 5, 43, 47, 7, 53, 3, 1, 55, 7, 2, 1, 59, 61, 9, 65, 67, 71, 9, 73, 11, 79, 83, 85, 11, 5, 5, 89, 11, 13, 95, 97, 101, 103, 13, 11, 107, 109, 113, 115, 4, 121, 17, 7, 125, 13, 127, 131
Offset: 1

Views

Author

Michel Marcus, Oct 11 2015

Keywords

Comments

Dividing both A050972(n) and A050973(n) by a "greater than 1" divisor of a(n), if any, will give a smaller friendly pair.
If a(n) is greater than 1, dividing both A050972(n) and A050973(n) will give a primitive friendly pair.

Examples

			The greatest common unitary divisor of the first friendly pair (6, 28) is 1, hence a(1) = 1.
		

Crossrefs

Cf. A165430 (greatest common unitary divisor).

Programs

  • PARI
    udivs(n) = {my(d = divisors(n)); select(x->(gcd(x, n/x)==1), d);}
    ugcd(x,y) = vecmax(setintersect(udivs(x), udivs(y)));
    lista(vp, vg) = {for (n=1, #vp, print1(ugcd(vp[n], vg[n])", ")); } \\ where vp and vg are A050972 and A050973

Formula

a(n) = A165430(A050972(n), A050973(n)).
a(A263118(n)) = 1, the primitive friendly pairs.

A017666 Denominator of sum of reciprocals of divisors of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 1, 7, 8, 9, 5, 11, 3, 13, 7, 5, 16, 17, 6, 19, 10, 21, 11, 23, 2, 25, 13, 27, 1, 29, 5, 31, 32, 11, 17, 35, 36, 37, 19, 39, 4, 41, 7, 43, 11, 15, 23, 47, 12, 49, 50, 17, 26, 53, 9, 55, 7, 57, 29, 59, 5, 61, 31, 63, 64, 65, 11, 67, 34, 23, 35, 71, 24, 73, 37, 75, 19
Offset: 1

Views

Author

Keywords

Comments

Sum_{ d divides n } 1/d^k is equal to sigma_k(n)/n^k. So sequences A017665-A017712 also give the numerators and denominators of sigma_k(n)/n^k for k = 1..24. The power sums sigma_k(n) are in sequences A000203 (k=1), A001157-A001160 (k=2,3,4,5), A013954-A013972 for k = 6,7,...,24. - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 05 2001
Denominators of coefficients in expansion of Sum_{n >= 1} x^n/(n*(1-x^n)) = Sum_{n >= 1} log(1/(1-x^n)).
Also n/gcd(n, sigma(n)) = n/A009194(n); also n/lcm(all common divisors of n and sigma(n)). Equals 1 if 6,28,120,496,672,8128,..., i.e., if n is from A007691. - Labos Elemer, Aug 14 2002
a(A007691(n)) = 1. - Reinhard Zumkeller, Apr 06 2012
Denominator of sigma(n)/n = A000203(n)/n. a(n) = 1 for numbers n in A007691 (multiply-perfect numbers), a(n) = 2 for numbers n in A159907 (numbers n with half-integral abundancy index), a(n) = 3 for numbers n in A245775, a(n) = n for numbers n in A014567 (numbers n such that n and sigma(n) are relatively prime). See A162657 (n) - the smallest number k such that a(k) = n. - Jaroslav Krizek, Sep 23 2014
For all n, a(n) <= n, and thus records are obtained for terms of A014567. - Michel Marcus, Sep 25 2014
Conjecture: If a(n) is in A005153, then n is in A005153. In particular, if n has dyadic rational abundancy index, i.e., a(n) is in A000079 (such as A007691 and A159907), then n is in A005153. Since every term of A005153 greater than 1 is even, any odd n such that a(n) in A005153 must be in A007691. It is natural to ask if there exists a generalization of the indicator function for A005153, call it m(n), such that m(n) = 1 for n in A005153, 0 < m(n) < 1 otherwise, and m(a(n)) <= m(n) for all n. See also A050972. - Jaycob Coleman, Sep 27 2014

Examples

			1, 3/2, 4/3, 7/4, 6/5, 2, 8/7, 15/8, 13/9, 9/5, 12/11, 7/3, 14/13, 12/7, 8/5, 31/16, ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 162, #16, (6), 4th formula.

Crossrefs

Programs

  • Haskell
    import Data.Ratio ((%), denominator)
    a017666 = denominator . sum . map (1 %) . a027750_row
    -- Reinhard Zumkeller, Apr 06 2012
    
  • Magma
    [Denominator(DivisorSigma(1,n)/n): n in [1..50]]; // G. C. Greubel, Nov 08 2018
    
  • Maple
    with(numtheory): seq(denom(sigma(n)/n), n=1..76) ; # Zerinvary Lajos, Jun 04 2008
  • Mathematica
    Table[Denominator[DivisorSigma[-1, n]], {n, 100}] (* Vladimir Joseph Stephan Orlovsky, Jul 21 2011 *)
    Table[Denominator[DivisorSigma[1, n]/n], {n, 1, 50}] (* G. C. Greubel, Nov 08 2018 *)
  • PARI
    a(n) = denominator(sigma(n)/n); \\ Michel Marcus, Sep 23 2014
    
  • Python
    from math import gcd
    from sympy import divisor_sigma
    def A017666(n): return n//gcd(divisor_sigma(n),n) # Chai Wah Wu, Mar 21 2023

Extensions

More terms from Labos Elemer, Aug 14 2002

A007770 Happy numbers: numbers whose trajectory under iteration of sum of squares of digits map (see A003132) includes 1.

Original entry on oeis.org

1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49, 68, 70, 79, 82, 86, 91, 94, 97, 100, 103, 109, 129, 130, 133, 139, 167, 176, 188, 190, 192, 193, 203, 208, 219, 226, 230, 236, 239, 262, 263, 280, 291, 293, 301, 302, 310, 313, 319, 320, 326, 329, 331, 338
Offset: 1

Views

Author

N. J. A. Sloane, A.R.McKenzie(AT)bnr.co.uk

Keywords

Comments

Sometimes called friendly numbers, but this usage is deprecated.
Gilmer shows that the lower density of this sequence is < 0.1138 and the upper density is > 0.18577. - Charles R Greathouse IV, Dec 21 2011
Corrected the upper and lower density inequalities in the comment above. - Nathan Fox, Mar 14 2013
Grundman defines the heights of the happy numbers by the number of iterations needed to reach the 1: 0, 5, 1, 2, 4, 3, 3, 2, 3, 4, 4, 2, 5, 3, 3, 2, 4, 4, 3, 1, ... (A090425(n) - 1). E.g., for n=2 the height of 7 is 5 because it needs 5 iterations: 7 -> 49 -> 97 -> 130 -> 10 -> 1. - R. J. Mathar, Jul 09 2017
El-Sedy & Siksek prove that this sequence contains arbitrarily long subsequences of consecutive terms; that is, the upper uniform density of this sequence is 1. - Charles R Greathouse IV, Sep 12 2022

Examples

			1 is OK. 2 --> 4 --> 16 --> 37 --> ... --> 4, which repeats with period 8, so never reaches 1, so 2 (and 4) are unhappy.
A correspondent suggested that 98 is happy, but it is not. It enters a cycle 98 -> 145 -> 42 -> 20 -> 4 -> 16 ->37 ->58 -> 89 -> 145 ...
		

References

  • L. E. Dickson, History of the Theory of Numbers, Vol, I: Divisibility and Primality, AMS Chelsea Publ., 1999.
  • R. K. Guy, Unsolved Problems Number Theory, Sect. E34.
  • J. N. Kapur, Reflections of a Mathematician, Chap. 34 pp. 319-324, Arya Book Depot New Delhi 1996.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 25-26.

Crossrefs

Cf. A003132 (the underlying map), A001273, A035497 (happy primes), A046519, A031177, A002025, A050972, A050973, A074902, A103369, A035502, A068571, A072494, A124095, A219667, A239320 (base 3), A240849 (base 5).
Cf. A090425 (required iterations including start and end).

Programs

  • Haskell
    a007770 n = a007770_list !! (n-1)
    a007770_list = filter ((== 1) . a103369) [1..]
    -- Reinhard Zumkeller, Aug 24 2011
    
  • Mathematica
    f[n_] := Total[IntegerDigits[n]^2]; Select[Range[400], NestWhile[f, #, UnsameQ, All] == 1 &] (* T. D. Noe, Aug 22 2011 *)
    Select[Range[1000],FixedPoint[Total[IntegerDigits[#]^2]&,#,10]==1&] (* Harvey P. Dale, Oct 09 2011 *)
    (* A example with recurrence formula to test if a number is happy *)
    a[1]=7;
    a[n_]:=Sum[(Floor[a[n-1]/10^k]-10*Floor[a[n-1]/10^(k+1)]) ^ (2) ,{k, 0,
          Floor[Log[10,a[n-1]]] }]
    Table[a[n],{n,1,10}] (* José de Jesús Camacho Medina, Mar 29 2014 *)
  • PARI
    ssd(n)=n=digits(n);sum(i=1,#n,n[i]^2)
    is(n)=while(n>6,n=ssd(n));n==1 \\ Charles R Greathouse IV, Nov 20 2012
    
  • PARI
    select( {is_A007770(n)=while(6M. F. Hasler, Dec 20 2024
    
  • Python
    def ssd(n): return sum(int(d)**2 for d in str(n))
    def ok(n):
      while n not in [1, 4]: n = ssd(n) # iterate until fixed point or in cycle
      return n==1
    def aupto(n): return [k for k in range(1, n+1) if ok(k)]
    print(aupto(338)) # Michael S. Branicky, Jan 07 2021

Formula

From Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 23 2009: (Start)
1) Every power 10^k is a member of the sequence.
2) If n is member the numbers obtained by placing zeros anywhere in n are members.
3) If n is member each permutation of digits of n gives another member.
4) If the repeated process of summing squared digits give a number which is already a member of sequence the starting number belongs to the sequence.
5) If n is a member the repunit consisting of n 1's is a member.
6) If n is a member delete any digit d, new number consisting of remaining digits of n and d^2 1's placed everywhere to n is a member.
7) It is conjectured that the sequence includes an infinite number of primes (see A035497).
8) For any starting number the repeated process of summing squared digits ends with 1 or gives an "8-loop" which ends with (37,58,89,145,42,20,4,16,37) (End)

A050973 Larger member of friendly pairs ordered by smallest maximal element.

Original entry on oeis.org

28, 140, 200, 224, 234, 270, 308, 364, 476, 496, 496, 532, 600, 644, 672, 700, 812, 819, 868, 936, 1036, 1148, 1170, 1204, 1316, 1400, 1484, 1488, 1488, 1540, 1638, 1638, 1638, 1652, 1708, 1800, 1820, 1876, 1988, 2016, 2044, 2200, 2212, 2324
Offset: 1

Views

Author

Keywords

Comments

Perfect numbers greater than 6 (A000396) belong to this sequence as they form friendly pairs with smaller perfect, so that the n-th perfect number will appear n-1 times in the sequence. - Michel Marcus, Dec 03 2013
If we remove duplicates from the sequence we get A095301. - Jeppe Stig Nielsen, Jul 08 2015
It is possible to derive a friendly pair from 2 existing pairs (a_n,b_n) and (a_k,b_k); if (a_n,b_k) and (a_k,b_n) (resp. (a_k,b_k) and (a_n,b_n)) are coprime, then (a_n*b_k,a_k*b_n) (resp. (a_k*b_k,a_n*b_n)) is a friendly pair. For instance one can derive (32760,30240) from (819,135) and (224,40). Moreover, since 32760/35 and 30240/35 are both coprime to 35, one can also derive the primitive friendly pair (936,864). - Michel Marcus, Oct 09 2015

Crossrefs

Programs

  • PARI
    lista(nn) = {for (n=1, nn, ab = sigma(n)/n; for (i=2, n-1, if (sigma(i)/i == ab, print1(n, ", "));););} \\ Michel Marcus, Dec 03 2013

A074902 Known friendly numbers.

Original entry on oeis.org

6, 12, 24, 28, 30, 40, 42, 56, 60, 66, 78, 80, 84, 96, 102, 108, 114, 120, 132, 135, 138, 140, 150, 168, 174, 186, 200, 204, 210, 222, 224, 228, 234, 240, 246, 252, 258, 264, 270, 273, 276, 280, 282, 294, 300, 308, 312, 318, 330, 348, 354, 360, 364, 366, 372
Offset: 1

Views

Author

N. J. A. Sloane, Sep 15 2002

Keywords

Comments

The sequence is not known to be complete up to 372, since there are many small numbers, including 10, 14, 15 and 20, which have not been proved to be solitary. If any other numbers up to 372 are friendly, the smallest corresponding values of m are > 10^30.
A positive integer n is 'friendly' if abundancy(n) = abundancy(m) for some positive integer m not equal to n, where abundancy(n) = sigma(n)/n (cf. A000203); otherwise n is 'solitary'. (The name "friendly" is also sometimes mistakenly used with other meanings; cf. A063990 and A007770.)
All perfect numbers are friendly numbers, but they are only friendly with each other (a perfect number being defined as having abundancy index of 2.) - Daniel Forgues, Jun 23 2009
Triangle A211679 has rows that list the first numbers that have n-1 smaller friends. Sequence A211677 lists just the last number in each row. - T. D. Noe, May 10 2012

Examples

			24 is in the sequence since abundancy(24) = abundancy(91963648) = 5/2.
		

Crossrefs

Union of A050972 and A050973. Cf. A014567.

Extensions

Edited by Dean Hickerson, Sep 19 2002

A094759 Least k <= n such that n*sigma(k) = k*sigma(n), where sigma(n) is the sum of divisors of n (A000203).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 6, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74
Offset: 1

Views

Author

Amarnath Murthy, May 30 2004

Keywords

Comments

Conjecture: There are infinitely many terms such that a(n)A050973 has those n, A050972 has the a(n).
See A095301 for a version of A050973 that do not duplicate every n that has several smaller k of the same abundancy. - Jeppe Stig Nielsen, Jul 09 2015
That conjecture is an easy fact: Since, e.g., (6,28) is a friendly pair, then so is (6k,28k) for any multiplier k with gcd(42,k)=1. So any n=28k, where gcd(42,k)=1, satisfies a(n)A095301 does not have asymptotic density zero. - Jeppe Stig Nielsen, Jul 09 2015
This sequence is related to Theorem 1 on p. 173 of the Erdős link in the following way. For a given x, let us consider the set of integers such that a(n) <= x, which is equivalent to removing duplicates from the current sequence. This set would begin with: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, ... So this set has the same number of elements as the number of distinct terms numbers of the form sigma(n)/n with 1 <= n <=x. Then by Erdős, it is c1*x + o(x), with 6/Pi^2 < c1 < 1. With x = 10^7, we find c1 ~= 0.98208... - Michel Marcus, Jul 21 2015
a(n) is the least k which has the same abundancy index as n, that is, minimal k for which sigma(k)/k = sigma(n)/n. - Antti Karttunen, Jul 10 2019

Crossrefs

Cf. A095301 for n such that a(n) < n.
Cf. A000396 (positions of 6's), A005820 (positions of 120's).

Programs

  • Maple
    N:= 100: # to get a(1) to a(N)
    for n from 1 to N do
       v:= numtheory:-sigma(n)/n;
       if not assigned(R[v]) then R[v]:= n fi;
       A[n]:= R[v];
    od:
    seq(A[n],n=1..N); # Robert Israel, Jul 21 2015
  • Mathematica
    Table[Module[{k=1,sn=DivisorSigma[1,n]},While[n DivisorSigma[1,k]!=k*sn,k++];k],{n,80}] (* Harvey P. Dale, Aug 03 2025 *)
  • PARI
    for(n=1,74,s=sigma(n);k=1;while(n*sigma(k)!=k*s,k++);print1(k,","));

Extensions

Edited and extended by Don Reble and Klaus Brockhaus, May 31 2004

A339090 GCD of friendly pairs.

Original entry on oeis.org

2, 10, 40, 8, 6, 6, 22, 26, 34, 2, 4, 38, 120, 46, 24, 50, 58, 9, 62, 72, 74, 82, 30, 86, 94, 280, 106, 12, 6, 110, 42, 18, 6, 118, 122, 360, 130, 134, 142, 72, 146, 440, 158, 166, 170, 88, 10, 20, 178, 66, 520, 190, 194, 202, 206, 104, 66, 214, 218, 226, 230
Offset: 1

Views

Author

Ruediger Jehn, Nov 23 2020

Keywords

Comments

The first 10000 friendly pairs (copied from the b-files of A050972 and A050973) all have either 2 or 3 (or both) as a common divisor and hence their GCD is divisible by 2 or 3. However this does not hold for all friendly pairs. GCD(3472, 544635) = 7. These two numbers belong to the club where sigma(x)/x = 16/7 (also 42 belongs to this club).

Examples

			The first friendly pair is (6, 28) and therefore a(1) = gcd(6, 28) = 2.
		

Crossrefs

Formula

a(n) = gcd(A050972(n), A050973(n)).
Showing 1-10 of 10 results.