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

A074873 Friendly numbers (see A074902) such that sigma(n) is not friendly.

Original entry on oeis.org

66, 210, 282, 364, 510, 642, 930, 966, 1080, 1092, 1146, 1624, 2130, 2226, 2346, 2586, 2676, 3560, 3810, 4278, 4872, 7965
Offset: 0

Views

Author

Jon Perry, Sep 12 2002

Keywords

Comments

I do not know how rigorously these numbers have been established. It is possible there are missing terms - see A074902. - N. J. A. Sloane, Sep 15 2002
From Walter Nissen, May 28 2011: (Start)
Yes; in particular, if perchance 10 should turn out to have a friend, then 10 would be a(0). Also 30 and 40 might possibly be in this sequence.
Numbers without friends are called solitary.
(End)

Examples

			6 is friendly, but so is sigma(6)=12, so 6 is not in the sequence. 210 is friendly (with 17360 for example), but sigma(210)=576 is not friendly.
		

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

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).

A096366 Known primitive friendly integers.

Original entry on oeis.org

6, 12, 24, 28, 30, 40, 42, 56, 60, 80, 84, 96, 108, 135, 140, 168, 200, 210, 224, 234, 240, 264, 270, 273, 280, 360, 380, 408, 480, 496
Offset: 1

Views

Author

Walter Nissen, Jul 01 2004

Keywords

Comments

Friends m and n are primitive friendly iff they have no common prime factor of the same multiplicity.
There may be other primitive friendly integers within the range of those given, but they have yet to be calculated.
All perfect numbers are 2-primitive-friendly (since they are all products of distinct powers of 2 and distinct Mersenne primes). - Daniel Forgues, Jun 24 2009
A friendly integer can be both primitive and nonprimitive. For example, consider 30. First, 30 is friendly to 140, but this relation is nonprimitive, because it is 5 times the friendly pair {6, 28}. But then, 30 is also friendly to 6200, and this is a primitive pair (not a scaling of a smaller friendly pair). - Jeppe Stig Nielsen, Dec 07 2022

Examples

			While 6 and 28 are not coprime because they share the common factor 2, the factor 2 appears twice in 28 but only once in 6, so they are in the sequence.
From _Suyash Pandit_, Oct 15 2023: (Start)
280 is primitive friendly with 1553357978368 = 2^8*7^2*19^2*37*73*127;
360 is primitive friendly with 155086041146982400 = 2^20*5^2*7^3*13*31*127*337;
380 is primitive friendly with 31701183232 = 2^8*19^2*37*73*127;
408 is primitive friendly with 874453888 = 2^7*7*11*17^2*307. (End)
		

Crossrefs

Extensions

Offset 1 from Michel Marcus, Dec 13 2022
Terms 280, 360, 380, and 408 from Suyash Pandit, Sep 16 2023

A095738 Numbers that are coprime to sigma but are not prime powers.

Original entry on oeis.org

21, 35, 36, 39, 50, 55, 57, 63, 65, 75, 77, 85, 93, 98, 100, 111, 115, 119, 129, 133, 143, 144, 155, 161, 171, 175, 183, 185, 187, 189, 201, 203, 205, 209, 215, 217, 219, 221, 225, 235, 237, 242, 245, 247, 253, 259, 265, 275, 279, 291, 299, 301, 305, 309, 319
Offset: 1

Views

Author

Walter Nissen, Jul 08 2004

Keywords

Comments

Abundancy is defined as the ratio of the multiplicative sum-of-divisors function to the integer itself: abund(n) = sigma(n)/n. E.g., abund(10) = sigma(10) / 10 = (1+2+5+10) / 10 = 1.8 = 9 / 5.
Integers m and n are friendly if and only if they have the same abundancy. E.g., abund(12) = abund(234) = 7 / 3, so 12 and 234 are friends.
Integers which have no friends are called solitary.
The numbers in this sequence are solitary.
Compare abundancy to abundance as defined in A033880.

Crossrefs

