login

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 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A268045
Least number k > 1 such that C(n+k,n) is squarefree.
1
2, 2, 2, 2, 2, 2, 4, 4, 3, 2, 2, 2, 2, 2, 9, 8, 3, 6, 2, 2, 2, 2, 36, 36, 20, 18, 36, 2, 2, 2, 16, 16, 2, 2, 3, 12, 2, 2, 4, 4, 2, 2, 2, 4, 3, 2, 16, 896, 175, 10, 2, 2, 9, 9, 4, 4, 2, 2, 2, 2, 2, 256, 417, 32, 2, 2, 2, 2, 2, 2, 4, 36, 2, 5, 5, 2, 2, 2, 81, 136, 135, 2
OFFSET
0,1
COMMENTS
By theorem 6 of the Granville-Ramaré link, a(n) exists for all n. - Robert Israel, Mar 01 2016
LINKS
MAPLE
F:= proc(n)
local F, k;
if numtheory:-issqrfree((n+2)*(n+1)/2) then return 2 fi;
F:= ifactor((n+2)*(n+1)/2);
for k from 3 do
F:= F * ifactor(n+k)/ifactor(k);
if not hastype(F, `^`) then return k fi
od:
end proc:
map(F, [$0..100]); # Robert Israel, Jan 26 2016
MATHEMATICA
Table[k = 2; While[! SquareFreeQ@ Binomial[n + k, n], k++]; k, {n, 0, 81}] (* Michael De Vlieger, Jan 27 2016 *)
PROG
(PARI) findk(n) = {my(k=2); while (! issquarefree(binomial(n+k, n)), k++); k; } \\ Michel Marcus, Jan 26 2016
(PARI) b(n, p)=my(s); while(n\=p, s+=n); s
ok(n, k)=forprime(p=2, sqrtint(n+k), if(b(n+k, p)-b(k, p)-b(n, p)>1, return(0))); 1
a(n)=my(k=1); while(!ok(n, k++), ); k \\ Charles R Greathouse IV, Feb 18 2016
(Python)
from __future__ import division
from collections import Counter
from sympy import factorint
def A268045(n):
if n == 0:
return 2
flist, k = Counter(factorint((n+2)*(n+1)//2)), 2
while max(flist.values()) >= 2:
k += 1
flist += Counter(factorint(n+k))
flist -= Counter(factorint(k))
return k # Chai Wah Wu, Feb 17 2016
CROSSREFS
Sequence in context: A168514 A326353 A060447 * A118177 A105069 A172008
KEYWORD
nonn
AUTHOR
Gionata Neri, Jan 25 2016
STATUS
approved