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 15 results. Next

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.

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)

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

A050972 Smaller member of friendly pairs ordered by smallest maximal element.

Original entry on oeis.org

6, 30, 80, 40, 12, 84, 66, 78, 102, 6, 28, 114, 240, 138, 120, 150, 174, 135, 186, 864, 222, 246, 60, 258, 282, 560, 318, 84, 270, 330, 84, 270, 1488, 354, 366, 720, 390, 402, 426, 360, 438, 880, 474, 498, 510, 440, 30, 140, 534, 132, 1040, 570, 582, 606
Offset: 1

Views

Author

Keywords

Comments

Conjecture: If a(n) is in A005153, then A050973(n) is in A005153. 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(A050973(n)) for all n. See also A017666. - Jaycob Coleman, Sep 27 2014

Crossrefs

Cf. A050973 (larger member of pair), A074902 (friendly numbers).

A095301 Numbers n such that there is some k < n with n*sigma(k) = k*sigma(n).

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Jun 01 2004

Keywords

Comments

Original name: Numbers n such that A094759(n) < n.
Agrees with A050973 without duplicates.
Also numbers n such that the value sigma(n)/n has already been reached before n. If n belongs to the sequence then A214701(n) = A214701(n-1). - Michel Marcus, Aug 19 2012

Examples

			A094759(28) = 6 < 28, hence 28 is in the sequence.
		

References

  • B. Spearman and K. S. Williams, Handbook of Estimates in the Theory of Numbers, Carleton Math. Lecture Note Series No. 14, 1975; see p. 3.2, Eq. (3.9).

Crossrefs

Programs

  • PARI
    for(n=1,2600,s=sigma(n);k=1;while(n*sigma(k)!=k*s,k++);if(k
    				
  • PARI
    allab = []; nb = 0; for (i=1, n, ab = sigma(i)/i; already = 0; if (length(allab) > 0, for (j=1, length(allab), if (ab == allab[j], already = 1; break););); if (already == 1,  nb++; print1(i, ","), allab = concat(allab, ab););)
    /* Michel Marcus, Aug 19 2012 */

Extensions

New name from Charles R Greathouse IV, Jul 21 2015

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

A233039 Larger member of primitive friendly pairs ordered by smallest maximal element.

Original entry on oeis.org

28, 200, 224, 234, 270, 496, 496, 819, 936, 1488, 1638, 3724, 6200, 6200, 6860, 6975, 8128, 8128, 8128, 10976, 13104, 18600, 21600, 24384, 24384, 24800, 27000, 27000, 29792, 40131, 40640, 43008, 50274, 54000, 54400, 58032, 87750, 93100, 154791, 160524
Offset: 1

Views

Author

Michel Marcus, Dec 03 2013

Keywords

Comments

Subsequence of A050973.
Friends m and n are primitive friendly if and only if they have no common prime factor of the same multiplicity (see A096366).
Perfect numbers greater than 6 (A000396) belong to this sequence as they form primitive friendly pairs (PFPs) with smaller perfect, so that the n-th perfect number will appear n-1 times in the sequence.
PFPs are quite useful to derive new greater amicable pairs from existing ones (see A230148).

Examples

			28 forms a friendly pair with the lesser integer 6, and this pair cannot be derived from a smaller pair, so it is primitive and 28 belongs to the sequence.
140 forms also a pair with 30, hence 140 belongs to A050973. But the pair (30, 140) can be derived from (6, 28) by multiplying both members by 5, so it is not primitive; hence 140 does not belong to the sequence.
		

Crossrefs

Programs

  • PARI
    vp(f) = {maxp = f[#f~, 1]; v = vector(primepi(maxp)); for (j=1, #f~, v[primepi(f[j, 1])] = f[j, 2];);v;}
    ispfp(vpn, vpi) = {for (k=1, min(#vpn, #vpi), if (vpi[k] && (vpn[k] == vpi[k]), return (0));); return (1);}
    lista(nn) = {for (n=2, nn, ab = sigma(n)/n; vpn = vp(factor(n)); for (i=2, n-1, if (sigma(i)/i == ab, if (ispfp(vpn, vp(factor(i))), print1(n, ", ")););););} \\ Michel Marcus, Dec 03 2013
Showing 1-10 of 15 results. Next