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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A067131 Number of elements in the largest set of divisors of n which are in arithmetic progression. 5
1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 4, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 4, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 2, 4, 2, 2, 2, 3, 2, 3, 2, 2, 3, 2, 2, 4, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 6, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 4, 2, 2, 3, 2, 2, 3, 2, 3, 2, 2, 2, 4, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = A061395(A319354(n)). - Antti Karttunen, Sep 21 2018
EXAMPLE
a(12) = 4 as the divisors of 12 are {1,2,3,4,6,12} and the maximal subset in arithmetic progression is {1,2,3,4}. a(15) = 3; the maximal set is {1,3,5}.
MATHEMATICA
lap[s_] := Module[{}, l=Length[s]; If[l<2, Return[l]]; val=2; For[i=1, i<l, i++, For[j=i+1, j<=l, j++, For[k=2, MemberQ[s, k*s[[j]]-(k-1)s[[i]]], k++, Null]; If[k>val, val=k]]]; val]; lap/@Divisors/@Range[1, 200]
PROG
(PARI) A067131(n) = { my(d=divisors(n), m=1); for(i=1, (#d-1), for(j=(i+1), #d, my(c=1, k=d[j], s=(d[j]-d[i])); while(!(n%k), k+=s; c++); m = max(m, c))); (m); }; \\ Antti Karttunen, Sep 21 2018
CROSSREFS
Sequence in context: A020649 A362366 A183024 * A094915 A217619 A187186
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Jan 09 2002
EXTENSIONS
Edited by Dean Hickerson, Jan 15 2002
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 27 20:20 EDT 2024. Contains 373753 sequences. (Running on oeis4.)