OFFSET
1,2
COMMENTS
Equivalently, numbers m such that m divides binomial(m*(m+1),m). - David Wasserman, Sep 13 2004
Numbers m such that, whenever m is divisible by p^k for prime p, there are at least k carries in the base-p addition of m and m^2. - Robert Israel, May 10 2020
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Wikipedia, Kummer's theorem
EXAMPLE
m = 2: C(6, 3)/4 = 5, which is not divisible by 2, so 2 is not in the sequence.
m = 60: C(60*61, 61)/3600 has 130 digits and is divisible by 60, so 60 is in the sequence.
MAPLE
filter:= proc(n) local F, i, j, p, A, B, c, t, target;
F:= ifactors(n)[2];
for i from 1 to nops(F) do
p:= F[i][1];
target:= F[i][2];
t:= 0;
A:= convert(n, base, p);
B:= convert(n^2, base, p);
c:= 0;
for j from 1 to nops(A) while t < target do
if c + A[j] + B[j] >= p then
t:= t+1;
c:= 1;
else c:= 0
fi;
od;
if t >= target then next fi;
for j from nops(A)+1 to nops(B) while t < target do
if c + B[j] >= p then
t:= t+1;
c:= 1;
else break
fi;
od;
if t < target then return false fi
od;
true
end proc:
select(filter, [$1..10000]); # Robert Israel, May 10 2020
PROG
(PARI) count = 0; n = 0; while (count < 50, n = n + 1; works = 1; f = factor(n); for (k = 1, matsize(f)[1], p = f[k, 1]; pow = 0; for (i = 1, n, num = n*n + i; while (num%p == 0, pow = pow + 1; num = num/p); num = i; while (num%p == 0, pow = pow - 1; num = num/p)); if (pow < f[k, 2], works = 0)); if (works, print(n); count = count + 1))
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 30 2003
EXTENSIONS
More terms from David Wasserman, Sep 13 2004
STATUS
approved