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.

Previous Showing 91-100 of 689 results. Next

A080224 Number of abundant divisors of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, 0, 1, 0, 1, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 07 2003

Keywords

Comments

Number of divisors d of n with sigma(d)>2*d (sigma = A000203)
a(n)>0 iff n is abundant: a(A005101(n))>0, a(A000396(n))=0 and a(A005100(n))=0; a(A091191(n))=1; a(A091192(n))>1; a(A091193(n))=n and a(m)<>n for m < A091193(n). - Reinhard Zumkeller, Dec 27 2003

Examples

			Divisors of n=24: {1,2,3,4,6,8,12,24}, two of them are abundant: 12=A005101(1) and 24=A005101(4), therefore a(24)=2.
		

Crossrefs

Programs

Formula

a(n) + A080225(n) + A080226(n) = A000005(n).
From Antti Karttunen, Nov 14 2017: (Start)
a(n) = Sum_{d|n} A294937(d).
a(n) = A294929(n) + A294937(n).
a(n) = 1 iff A294930(n) = 1.
(End)

A046061 6-multiperfect numbers.

Original entry on oeis.org

154345556085770649600, 9186050031556349952000, 680489641226538823680000, 6205958672455589512937472000, 13297004660164711617331200000, 15229814702070563916152832000
Offset: 1

Views

Author

Keywords

Comments

Conjectured finite and probably these are the only terms; cf. Flammenkamp's link. - Georgi Guninski, Jul 25 2012

Examples

			From _Daniel Forgues_, May 09 2010: (Start)
154345556085770649600 = 2^15*3^5*5^2*7^2*11*13*17*19*31*43*257
sigma(154345556085770649600) =
(2^16-1)/1*(3^6-1)/2*(5^3-1)/4*(7^3-1)/6*(11^2-1)/10*(13^2-1)/12*(17^2-1)/16*(19^2-1)/18*(31^2-1)/30*(43^2-1)/42*(257^2-1)/256
= 65535*364*31*57*12*14*18*20*32*44*258
= (5*3*17*257)*(2^2*7*13)*(31)*(3*19)*(2^2*3)*(2*7)*(2*3^2)*(2^2*5)*(2^5)*(2^2*11)*(2*3*43)
= 2^16*3^6*5^2*7^2*11*13*17*19*31*43*257
= (2*3) * (2^15*3^5*5^2*7^2*11*13*17*19*31*43*257)
= 6 * 154345556085770649600 (End)
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 144.

Crossrefs

Programs

A159907 Numbers m with half-integral abundancy index, sigma(m)/m = k+1/2 with integer k.

Original entry on oeis.org

2, 24, 4320, 4680, 26208, 8910720, 17428320, 20427264, 91963648, 197064960, 8583644160, 10200236032, 21857648640, 57575890944, 57629644800, 206166804480, 17116004505600, 1416963251404800, 15338300494970880, 75462255348480000, 88898072401645056, 301183421949935616, 6219051710415667200
Offset: 1

Views

Author

M. F. Hasler, Apr 25 2009

Keywords

Comments

Obviously, all terms must be even (cf. formula), but e.g. a(9) and a(12) are not divisible by 3. See A007691 for numbers with integral abundancy.
Odd numbers and higher powers of 2 cannot be in the sequence; 6 is in A000396 and thus in A007691, and n=10,12,14,18,20,22 don't have integral 2*sigma(n)/n.
Conjecture: with number 1, multiply-anti-perfect numbers m: m divides antisigma(m) = A024816(m). Sequence of fractions antisigma(m) / m: {0, 0, 10, 2157, 2337, 13101, 4455356, ...}. - Jaroslav Krizek, Jul 21 2011
The above conjecture is equivalent to the conjecture that there are no odd multiply perfect numbers (A007691) greater than 1. Proof: (sigma(n)+antisigma(n))/n = (n+1)/2 for all n. If n is even then sigma(n)/n is a half-integer if and only if antisigma(n)/n is an integer. Since all members of this sequence are known to be even, the only way the conjecture can fail is if antisigma(n)/n is an integer, in which case sigma(n)/n is an integer as well. - Nathaniel Johnston, Jul 23 2011
These numbers are called hemiperfect numbers. See Numericana & Wikipedia links. - Michel Marcus, Nov 19 2017

