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

A020639 Lpf(n): least prime dividing n (when n > 1); a(1) = 1. Or, smallest prime factor of n, or smallest prime divisor of n.

Original entry on oeis.org

1, 2, 3, 2, 5, 2, 7, 2, 3, 2, 11, 2, 13, 2, 3, 2, 17, 2, 19, 2, 3, 2, 23, 2, 5, 2, 3, 2, 29, 2, 31, 2, 3, 2, 5, 2, 37, 2, 3, 2, 41, 2, 43, 2, 3, 2, 47, 2, 7, 2, 3, 2, 53, 2, 5, 2, 3, 2, 59, 2, 61, 2, 3, 2, 5, 2, 67, 2, 3, 2, 71, 2, 73, 2, 3, 2, 7, 2, 79, 2, 3, 2, 83, 2, 5, 2, 3, 2, 89, 2, 7, 2, 3, 2, 5, 2, 97
Offset: 1

Views

Author

Keywords

Comments

Also, the largest number of distinct integers such that all their pairwise differences are coprime to n. - Max Alekseyev, Mar 17 2006
The unit 1 is not a prime number (although it has been considered so in the past). 1 is the empty product of prime numbers, thus 1 has no least prime factor. - Daniel Forgues, Jul 05 2011
a(n) = least m > 0 for which n! + m and n - m are not relatively prime. - Clark Kimberling, Jul 21 2012
For n > 1, a(n) = the smallest k > 1 that divides n. - Antti Karttunen, Feb 01 2014
For n > 1, records are at prime indices. - Zak Seidov, Apr 29 2015
The initials "lpf" might be mistaken for "largest prime factor" (A009190), using "spf" for "smallest prime factor" would avoid this. - M. F. Hasler, Jul 29 2015
n = 89 is the first index > 1 for which a(n) differs from the smallest k > 1 such that (2^k + n - 2)/k is an integer. - M. F. Hasler, Aug 11 2015
From Stanislav Sykora, Jul 29 2017: (Start)
For n > 1, a(n) is also the smallest k, 1 < k <= n, for which the binomial(n,k) is not divisible by n.
Proof: (A) When k and n are relatively prime then binomial(n,k) is divisible by n because k*binomial(n,k) = n*binomial(n-1,k-1). (B) When gcd(n,k) > 1, one of its prime factors is the smallest; let us denote it p, p <= k, and consider the binomial(n,p) = (1/p!)*Product_{i=0..p-1} (n-i). Since p is a divisor of n, it cannot be a divisor of any of the remaining numerator factors. It follows that, denoting as e the largest e > 0 such that p^e|n, the numerator is divisible by p^e but not by p^(e+1). Hence, the binomial is divisible by p^(e-1) but not by p^e and therefore not divisible by n. Applying (A), (B) to all considered values of k completes the proof. (End)
From Bob Selcoe, Oct 11 2017, edited by M. F. Hasler, Nov 06 2017: (Start)
a(n) = prime(j) when n == J (mod A002110(j)), n, j >= 1, where J is the set of numbers <= A002110(j) with smallest prime factor = prime(j). The number of terms in J is A005867(j-1). So:
a(n) = 2 when n == 0 (mod 2);
a(n) = 3 when n == 3 (mod 6);
a(n) = 5 when n == 5 or 25 (mod 30);
a(n) = 7 when n == 7, 49, 77, 91, 119, 133, 161 or 203 (mod 210);
etc. (End)
For n > 1, a(n) is the leftmost term, other than 0 or 1, in the n-th row of A127093. - Davis Smith, Mar 05 2019

References

  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section IV.1.

Crossrefs

Cf. A090368 (bisection).
Cf. A046669 (partial sums), A072486 (partial products).
Cf. A127093.