Programs

  • Mathematica
    Select[Range[320], PrimeNu[#] > 1 && GCD[#, DivisorSigma[1, #]] == 1 &] (* Amiram Eldar, Jun 25 2019 *)
  • PARI
    isok(n) = (gcd(sigma(n), n) == 1) && (! isprime(n)) && (! (ispower(n, , &p) && isprime(p))); \\ Michel Marcus, Jan 24 2014

Extensions

Edited by Franklin T. Adams-Watters, Mar 06 2014

A326200 Lexicographically earliest sequence such that a(i) = a(j) => sigma(i)/i = sigma(j)/j for all i, j.

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, 28, 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, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90
Offset: 1

Views

Author

Antti Karttunen, Jun 13 2019

Keywords

Comments

Restricted growth sequence transform of the abundancy index of n.
For all i, j:
a(i) = a(j) <=> A094759(i) = A094759(j),
a(i) = a(j) => A017665(i) = A017665(j),
a(i) = a(j) => A017666(i) = A017666(j).

Crossrefs

Cf. A000396 (positions of 6's), A005820 (positions of 119's).

Programs

  • PARI
    up_to = 105664; \\ (In the same equivalence class as 78, 364 and 6448).
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    v326200 = rgs_transform(vector(up_to,n,sigma(n)/n));
    A326200(n) = v326200[n];

A095739 Numbers known to be solitary but not coprime to sigma.

Original entry on oeis.org

18, 45, 48, 52, 136, 148, 160, 162, 176, 192, 196, 208, 232, 244, 261, 272, 292, 296, 297, 304, 320, 352, 369
Offset: 1

Views

Author

Walter Nissen, Jul 08 2004

Keywords

Comments

Abundancy is defined as the ratio of the multiplicative sum-of-divisors function to the integer itself: abund(n) = sigma(n)/n. E.g., abund(10) = sigma(10)/10 = (1+2+5+10)/10 = 1.8 = 9/5.
Integers m and n are friendly iff they have the same abundancy. E.g., abund(12) = abund(234) = 7/3 ===> 12 and 234 are friends.
Integers which have no friends are called solitary.
"It is believed that 10, 14, 15, 20, 22, 26, 33, 34, 38, 44, 46, 51, 54, 58, 62, 68, 69, 70, 72, 74, 76, 82, 86, 87, 88, 90, 91, 92, 94, 95, 99, 104, 105, 106 and many others are also solitary, although a proof appears to be extremely difficult." Quote from Eric W. Weisstein. - Franklin T. Adams-Watters, Feb 02 2006

Crossrefs

Extensions

More terms from Franklin T. Adams-Watters, Feb 02 2006

A211679 Triangle of earliest friendly numbers having n friends.

Original entry on oeis.org

6, 28, 6, 28, 496, 84, 270, 1488, 1638, 84, 270, 1488, 1638, 24384, 210, 17360, 43400, 284480, 2229500, 2886100, 3780, 66960, 167400, 406224, 1097280, 6656832, 13035330, 3780, 66960, 167400, 406224, 1097280, 6656832, 13035330, 29410290
Offset: 2

Views

Author

T. D. Noe, May 10 2012

Keywords

Comments

Row n contains the earliest set of friendly numbers of length n. The sequence A211677 contains the last element of each row.

Crossrefs

Cf. A074902 (friendly numbers), A211677.

A259917 All friendly numbers, with smallest member of each club listed just before the second-smallest one.

Original entry on oeis.org

6, 28, 30, 140, 80, 200, 40, 224, 12, 234, 84, 270, 66, 308, 78, 364, 102, 476, 496, 114, 532, 240, 600, 138, 644, 120, 672, 150, 700, 174, 812, 135, 819, 186, 868, 864, 936, 222, 1036, 246, 1148, 60, 1170, 258, 1204, 282, 1316, 560, 1400, 318, 1484, 1488, 330
Offset: 1

Views

Author

Jeppe Stig Nielsen, Jul 08 2015

Keywords

Comments

Run through all natural numbers i = 1, 2, 3, ... in order, and record for each the abundancy index sigma(i)/i. When we reach an abundancy that has been seen before, output first the "old" number which had that abundancy (unless that number has already been output earlier), and output secondly the current i.
By construction, no number can occur more than once in the sequence.
Friendly numbers that are not smallest in their club, appear in increasing order. Friendly numbers that are smallest in their club, appear just before the second-smallest member.
If we were to "forget" to output the smallest member in each club, we would get instead A095301.
Oppositely, if we output the smallest members only, we get instead A259918.
It is not known whether the number 10 belongs to this sequence.

Crossrefs

Terms form a subset of A069059.

Programs

  • PARI
    known=List(); for(i=1,10^5,a=sigma(i)/i; match=0; for(j=1,#known,if(known[j][1]==a,match=j;break())); if(match,old=known[match][2]; if(old,print1(old,", "); known[match]=[a,0]); print(i,","),listput(known,[a,i])))
Showing 1-10 of 13 results. Next