Examples

			a(1) = 2 since sigma(2)/2 = (1+2)/2 = 3/2 is of the form k+1/2 with integer k=1.
a(2) = 24 is in the sequence since sigma(24)/24 = (1+2+3+4+6+8+12+24)/24 = (24+12+24)/24 = k+1/2 with integer k=2.
		

Crossrefs

Cf. A000203, A088912, A141643 (k=2), A055153 (k=3), A141645 (k=4), A159271 (k=5).

Programs

  • PARI
    isok(n) = denominator(sigma(n,-1)) == 2; \\ Michel Marcus, Sep 19 2015
    
  • PARI
    forfactored(n=1,10^7, if(denominator(sigma(n,-1))==2, print1(n[1]", "))) \\ Charles R Greathouse IV, May 09 2017
    
  • Python
    from fractions import Fraction
    from sympy import divisor_sigma as sigma
    def aupto(limit):
      for k in range(1, limit):
        if Fraction(int(sigma(k, 1)), k).denominator == 2:
          print(k, end=", ")
    aupto(3*10**4) # Michael S. Branicky, Feb 24 2021

Formula

A159907 = { n | 2*A000203(n) is in n*A005408 } = { n | A054024(n) = n/2 }

Extensions

Terms a(20) onward from Max Alekseyev, Jun 05 2025

A006039 Primitive nondeficient numbers.

Original entry on oeis.org

6, 20, 28, 70, 88, 104, 272, 304, 368, 464, 496, 550, 572, 650, 748, 836, 945, 1184, 1312, 1376, 1430, 1504, 1575, 1696, 1870, 1888, 1952, 2002, 2090, 2205, 2210, 2470, 2530, 2584, 2990, 3128, 3190, 3230, 3410, 3465, 3496, 3770, 3944, 4030
Offset: 1

Views

Author

Keywords

Comments

A number n is nondeficient (A023196) iff it is abundant or perfect, that is iff A001065(n) is >= n. Since any multiple of a nondeficient number is itself nondeficient, we call a nondeficient number primitive iff all its proper divisors are deficient. - Jeppe Stig Nielsen, Nov 23 2003
Numbers whose proper multiples are all abundant, and whose proper divisors are all deficient. - Peter Munn, Sep 08 2020
As a set, shares with the sets of k-almost primes this property: no member divides another member and each positive integer not in the set is either a divisor of 1 or more members of the set or a multiple of 1 or more members of the set, but not both. See A337814 for proof etc. - Peter Munn, Apr 13 2022

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001065 (aliquot function), A023196 (nondeficient), A005101 (abundant), A091191.
Subsequences: A000396 (perfect), A071395 (primitive abundant), A006038 (odd primitive abundant), A333967, A352739.
Positions of 1's in A341620 and in A337690.
Cf. A180332, A337479, A337688, A337689, A337691, A337814, A338133 (sorted by largest prime factor), A338427 (largest prime(n)-smooth), A341619 (characteristic function), A342669.

Programs

  • Mathematica
    k = 1; lst = {}; While[k < 4050, If[DivisorSigma[1, k] >= 2 k && Min@Mod[k, lst] > 0, AppendTo[lst, k]]; k++]; lst (* Robert G. Wilson v, Mar 09 2017 *)

Formula

Union of A000396 (perfect numbers) and A071395 (primitive abundant numbers). - M. F. Hasler, Jul 30 2016
Sum_{n>=1} 1/a(n) is in the interval (0.34842, 0.37937) (Lichtman, 2018). - Amiram Eldar, Jul 15 2020