Programs

  • Haskell
    a020639 n = spf a000040_list where
      spf (p:ps) | n < p^2      = n
                 | mod n p == 0 = p
                 | otherwise    = spf ps
    -- Reinhard Zumkeller, Jul 13 2011
    
  • Maple
    A020639 := proc(n) if n = 1 then 1; else min(op(numtheory[factorset](n))) ; end if; end proc: seq(A020639(n),n=1..20) ; # R. J. Mathar, Oct 25 2010
  • Mathematica
    f[n_]:=FactorInteger[n][[1,1]]; Join[{1}, Array[f,120,2]]  (* Robert G. Wilson v, Apr 06 2011 *)
    Join[{1}, Table[If[EvenQ[n], 2, FactorInteger[n][[1,1]]], {n, 2, 120}]] (* Zak Seidov, Nov 17 2013 *)
    Riffle[Join[{1},Table[FactorInteger[n][[1,1]],{n,3,101,2}]],2] (* Harvey P. Dale, Dec 16 2021 *)
  • PARI
    A020639(n) = { vecmin(factor(n)[,1]) } \\ [Will yield an error for n = 1.] - R. J. Mathar, Mar 02 2012
    
  • PARI
    A020639(n)=if(n>1, if(n>n=factor(n,0)[1,1], n, factor(n)[1,1]), 1) \\ Avoids complete factorization if possible. Often the smallest prime factor can be found quickly even if it is larger than primelimit. If factoring takes too long for large n, use debugging level >= 3 (\g3) to display the smallest factor as soon as it is found. - M. F. Hasler, Jul 29 2015
    
  • Python
    from sympy import factorint
    def a(n): return 1 if n == 1 else min(factorint(n))
    print([a(n) for n in range(1, 98)]) # Michael S. Branicky, Dec 09 2021
  • Sage
    def A020639_list(n) : return [1] + [prime_divisors(n)[0] for n in (2..n)]
    A020639_list(97) # Peter Luschny, Jul 16 2012
    
  • Sage
    [trial_division(n) for n in (1..100)] # Giuseppe Coppoletta, May 25 2016
    
  • Scheme
    (define (A020639 n) (if (< n 2) n (let loop ((k 2)) (cond ((zero? (modulo n k)) k) (else (loop (+ 1 k))))))) ;; Antti Karttunen, Feb 01 2014
    

Formula

A014673(n) = a(A032742(n)); A115561(n) = a(A054576(n)). - Reinhard Zumkeller, Mar 10 2006
A028233(n) = a(n)^A067029(n). - Reinhard Zumkeller, May 13 2006
a(n) = A027746(n,1) = A027748(n,1). - Reinhard Zumkeller, Aug 27 2011
For n > 1: a(n) = A240694(n,2). - Reinhard Zumkeller, Apr 10 2014
a(n) = A000040(A055396(n)) = n / A032742(n). - Antti Karttunen, Mar 07 2017
a(n) has average order n/(2 log n) [Brouwer] - N. J. A. Sloane, Sep 03 2017

Extensions

Deleted wrong comment from M. Lagneau in 2012, following an observation by Gionata Neri. - M. F. Hasler, Aug 11 2015
Edited by M. F. Hasler, Nov 06 2017
Expanded definition to make this easier to find. - N. J. A. Sloane, Sep 21 2020

A027750 Triangle read by rows in which row n lists the divisors of n.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 2, 4, 1, 5, 1, 2, 3, 6, 1, 7, 1, 2, 4, 8, 1, 3, 9, 1, 2, 5, 10, 1, 11, 1, 2, 3, 4, 6, 12, 1, 13, 1, 2, 7, 14, 1, 3, 5, 15, 1, 2, 4, 8, 16, 1, 17, 1, 2, 3, 6, 9, 18, 1, 19, 1, 2, 4, 5, 10, 20, 1, 3, 7, 21, 1, 2, 11, 22, 1, 23, 1, 2, 3, 4, 6, 8, 12, 24, 1, 5, 25, 1, 2, 13, 26, 1, 3, 9, 27, 1, 2, 4, 7, 14, 28, 1, 29
Offset: 1

Views

Author

Keywords

Comments

