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.

A126800 Smallest divisor of n which is greater than largest divisor d of n such that each integer from 1 to d is also a divisor of n.

Original entry on oeis.org

3, 4, 5, 6, 7, 4, 3, 5, 11, 6, 13, 7, 3, 4, 17, 6, 19, 4, 3, 11, 23, 6, 5, 13, 3, 4, 29, 5, 31, 4, 3, 17, 5, 6, 37, 19, 3, 4, 41, 6, 43, 4, 3, 23, 47, 6, 7, 5, 3, 4, 53, 6, 5, 4, 3, 29, 59, 10, 61, 31, 3, 4, 5, 6, 67, 4, 3, 5, 71, 6, 73, 37, 3, 4, 7, 6, 79, 4
Offset: 3

Views

Author

Leroy Quet, Feb 21 2007

Keywords

Comments

a(n) is the smallest divisor of n which is greater than A055874(n).
a(n) is also the smallest divisor m, m > 1, of n where m - 1 is not a divisor of n.

Examples

			The divisors of 12 are 1, 2, 3, 4, 6, 12. The first four divisors are the first four positive integers, but 5 is not a divisor of 12, and the smallest divisor greater than 5 is 6, so a(12) = 6.
The divisors of 14 are 1, 2, 7, 14. The first two divisors are the first two positive integers, but 3 is not a divisor of 14, and the smallest divisor greater than 3 is 7, so a(14) = 7.
		

Crossrefs

Cf. A055874.

Programs

  • Maple
    A055874 := proc(n) local m; for m from 1 do if n mod m <> 0 then RETURN(m-1) ; fi ; od: end: A126800 := proc(n) local a; for a from A055874(n)+1 do if n mod a = 0 then RETURN(a) ; fi ; od: end: seq(A126800(n),n=3..80) ; # R. J. Mathar, Nov 01 2007
  • Mathematica
    sdn[n_]:=Module[{divs=Divisors[n],s,c},s=First[Split[Differences[divs]]];c=Length[s]+1;Which[PrimeQ[n],n,First[s]>1,divs[[2]],True,First[Drop[ divs,c]]]];Array[sdn,80,3] (* Harvey P. Dale, Jan 18 2015 *)
    Array[#[[1 + LengthWhile[Prepend[Differences@ #, 1], # == 1 &] ]] &@ Divisors@ # &, 78, 3] (* Michael De Vlieger, Oct 10 2017 *)

Formula

a(n) = n if n is an odd prime or if n = 4 or 6. - Alonso del Arte, Aug 07 2014

Extensions

More terms from R. J. Mathar, Nov 01 2007