A007539 a(n) = first n-fold perfect (or n-multiperfect) number.

Original entry on oeis.org

1, 6, 120, 30240, 14182439040, 154345556085770649600, 141310897947438348259849402738485523264343544818565120000
Offset: 1

Views

Author

Keywords

Comments

On the Riemann Hypothesis, a(n) > exp(exp(n / e^gamma)) for n > 3. Unconditionally, a(n) > exp(exp(0.9976n / e^gamma)) for n > 3, where the constant is related to A004394(1000000). - Charles R Greathouse IV, Sep 06 2012
Each of the terms 1, 6, 120, 30240 divides all larger terms <= a(8). See A227765, A227766, ..., A227769. - Jonathan Sondow, Jul 30 2013
Is a(n) < a(n+1)? - Jeppe Stig Nielsen, Jun 16 2015
Equivalently, a(n) is the smallest number k such that sigma(k)/k = n. - Derek Orr, Jun 19 2015
The number of divisors of these terms are: 1, 4, 16, 96, 1920, 110592, 1751777280, 63121588161085440. - Michel Marcus, Jun 20 2015
Given n, let S_n be the sequence of integers k that satisfy numerator(sigma(k)/k) = n. Then a(n) is a member of S_n. In fact a(n) = S_n(i), where the successive values of i are 1, 1, 2, 2, 4, 2, (23, 6, 31, 12, ...), where the terms in parentheses need to be confirmed. - Michel Marcus, Nov 22 2015
The first four terms are the only multiperfect numbers in A025487 among the 1600 initial terms of A007691. Can it be proved that these are the only ones among the whole A007691? See also A349747. - Antti Karttunen, Dec 04 2021

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 22.
  • A. Brousseau, Number Theory Tables. Fibonacci Association, San Jose, CA, 1973, p. 138.
  • R. K. Guy, Unsolved Problems in Number Theory, B2.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    Table[k = 1; While[DivisorSigma[1, k]/k != n, k++]; k, {n, 4}] (* Michael De Vlieger, Jun 20 2015 *)
  • PARI
    a(n)=k=1;while((sigma(k)/k)!=n,k++);k
    vector(4,n,a(n)) \\ Derek Orr, Jun 19 2015

Extensions

More terms sent by Robert G. Wilson v, Nov 30 2000

A267124 Primitive practical numbers: practical numbers that are squarefree or practical numbers that when divided by any of its prime factors whose factorization exponent is greater than 1 is no longer practical.

Original entry on oeis.org

1, 2, 6, 20, 28, 30, 42, 66, 78, 88, 104, 140, 204, 210, 220, 228, 260, 272, 276, 304, 306, 308, 330, 340, 342, 348, 364, 368, 380, 390, 414, 460, 462, 464, 476, 496, 510, 522, 532, 546, 558, 570, 580, 620, 644, 666, 690, 714, 740, 744, 798, 812, 820, 858, 860, 868, 870, 888, 930, 966, 984
Offset: 1

Views

Author

Frank M Jackson, Jan 10 2016

Keywords

Comments

If n is a practical number and d is any of its divisors then n*d must be practical. Consequently the sequence of all practical numbers must contain members that are either squarefree (A265501) or when divided by any of its prime factors whose factorization exponent is greater than 1 is no longer practical. Such practical numbers are said to be primitive. The set of all practical numbers can be generated from the set of primitive practical numbers by multiplying the primitive by an integer formed from power combinations of the divisors of the primitive (see A379325 and A379713). [Comment corrected by Frank M Jackson, Jan 01 2025]
Conjecture: every odd number, beginning with 3, is the sum of a prime number and a primitive practical number. This is a tighter conjecture to the conjecture posed by Hal M. Switkay (see A005153).
Analogous to the {1 union primes} (A008578) and practical numbers (A005153), the sequence of primitive practical numbers with two extra, practical only, terms added, namely 4 and 8, becomes a "complete" (sic) sequence. - Frank M Jackson, Mar 14 2023