Or, in the list of natural numbers (A000027), replace n with its divisors.
This gives the first elements of the ordered pairs (a,b) a >= 1, b >= 1 ordered by their product ab.
Also, row n lists the largest parts of the partitions of n whose parts are not distinct. - Omar E. Pol, Sep 17 2008
Concatenation of n-th row gives A037278(n). - Reinhard Zumkeller, Aug 07 2011
{A210208(n,k): k=1..A073093(n)} subset of {T(n,k): k=1..A000005(n)} for all n. - Reinhard Zumkeller, Mar 18 2012
Row sums give A000203. Right border gives A000027. - Omar E. Pol, Jul 29 2012
Indices of records are in A006218. - Irina Gerasimova, Feb 27 2013
The number of primes in the n-th row is omega(n) = A001221(n). - Michel Marcus, Oct 21 2015
The row polynomials P(n,x) = Sum_{k=1..A000005(n)} T(n,k)*x^k with composite n which are irreducible over the integers are given in A292226. - Wolfdieter Lang, Nov 09 2017
T(n,k) is also the number of parts in the k-th partition of n into equal parts (see example). - Omar E. Pol, Nov 20 2019
Let there be an infinite number of tiles, each labeled with a positive integer m, initially placed on square m of an infinite 1D board. At step n, the leftmost unblocked tile (i.e., the top tile of the leftmost nonempty stack) moves forward exactly m squares, where m is its label. Tiles that land on the same square form a stack, and only the top tile of any stack may move. This sequence records the label m of the tile that moves at step n. - Ali Sada, May 23 2025
All divisors of a positive integer n form a finite set. Extending divisibility to n = 0 by using the definition (k|n <=> exists m such that m*k = n) makes the set of divisors infinite, suggesting the definition was not intended for zero, as arithmetic functions typically apply to n >= 1. So to preserve a core property when generalizing (cardinality), one can define divisors of n >= 0 as the fixed points of the greatest common divisor on the set [n] = {0, 1, 2, ..., n}. By this definition, the divisors of 0 are {0}, since 0|0 and gcd(0, 0) = 0. This definition is not circular because the gcd can be effectively calculated using the Euclidean algorithm. (Cf. links.) - Peter Luschny, Jun 02 2025

Examples

			Triangle begins:
  1;
  1, 2;
  1, 3;
  1, 2, 4;
  1, 5;
  1, 2, 3, 6;
  1, 7;
  1, 2, 4, 8;
  1, 3, 9;
  1, 2, 5, 10;
  1, 11;
  1, 2, 3, 4, 6, 12;
  ...
For n = 6 the partitions of 6 into equal parts are [6], [3,3], [2,2,2], [1,1,1,1,1,1], so the number of parts are [1, 2, 3, 6] respectively, the same as the divisors of 6. - _Omar E. Pol_, Nov 20 2019
		

Crossrefs

Cf. A000005 (row length), A001221, A027749, A027751, A056534, A056538, A127093, A135010, A161700, A163280, A240698 (partial sums of rows), A240694 (partial products of rows), A247795 (parities), A292226, A244051.

Programs

  • Haskell
    a027750 n k = a027750_row n !! (k-1)
    a027750_row n = filter ((== 0) . (mod n)) [1..n]
    a027750_tabf = map a027750_row [1..]
    -- Reinhard Zumkeller, Jan 15 2011, Oct 21 2010
    
  • Magma
    [Divisors(n) : n in [1..20]];
    
  • Maple
    seq(op(numtheory:-divisors(a)), a = 1 .. 20) # Matt C. Anderson, May 15 2017
  • Mathematica
    Flatten[ Table[ Flatten [ Divisors[ n ] ], {n, 1, 30} ] ]
  • PARI
    v=List();for(n=1,20,fordiv(n,d,listput(v,d)));Vec(v) \\ Charles R Greathouse IV, Apr 28 2011
    
  • Python
    from sympy import divisors
    for n in range(1, 16):
        print(divisors(n)) # Indranil Ghosh, Mar 30 2017

Formula

a(A006218(n-1) + k) = k-divisor of n, 1 <= k <= A000005(n). - Reinhard Zumkeller, May 10 2006
T(n,k) = n / A056538(n,k) = A056538(n,n-k+1), 1 <= k <= A000005(n). - Reinhard Zumkeller, Sep 28 2014

Extensions

More terms from Scott Lindhurst (ScottL(AT)alumni.princeton.edu)

A007955 Product of divisors of n.

Original entry on oeis.org

1, 2, 3, 8, 5, 36, 7, 64, 27, 100, 11, 1728, 13, 196, 225, 1024, 17, 5832, 19, 8000, 441, 484, 23, 331776, 125, 676, 729, 21952, 29, 810000, 31, 32768, 1089, 1156, 1225, 10077696, 37, 1444, 1521, 2560000, 41, 3111696, 43, 85184, 91125, 2116, 47, 254803968, 343
Offset: 1

