The OEIS is supported by the many generous donors to the OEIS Foundation.

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A055874 a(n) = largest m such that 1, 2, ..., m divide n. 42
 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS From Antti Karttunen, Nov 20 2013 & Jan 26 2014: (Start) Differs from A232098 for the first time at n=840, where a(840)=8, while A232098(840)=7. A232099 gives all the differing positions. See also the comments at A055926 and A232099. The positions where a(n) is an odd prime is given by A017593 up to A017593(34)=414 (so far all 3's), after which comes the first 7 at a(420). (A017593 gives the positions of 3's.) (Continued on Jan 26 2014): Only terms of A181062 occur as values. A235921 gives such n where a(n^2) (= A235918(n)) differs from A071222(n-1) (= A053669(n)-1). (End) a(n) is the largest m such that A003418(m) divides n. - David W. Wilson, Nov 20 2014 a(n) is the largest number of consecutive integers dividing n. - David W. Wilson, Nov 20 2014 A051451 gives indices where record values occur. - Gionata Neri, Oct 17 2015 LINKS Antti Karttunen, Table of n, a(n) for n = 1..10080 Bakir Farhi, On the average asymptotic behavior of a certain type of sequences of integers, Integers, Vol. 9 (2009), pp. 555-567. FORMULA a(n) = A007978(n) - 1. - Antti Karttunen, Jan 26 2014 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A064859 (Farhi, 2009). - Amiram Eldar, Jul 25 2022 EXAMPLE a(12) = 4 because 1, 2, 3, 4 divide 12, but 5 does not. MAPLE N:= 1000: # to get a(1) to a(N) A:= Vector(N, 1); for m from 2 do Lm:= ilcm(\$1..m); if Lm > N then break fi; if Lm mod (m+1) = 0 then next fi; for k from 1 to floor(N/Lm) do A[k*Lm]:=m od od: convert(A, list); # Robert Israel, Nov 28 2014 MATHEMATICA a[n_] := Module[{m = 1}, While[Divisible[n, m++]]; m - 2]; Array[a, 100] (* Jean-François Alcover, Mar 07 2016 *) PROG (Haskell) a055874 n = length \$ takeWhile ((== 0) . (mod n)) [1..] -- Reinhard Zumkeller, Feb 21 2012, Dec 09 2010 (Scheme) (define (A055874 n) (let loop ((m 1)) (if (not (zero? (modulo n m))) (- m 1) (loop (+ 1 m))))) ;; Antti Karttunen, Nov 18 2013 (PARI) a(n) = my(m = 1); while ((n % m) == 0, m++); m - 1; \\ Michel Marcus, Jan 17 2014 (Python) from itertools import count def A055874(n): for m in count(1): if n % m: return m-1 # Chai Wah Wu, Jan 02 2022 CROSSREFS One less than A007978. Cf. also A053669, A055881, A055926, A017593, A064859, A181062, A126800, A232098, A232099, A233284, A235918, A235921. Sequence in context: A332202 A204917 A232098 * A195155 A178544 A161506 Adjacent sequences: A055871 A055872 A055873 * A055875 A055876 A055877 KEYWORD easy,nonn AUTHOR Leroy Quet, Jul 16 2000 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 3 08:35 EST 2022. Contains 358515 sequences. (Running on oeis4.)