Examples

			a(4)=20=2^2*5. It is a practical number because it has 6 divisors 1, 2, 4, 5, 10, 20 that form a complete sequence. If it is divided by 2 the resultant has 4 divisors 1, 2, 5, 10 that is not a complete sequence.
a(7)=42=2*3*7. It is squarefree and is practical because it has 8 divisors 1, 2, 3, 6, 7, 14, 21, 42 that form a complete sequence.
		

Crossrefs

Superset of primorial numbers (A002110) and superset of perfect numbers (A000396).

Programs

  • Mathematica
    PracticalQ[n_] := Module[{f, p, e, prod=1, ok=True}, If[n<1||(n>1&&OddQ[n]), False, If[n==1, True, f=FactorInteger[n]; {p, e}=Transpose[f]; Do[If[p[[i]]>1+DivisorSigma[1, prod], ok=False; Break[]]; prod=prod*p[[i]]^e[[i]], {i, Length[p]}]; ok]]]; lst=Select[Range[1, 1000], PracticalQ]; lst1=lst; maxfac=PrimePi[Last[Union[Flatten[FactorInteger[lst], 1]]][[1]]]; Do[lst1=Select[lst1, Mod[#, Prime[p]^2]!=0||!PracticalQ[#/Prime[p]] &], {p, 1, maxfac}]; lst1
  • PARI
    \\ see A005153 for is_A005153
    isp(n) = {my(f=factor(n)); for (k=1, #f~,  if ((f[k,2] > 1) && is_A005153(n/f[k,1]), return (0));); return (1);}
    is_A267124(n) = is_A005153(n) && (issquarefree(n) || isp(n)); \\ Michel Marcus, Jun 19 2019. [Name edited for use in A361872 and elsewhere. - M. F. Hasler, Jun 20 2023]
    
  • Python
    from sympy import factorint
    def is_primitive(n): # uses is_A005153: see there, please DO NOT copy code here!
        for i in range(0, len(list(factorint(n)))):
            if list(factorint(n).values())[i] > 1:
                if is_A005153(n//list(factorint(n))[i]): return False
        return True
    def is_A267124(n):
        if is_A005153(n) and is_primitive(n):
            return True # Karl-Heinz Hofmann, Mar 09 2023

A336547 Numbers k such that for 1 <= i < j <= h, all sigma(p_i^e_i), sigma(p_j^e_j) are pairwise coprime, when k = p_1^e_1 * ... * p_h^e_h, where each p_i^e_i is the maximal power of prime p_i dividing k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 28, 29, 31, 32, 36, 37, 38, 41, 43, 44, 45, 47, 48, 49, 50, 53, 54, 56, 59, 61, 62, 63, 64, 67, 68, 71, 72, 73, 74, 75, 76, 79, 80, 81, 83, 86, 89, 92, 96, 97, 99, 100, 101, 103, 104, 107, 108, 109, 112, 113, 116, 117, 121, 122, 124, 125
Offset: 1

Views

Author

Antti Karttunen, Jul 25 2020

Keywords

Comments

Numbers k such that A051027(k) = Product_{p^e||k} A051027(p^e) = A353802(n). Here each p^e is the maximal prime power divisor of k, and A051027(k) = sigma(sigma(k)). Numbers at which points A051027 appears to be multiplicative.
Proof that this interpretation is equal to the main definition:
(1) If none of sigma(p_1^e_1), ..., sigma(p_k^e_k) share prime factors, then A051027(k) = sigma(sigma(p_1^e_1) * ... * sigma(p_k^e_k)) = A051027(p_1^e_1) * ... * A051027(p_k^e_k), by multiplicativity of sigma.
(2) On the other hand, if say, gcd(sigma(p_i^e_i), sigma(p_j^e_j)) = c > 1 for some distinct i, j, then that c has at least one prime factor q, with product t = sigma(p_1^e_1) * ... * sigma(p_k^e_k) having a divisor of the form q^v (where v = valuation(t,q)), and the same prime factor q occurs as a divisor in more than one of the sigma(p_i^e_j), in the form q^k, with the exponents summing to v, then it is impossible to form sigma(q^v) = (1 + q + q^2 + ... + q^v) as a product of some sigma(q^k_1) * ... * sigma(q^k_z), i.e., as a product of (1 + q + ... + q^k_1) * ... * (1 + q + ... + q^k_z), with v = k_1 + ... + k_z, because such a product is always larger than (1 + q + ... + q^v). And if there are more such cases of "split primes", then each of them brings its own share to this monotonic inequivalence, thus Product_{p^e|n} A051027(p^e) = A353802(n) >= A051027(n), for all n.
From Antti Karttunen, May 07 2022: (Start)
Also numbers k such that A062401(k) = phi(sigma(n)) = Product_{p^e||k} A062401(p^e) = A353752(n).
Proof that also this interpretation is equal to the main definition:
(1) like in (1) above, if none of sigma(p_1^e_1), ..., sigma(p_k^e_k) share prime factors, then by the multiplicativity of phi.
(2) On the other hand, if say, gcd(sigma(p_i^e_i), sigma(p_j^e_j)) = c > 1 for some distinct i, j, then that c must have a prime factor q occurring in both sigma(p_i^e_i) and sigma(p_j^e_j), with say q^x being the highest power of q in the former, and q^y in the latter. Then phi(q^x)*phi(q^y) < phi(q^(x+y)), i.e. here the inequivalence acts to the opposite direction than with sigma(sigma(...)), so we have A353752(n) <= A062401(n) for all n.
(End)
From Antti Karttunen, May 22 2022: (Start)
All even perfect numbers (even terms of A000396) are included in this sequence. In general, for any perfect number n in this sequence, map k -> A026741(sigma(k)) induces on its unitary prime power divisors (p^e||n) a permutation that is a single cycle, mapping each one of them to the next larger one, except that the largest is mapped to the smallest one. Therefore, for a hypothetical odd perfect number n = x*a*b*c*d*e*f*g*h to be included in this sequence, where x is Euler's special factor of the form (4k+1)^(4h+1), and a .. h are even powers of odd primes (of which there are at least eight distinct ones, see P. P. Nielsen reference in A228058), further constraints are imposed on it: (1) that h < x < 2*a (here assuming that a, b, c, ..., g, h have already been sorted by their size, thus we have a < b < ... < g < h < x < 2*a, and (2), that we must also have sigma(a) = b, sigma(b) = c, ..., sigma(f) = g, sigma(h) = x, and sigma(x) = 2*a. Note that of the 400 initial terms of A008848, only its second term 81 is a prime power, so empirically this seems highly unlikely to ever happen.
(End)

Examples

			28 = 2^2 * 7 is present, as sigma(2^2) = 7 and sigma(7) = 8, and 7 and 8 are relatively prime (do not share prime factors). Likewise for all even terms of A000396. - _Antti Karttunen_, May 09 2022
		

Crossrefs

Cf. A051027, A062401, A336546 (characteristic function), A336548 (complement).
Positions of zeros in A336562, in A353753, and in A353803.
Positions of ones in A353755, in A353784, and in A353806.
Union of A000961 and A336549.
Subsequence of A336358 and of A336557.

Programs

Formula

{k | A336562(k) == 0}. - Antti Karttunen, May 09 2022

Extensions

The old definition moved to comments and replaced with an alternative definition from the comment section by Antti Karttunen, May 07 2022

A014635 a(n) = 2*n*(4*n - 1).

Original entry on oeis.org

0, 6, 28, 66, 120, 190, 276, 378, 496, 630, 780, 946, 1128, 1326, 1540, 1770, 2016, 2278, 2556, 2850, 3160, 3486, 3828, 4186, 4560, 4950, 5356, 5778, 6216, 6670, 7140, 7626, 8128, 8646, 9180, 9730, 10296, 10878, 11476, 12090, 12720, 13366, 14028, 14706
Offset: 0

Views

Author

Keywords

Comments

Even hexagonal numbers.
Number of edges in the join of two complete graphs of order 3n and n, K_3n * K_n - Roberto E. Martinez II, Jan 07 2002
Bisection of A000384. Also, this sequence arises from reading the line from 0, in the direction 0, 6, ..., in the square spiral whose vertices are the triangular numbers A000217. Perfect numbers are members of this sequence because a(A134708(n)) = A000396(n). Also, positive members are a bisection of A139596. - Omar E. Pol, May 07 2008

Crossrefs

Programs

Formula

a(n) = C(4*n,2), n>=0. - Zerinvary Lajos, Jan 02 2007
O.g.f.: 2*x*(3+5*x)/(1-x)^3. - R. J. Mathar, May 06 2008
a(n) = 8*n^2 - 2*n. - Omar E. Pol, May 07 2008
a(n) = a(n-1) + 16*n - 10 (with a(0)=0). - Vincenzo Librandi, Nov 20 2010
E.g.f.: (8*x^2 + 6*x)*exp(x). - G. C. Greubel, Jul 18 2017
From Vaclav Kotesovec, Aug 18 2018: (Start)
Sum_{n>=1} 1/a(n) = 3*log(2)/2 - Pi/4.
Sum_{n>=1} (-1)^n / a(n) = log(2)/2 + log(1+sqrt(2))/sqrt(2) - Pi / 2^(3/2). (End)
a(n) = A154105(n-1) - A016754(n-1). - Leo Tavares, May 02 2023

Extensions

More terms from Erich Friedman

A064771 Let S(n) = set of divisors of n, excluding n; sequence gives n such that there is a unique subset of S(n) that sums to n.

Original entry on oeis.org

6, 20, 28, 78, 88, 102, 104, 114, 138, 174, 186, 222, 246, 258, 272, 282, 304, 318, 354, 366, 368, 402, 426, 438, 464, 474, 490, 496, 498, 534, 572, 582, 606, 618, 642, 650, 654, 678, 748, 762, 786, 822, 834, 860, 894, 906, 940, 942, 978, 1002, 1014, 1038
Offset: 1

Views

Author

Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Oct 19 2001

Keywords

Comments

Perfect numbers (A000396) are a proper subset of this sequence. Weird numbers (A006037) are numbers whose proper divisors sum to more than the number, but no subset sums to the number.
Odd elements are rare: the first few are 8925, 32445, 351351, 442365; there are no more below 100 million. See A065235 for more details.
A065205(a(n)) = 1. - Reinhard Zumkeller, Jan 21 2013

Examples

			Proper divisors of 20 are 1, 2, 4, 5 and 10. {1,4,5,10} is the only subset that sums to 20, so 20 is in the sequence.
		

Crossrefs

A005835 gives n such that some subset of S(n) sums to n. Cf. A065205.
Cf. A006037, A065205, A378448 (characteristic function).
Subsequences: A000396, A065235 (odd terms), A378519, A378530.
Cf. A027751.

Programs

  • Haskell
    a064771 n = a064771_list !! (n-1)
    a064771_list = map (+ 1) $ elemIndices 1 a065205_list
    -- Reinhard Zumkeller, Jan 21 2013
    
  • Maple
    filter:= proc(n)
      local P,x,d;
      P:= mul(x^d+1, d = numtheory:-divisors(n) minus {n});
      coeff(P,x,n) = 1
    end proc:
    select(filter, [$1..2000]); # Robert Israel, Sep 25 2024
  • Mathematica
    okQ[n_]:= Module[{d=Most[Divisors[n]]}, SeriesCoefficient[Series[ Product[ 1+x^i, {i, d}], {x, 0, n}], n] == 1];Select[ Range[ 1100],okQ] (* Harvey P. Dale, Dec 13 2010 *)
  • Python
    from sympy import divisors
    def isok(n):
        dp = {0: 1}
        for d in divisors(n)[:-1]:
            u = {}
            for k in dp.keys():
                if (s := (d + k)) <= n:
                    u[s] = dp.get(s, 0) + dp[k]
                    if s == n and u[s] > 1:
                        return False
            for k,v in u.items():
                dp[k] = v
        return dp.get(n, 0) == 1
    print([n for n in range(1, 1039) if isok(n)]) # DarĂ­o Clavijo, Sep 17 2024

Extensions

More terms from Don Reble, Jud McCranie and Naohiro Nomoto, Oct 22 2001

A098008 Length of transient part of aliquot sequence for n, or -1 if transient part is infinite.

Original entry on oeis.org

1, 2, 2, 3, 2, 0, 2, 3, 4, 4, 2, 7, 2, 5, 5, 6, 2, 4, 2, 7, 3, 6, 2, 5, 1, 7, 3, 0, 2, 15, 2, 3, 6, 8, 3, 4, 2, 7, 3, 4, 2, 14, 2, 5, 7, 8, 2, 6, 4, 3, 4, 9, 2, 13, 3, 5, 3, 4, 2, 11, 2, 9, 3, 4, 3, 12, 2, 5, 4, 6, 2, 9, 2, 5, 5, 5, 3, 11, 2, 7, 5, 6, 2, 6, 3, 9, 7, 7, 2, 10, 4, 6, 4, 4, 2, 9, 2, 3, 4, 5, 2, 18
Offset: 1

Views

Author

N. J. A. Sloane, Sep 09 2004

Keywords

Comments

See A098007 for further information.
a(n) = 0 if and only if n is perfect (A000396) or part of a cycle of length greater than 1. - Comment corrected by Antti Karttunen, Nov 02 2017.
It is believed that the first time a(n) = -1 is at n = 276 (see A008892). - N. J. A. Sloane, Nov 02 2017

Examples

			From _Antti Karttunen_, Nov 02 2017: (Start)
For n = 3, a(n) = 2, because A001065(3) = 1 and A001065(1) = 0, so it took two steps to end in zero.
For n = 25, a(n) = 1, because A001065(25) = 6, and A001065(6) = 6, so it took one step to enter into a cycle.
For n = 12496, a(n) = 0, because 12496 is a member of 5-cycle of map n -> A001065(n) (see A072891).
(End)
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, B6.
  • R. K. Guy and J. L. Selfridge, Interim report on aliquot series, pp. 557-580 of Proceedings Manitoba Conference on Numerical Mathematics. University of Manitoba, Winnipeg, Oct 1971.

Crossrefs

Cf. A001065, A098007, A044050, A003023, A008892. See A007906 for another version.
Cf. A206708 (gives a proper subset of zeros).

Programs

  • Mathematica
    g[n_] := If[n > 0, DivisorSigma[1, n] - n, 0]; f[n_] := NestWhileList[g, n, UnsameQ, All]; Table[ Length[ f[n]] - 2, {n, 102}] (* good only for n<220 *) (* Robert G. Wilson v, Sep 10 2004 *)
  • Scheme
    (define (A098008 n) (let loop ((visited (list n)) (i 1)) (let ((next (A001065 (car visited)))) (cond ((zero? next) i) ((member next visited) => (lambda (transientplus1) (- (length transientplus1) 1))) (else (loop (cons next visited) (+ 1 i))))))) ;; Good for at least n = 1..275.
    (define (A001065 n) (- (A000203 n) n)) ;; For an implementation of A000203, see under that entry.
    ;; Antti Karttunen, Nov 02 2017

Extensions

More terms from Robert G. Wilson v, Sep 10 2004
Previous Showing 91-100 of 689 results. Next