OFFSET
1,3
COMMENTS
For n >= 8 [a(8) = 24], the terms seem to be given by A007283(n-5), i.e. as 3 * 2^(n-5).
PROG
(PARI)
A249695(n) = { for(p=2, 3, for(k=0, floor(n/2), if((0==(binomial(n, k)%(p*p))), return(k)))); return(0); } \\ Unoptimized and straightforward.
A249695(n) = { for(p=2, 3, my(o=0); for(k=1, n\2, o+=valuation((n-k+1)/k, p); if(o>1, return(k)))); return(0); } \\ Better to use this. Based on Charles R Greathouse IV's PARI-code for A249441.
CROSSREFS
KEYWORD
nonn
AUTHOR
Charles R Greathouse IV & Antti Karttunen, Nov 04 2014
STATUS
approved