Views

Author

R. Muller

Keywords

Comments

All terms of this sequence occur only once. See the second T. D. Noe link for a proof. - T. D. Noe, Jul 07 2008
Every natural number has a unique representation in terms of divisor products. See the W. Lang link. - Wolfdieter Lang, Feb 08 2011
a(n) = n only if n is prime or 1 (or, if n is in A008578). - Alonso del Arte, Apr 18 2011
Sometimes called the "divisorial" of n. - Daniel Forgues, Aug 03 2012
a(n) divides EulerPhi(x^n-y^n) (see A. Rotkiewicz link). - Michel Marcus, Dec 15 2012
The proof that all the terms of this sequence occur only once (mentioned above) was given by Niven in 1984. - Amiram Eldar, Aug 16 2020

Examples

			Divisors of 10 = [1, 2, 5, 10]. So, a(10) = 2*5*10 = 100. - _Indranil Ghosh_, Mar 22 2017
		

References

  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 1, p. 57.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 83.

Crossrefs

Cf. A000203 (sums of divisors).
Cf. A000010 (comments on product formulas).

Programs

  • GAP
    List(List([1..50],n->DivisorsInt(n)),Product); # Muniru A Asiru, Feb 17 2019
  • Haskell
    a007955 = product . a027750_row  -- Reinhard Zumkeller, Feb 06 2012
    
  • Magma
    f := function(n); t1 := &*[d : d in Divisors(n) ]; return t1; end function;
    
  • Maple
    A007955 := proc(n) mul(d,d=numtheory[divisors](n)) ; end proc: # R. J. Mathar, Mar 17 2011
    seq(isqrt(n^numtheory[tau](n)), n=1..50); # Gary Detlefs, Feb 15 2019
  • Mathematica
    Array [ Times @@ Divisors[ # ]&, 100 ]
    a[n_] := n^(DivisorSigma[0, n]/2); Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Nov 21 2013 *)
  • PARI
    a(n)=if(issquare(n,&n),n^numdiv(n^2),n^(numdiv(n)/2)) \\ Charles R Greathouse IV, Feb 11 2011
    
  • Python
    from sympy import prod, divisors
    print([prod(divisors(n)) for n in range(1, 51)]) # Indranil Ghosh, Mar 22 2017
    
  • Python
    from math import isqrt
    from sympy import divisor_count
    def A007955(n):
        d = divisor_count(n)
        return isqrt(n)**d if d % 2 else n**(d//2) # Chai Wah Wu, Jan 05 2022
    
  • Sage
    [prod(divisors(n)) for n in (1..100)] # Giuseppe Coppoletta, Dec 16 2014
    
  • Sage
    [n^(sigma(n,0)/2) for n in (1..49)] # Stefano Spezia, Jul 14 2025
    
  • Scheme
    ;; A naive stand-alone implementation:
    (define (A007955 n) (let loop ((d n) (m 1)) (cond ((zero? d) m) ((zero? (modulo n d)) (loop (- d 1) (* m d))) (else (loop (- d 1) m)))))
    ;; Faster, if A000005 and A000196 are available:
    (define (A007955 n) (A000196 (expt n (A000005 n))))
    ;; Antti Karttunen, Mar 22 2017
    

Formula

a(n) = n^(d(n)/2) = n^(A000005(n)/2). Since a(n) = Product_(d|n) d = Product_(d|n) n/d, we have a(n)*a(n) = Product_(d|n) d*(n/d) = Product_(d|n) n = n^(tau(n)), whence a(n) = n^(tau(n)/2).
a(p^k) = p^A000217(k). - Enrique Pérez Herrero, Jul 22 2011
a(n) = A078599(n) * A178649(n). - Reinhard Zumkeller, Feb 06 2012
a(n) = A240694(n, A000005(n)). - Reinhard Zumkeller, Apr 10 2014
From Antti Karttunen, Mar 22 2017: (Start)
a(n) = A000196(n^A000005(n)). [From the original formula.]
A001222(a(n)) = A069264(n). [See Geoffrey Critzer's Feb 03 2015 comment in the latter sequence.]
A046523(a(n)) = A283995(n).
(End)
a(n) = Product_{k=1..n} gcd(n,k)^(1/phi(n/gcd(n,k))) = Product_{k=1..n} (n/gcd(n,k))^(1/phi(n/gcd(n,k))) where phi = A000010. - Richard L. Ollerton, Nov 07 2021
From Bernard Schott, Jan 11 2022: (Start)
a(n) = n^2 iff n is in A007422.
a(n) = n^3 iff n is in A162947.
a(n) = n^4 iff n is in A111398.
a(n) = n^5 iff n is in A030628.
a(n) = n^(3/2) iff n is in A280076. (End)
From Amiram Eldar, Oct 29 2022: (Start)
a(n) = n * A007956(n).
Sum_{k=1..n} 1/a(k) ~ log(log(n)) + c + O(1/log(n)), where c is a constant (Weiyi, 2004; Sandor and Crstici, 2004). (End)
a(n) = Product_{k=1..n} (n * (1 - ceiling(n/k - floor(n/k))))/k + ceiling(n/k - floor(n/k)). - Adriano Steffler, Feb 08 2024

A007956 Product of the proper divisors of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 6, 1, 8, 3, 10, 1, 144, 1, 14, 15, 64, 1, 324, 1, 400, 21, 22, 1, 13824, 5, 26, 27, 784, 1, 27000, 1, 1024, 33, 34, 35, 279936, 1, 38, 39, 64000, 1, 74088, 1, 1936, 2025, 46, 1, 5308416, 7, 2500, 51, 2704, 1, 157464, 55, 175616, 57, 58, 1, 777600000, 1, 62, 3969, 32768, 65
Offset: 1

Views

Author

R. Muller

Keywords

Comments

From Bernard Schott, Feb 01 2019: (Start)
a(n) = 1 iff n = 1 or n is prime.
a(n) = n when n > 1 iff n has exactly four divisors, equally, iff n is either the cube of a prime or the product of two different primes, so iff n belongs to A030513 (very nice proof in Sierpiński).
a(p^3) = 1 * p * p^2 = p^3; a(p*q) = 1 * p * q = p*q.
As a(1) = 1, {1} Union A030513 = A007422, fixed points of this sequence. (End)

Examples

			a(18) = 1 * 2 * 3 * 6 * 9 = 324. - _Bernard Schott_, Jan 31 2019
		

References

  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 1, p. 57.
  • Wacław Sierpiński, Elementary Theory of Numbers, Ex. 2 p. 174, Warsaw, 1964.

Crossrefs

Cf. A007422 (fixed points). A030513 (subsequence).
Cf. A001065 (sums of proper divisors).

Programs

  • Haskell
    a007956 = product . a027751_row
    -- Reinhard Zumkeller, Feb 04 2013, Nov 02 2011
    
  • Maple
    A007956 := n -> mul(i,i=op(numtheory[divisors](n) minus {1,n}));
    seq(A007956(i), i=1..79); # Peter Luschny, Mar 22 2011
  • Mathematica
    Table[Times@@Most[Divisors[n]], {n, 65}] (* Alonso del Arte, Apr 18 2011 *)
    a[n_] := n^(DivisorSigma[0, n]/2 - 1); Table[a[n], {n, 1, 65}] (* Jean-François Alcover, Oct 07 2013 *)
  • PARI
    A007956(n) = local(a);a=1;fordiv(n,d,a=a*d);a/n \\ Michael B. Porter, Dec 01 2009
    
  • PARI
    a(n)=my(k); if(issquare(n, &k), k^(numdiv(n)-2), n^(numdiv(n)/2-1)) \\ Charles R Greathouse IV, Oct 15 2015
    
  • Python
    from math import isqrt
    from sympy import divisor_count
    def A007956(n): return isqrt(n)**(d-2) if (d:=divisor_count(n))&1 else n**((d>>1)-1) # Chai Wah Wu, Jun 18 2023

Formula

a(n) = A007955(n)/n = n^(A000005(n)/2-1) = sqrt(n^(number of factors of n other than 1 and n)).
a(n) = Product_{k=1..A000005(n)-1} A027751(n,k). - Reinhard Zumkeller, Feb 04 2013
a(n) = A240694(n, A000005(n)-1) for n > 1. - Reinhard Zumkeller, Apr 10 2014
Sum_{k=1..n} 1/a(k) ~ pi(n) + log(log(n))^2 + c_1*log(log(n)) + c_2 + O(log(log(n))/log(n)), where pi(n) = A000720(n) and c_1 and c_2 are constants (Weiyi, 2004; Sandor and Crstici, 2004). - Amiram Eldar, Oct 29 2022

Extensions

More terms from Scott Lindhurst (ScottL(AT)alumni.princeton.edu)

A240698 Partial sums of divisors of n, cf. A027750.

Original entry on oeis.org

1, 1, 3, 1, 4, 1, 3, 7, 1, 6, 1, 3, 6, 12, 1, 8, 1, 3, 7, 15, 1, 4, 13, 1, 3, 8, 18, 1, 12, 1, 3, 6, 10, 16, 28, 1, 14, 1, 3, 10, 24, 1, 4, 9, 24, 1, 3, 7, 15, 31, 1, 18, 1, 3, 6, 12, 21, 39, 1, 20, 1, 3, 7, 12, 22, 42, 1, 4, 11, 32, 1, 3, 14, 36, 1, 24, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 10 2014

Keywords

Comments

Triangle read by rows in which row n lists the partial sums of divisors of n. - Omar E. Pol, Apr 12 2014

Examples

			.    n |  n-th row of A240698   |  n-th row of A027750
.  ----+------------------------+---------------------
.    1 |  1                     |  1
.    2 |  1, 3                  |  1, 2
.    3 |  1, 4                  |  1, 3
.    4 |  1, 3, 7               |  1, 2, 4
.    5 |  1, 6                  |  1, 5
.    6 |  1, 3, 6, 12           |  1, 2, 3, 6
.    7 |  1, 8                  |  1, 7
.    8 |  1, 3, 7, 15           |  1, 2, 4, 8
.    9 |  1, 4, 13              |  1, 3, 9
.   10 |  1, 3, 8, 18           |  1, 2, 5, 10
.   11 |  1, 12                 |  1, 11
.   12 |  1, 3, 6, 10, 16, 28   |  1, 2, 3, 4, 6, 12
.   13 |  1, 14                 |  1, 13 .
		

Crossrefs

Cf. A000005 (row lengths), A240694.

Programs

  • Haskell
    a240698 n k = a240698_tabf !! (n-1) !! (k-1)
    a240698_row n = a240698_tabf !! (n-1)
    a240698_tabf = map (scanl1 (+)) a027750_tabf
    
  • Mathematica
    Table[Accumulate[Divisors[n]],{n,30}]//Flatten (* Harvey P. Dale, Dec 30 2019 *)
  • PARI
    row(n) = my(d=divisors(n)); vector(#d, k, sum(i=1, k, d[i])); \\ Michel Marcus, Jan 24 2022

Formula

T(n,1) = 1, T(n,k) = T(n,k-1) + A027750(n,k), 1 < k <= n.
T(n,1) = 1;
T(n,A000005(n)) = A000203(n);
T(n,A000005(n)-1) = A001065(n), n > 1.

A076933 Final number obtained when n is divided by its divisors starting from the smallest one in increasing order until one no longer gets an integer.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 10, 1, 1, 1, 1, 5, 1, 1, 14, 1, 1, 1, 4, 1, 1, 1, 6, 1, 1, 1, 1, 1, 7, 1, 22, 3, 1, 1, 2, 7, 5, 1, 26, 1, 9, 1, 1, 1, 1, 1, 10, 1, 1, 3, 1, 1, 11, 1, 34, 1, 1, 1, 3, 1, 1, 5, 38, 1, 13, 1, 2, 3, 1, 1, 14, 1, 1, 1, 11, 1, 3, 1, 46, 1, 1, 1, 4, 1, 7, 33
Offset: 1

Views

Author

Amarnath Murthy, Oct 18 2002

Keywords

Comments

a(n) = 1 if n = p, n = p^3, n = p*q or n = k! for some k, or n = p*q*r where the product of two primes is more than the third, where p q and r are primes. Question: What is the longest string of ones in this sequence? Subsidiary sequence: Index of the start of the first occurrence of a string of n ones.
Concerning this question, see also A329549. Furthermore as a(8k+4) > 1 such a string can have at most length 7. - David A. Corneth, Nov 16 2019

Examples

			a(12) = 2: the divisors of 12 in increasing order are 1,2,3,4,6,12. and 12/1 = 12, 12/2 = 6, 6/3 = 2 that is the final integer, as the next divisor 4 > 2.
		

Crossrefs

Cf. A240694 (partial products of divisors of n), A329377 (number of iterations needed to reach the final number), A329549.

Programs

  • Maple
    for i from 1 to 200 do d := sort(convert(divisors(i),list)):j := 1:g := i: while((g mod d[j])=0) do g := g/d[j]:j := j+1: if(j>nops(d)) then break:fi: od:a[i] := g:od:seq(a[k],k=1..200);
  • PARI
    A076933(n) = { my(k=n); fordiv(k,d,if(n%d,return(n),n /= d)); (n); }; \\ Antti Karttunen, Nov 16 2019

Extensions

More terms from Sascha Kurz, Jan 21 2003

A329377 Number of iterations done when n is divided by its divisors starting from the smallest one in increasing order until one no longer gets an integer, or until divisors are exhausted.

Original entry on oeis.org

1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 2, 3, 2, 2, 3, 3, 2, 4, 2, 3, 3, 2, 2, 4, 2, 3, 3, 3, 3, 3, 2, 3, 3, 4, 2, 3, 2, 2, 3, 3, 2, 4, 2, 3, 3, 2, 2, 3, 3, 4, 3, 3, 2, 3, 2, 3, 3, 4, 3, 3, 2, 2, 3, 4, 2, 4, 2, 3, 3, 2, 3, 3, 2, 4, 3, 3, 2, 3, 3, 3, 3, 3, 2, 4, 3, 2, 3, 3, 3, 4, 2, 3, 2, 2, 2, 3, 2, 3, 4
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2019

Keywords

Examples

			For n = 12, its divisors are [1, 2, 3, 4, 6, 12]. We can divide only three times so that the quotient remains an integer: 12/1 = 12, 12/2 = 6, 6/3 = 2 (but 2/4 = 1/2, a fraction). Thus a(12) = 3.
For n = 24, its divisors are [1, 2, 3, 4, 6, 8, 12, 24]. We can divide only four times so that the quotient remains an integer: 24/1 = 24, 24/2 = 12, 12/3 = 4, 4/4 = 1, but on the fifth time 1/6 would be a rational, thus a(24) = 4.
		

Crossrefs

Cf. A000142, A076933 (final integer reached), A240694.

Programs

  • PARI
    A329377(n) = { my(k=n,i=0); fordiv(k, d, if(n%d, return(i)); n /= d; i++); (i); };

Formula

a(A000142(n)) = n.

A329549 Numbers 4*k such that 1 is the last integer obtained when 4*k is successively divided by its divisors in increasing order.

Original entry on oeis.org

8, 24, 40, 56, 64, 120, 144, 280, 320, 448, 704, 720, 832, 1008, 1024, 1152, 2240, 3200, 4928, 5040, 5760, 5824, 6272, 8064, 9152, 10368, 11264, 13312, 17408, 19456, 22400, 23552, 29696, 31744, 32768, 35200, 40320, 41600, 51200, 51840, 64064, 68992, 72576, 81536, 100352, 114048
Offset: 1

Views

Author

David A. Corneth, Nov 16 2019

Keywords

Comments

At sequence A076933, the question is asked: "What is the longest string of ones in this sequence?" As A076933(4*n) is rarely 1, such a string is not very long. The longest starting below 4*10^8 has length 6 and starts at 141. Checking multiples of 4 may help in finding longer such strings.
Terms are also a multiple of 8. Proof: If m = 8*k + 4 then its divisors are 1, 2, 4 (and maybe 3). After dividing by 4 we have a fraction with denominator 2. Before that we did not see 1.

Examples

			The divisors of 8 are 1, 2, 4 and 8. Dividing from left to right gives 8/1 = 8, 8/2 = 4, 4/4 = 1, and then 1/8 isn't an integer so as the last integer we see is 1, 8 is in the sequence.
		

Crossrefs

Cf. A076933, A240694 (partial products of divisors of n).
Subsequence of A008586 (multiples of 4) and of A008590 (multiples of 8).
Showing 1-8 of 8 results.