OFFSET
1,1
COMMENTS
The equation s*(s+n)-k = 0 has no integer solution for n = {52, 101, 102, 152, 206, 393, 408, 464, 473, 482,...} (See the proof with the sequence A190216).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 4 because k = {12, 42, 90, 156} and :
for k = 12, s = 3 and 3*(3+1) - 12 = 0 ;
for k = 42, s = 6 and 6*(6+1) - 42 = 0 ;
for k = 90, s = 9 and 9*(9+1) - 90 = 0 ;
for k = 156, s = 12 and 12*(12+1) - 156 = 0.
MAPLE
with(numtheory):for n from 1 to 500 do:s1:=0:for k from 1 to 30000 do l:=length(k):n0:=k:s:=0:for m from 1 to l do q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v:s:=s+u:od: if s*(s+n)=k then s1:=s1+1:else fi:od: printf(`%d, `, s1):od:
# Alternative:
N:= 500: # to get N terms
K:= ceil(fsolve(k/(9*log[10](k)) - 9*log[10](k) = N, k = 100 .. infinity)):
sd:= k -> convert(convert(k, base, 10), `+`):
A:= Vector(N):
for k from 1 to K do
sk:= sd(k);
n:= k/sk - sk;
if type(n, posint) and n <= N then
A[n]:= A[n]+1
fi
od:
seq(A[n], n=1..N); # Robert Israel, May 30 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, May 11 2011
STATUS
approved