OFFSET
1,2
COMMENTS
Integer k is in this sequence if for every prime p|k, the base-p representation of (k-1)/2 is composed of digits not exceeding (p-1)/2.
Contains all odd primes. Composite terms are listed in A327756.
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000 (first 1000 terms of Harvey P. Dale)
EXAMPLE
21 is in the sequence because it is odd and binomial(20 - 1, (20 - 1)/2) = 2^2 * 11 * 13 * 17 * 19 which is coprime 3 * 7. - David A. Corneth, Mar 09 2024
MATHEMATICA
Select[Range[1, 401, 2], CoprimeQ[#, Binomial[#-1, (#-1)/2]]&] (* Harvey P. Dale, Feb 25 2024 *)
PROG
(PARI) is(n) = {
if(!bitand(n, 1), return(0));
my(f = factor(n), h = (n-1)/2, v);
for(i = 1, #f~,
v = val(n-1, f[i, 1]) - 2*val(h, f[i, 1]);
if(v > 0,
return(0)
)
); 1
}
val(n, p) = my(r=0); while(n, r+=n\=p); r \\ David A. Corneth, Mar 09 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Max Alekseyev, Sep 24 2019
STATUS
approved