login
A151995
a(1)=1; thereafter a(n) is smallest positive number not already in the sequence such that the sum a(1)+...+a(n) divides the concatenation a(1)...a(n).
4
1, 2, 6, 250488, 19986, 118030, 133970, 693810, 2231328, 3407286, 5733260, 25176334, 75529002, 1913932644, 2692452, 5413116264, 6766395330, 2492882490, 9544178676, 19819882608, 10086515692, 10541120510, 4147755864, 6025730266
OFFSET
1,2
EXAMPLE
1+2 (=3) divides 12 --> HIT
1+2+3 (=6) does not divide 123
1+2+4 (=7) does not divide 124
1+2+5 (=8) does not divide 125
1+2+6 (=9) divides 126 --> HIT
...
126250488 == (1+2+6+250488) * 504
...
The sum of the first 14 terms, 2027226147, divides their concatenation
1262504881998611803013397069381022313283407286573326025176334755290021913932644,
giving a quotient of
622774565071062988323520804204101612390759720490782533881916606559052.
MAPLE
g:= proc() local d, Q;
for d from 1 do
Q:= select(y -> y >= 10^(d-1)+s and y < 10^d + s, NumberTheory:-Divisors(10^d*c-s)) minus S;
if Q <> {} then return min(Q) - s fi
od
end proc:
s:= 1: c:= 1: R:= 1: S:= {1}:
for n from 2 to 15 do
x:= g(); s:= s + x; c:= 10^(1+ilog10(x))*c + x; S:= S union {x}; R:= R, x;
od:
R; # Robert Israel, Apr 21 2026
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
an, s, c = 1, 1, "1"
while True:
yield an
an = next(k for k in count(1) if int(c+str(k))%(s+k) == 0)
s, c = s+an, c+str(an)
print(list(islice(agen(), 11))) # Michael S. Branicky, Apr 21 2026
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Oct 07 2009, based on a posting to the Sequence Fans Mailing List by Eric Angelini, Sep 29 2009
EXTENSIONS
More terms from Jack Brennen, John W. Layman, Charles R Greathouse IV and Robert G. Wilson v, Sep 30 2009. Jack Brennen found a(14).
Definition corrected by Zak Seidov, Oct 08 2009
a(15)-a(24) from Donovan Johnson, Jul 20 2010
STATUS
approved