login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239542 a(n) is the minimum number greater than a(n-1) such that the concatenation a(1) U a(2) U ... U a(n) is a Niven number, starting with a(1)=1. 2
1, 2, 6, 10, 20, 24, 25, 26, 33, 52, 62, 72, 75, 150, 180, 225, 226, 251, 306, 399, 426, 471, 486, 564, 624, 668, 916, 1152, 1176, 1302, 1536, 1575, 1755, 1935, 1952, 1954, 2016, 2160, 2250, 2340, 2500, 2513, 2700, 2776, 2824, 3328, 3330, 3408, 3459, 3528 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Paolo P. Lava and Giovanni Resta, Table of n, a(n) for n = 1..10000 (first 100 terms from Paolo P. Lava)
EXAMPLE
Starting with a(1)=1, the minimum number a(2)>a(1) such that a(1) U a(2) is a Niven number is 2. In fact 12 / 3 = 4.
Again, the minimum a(3)>a(2) such that a(1) U a(2) U a(3) is a Niven number is 6. In fact 126 / 9 = 14. Etc.
MAPLE
with(numtheory);
S:=proc(s) local w; w:=convert(s, base, 10); sum(w[j], j=1..nops(w)); end:
T:=proc(t) local w, x, y; x:=t; y:=0; while x>0 do x:=trunc(x/10); y:=y+1; od; end:
P:=proc(q) local a, b, c, j, n; a:=1; j:=1; print(1);
for n from 1 to q do b:=T(j); c:=a*10^b+j;
if type(c/S(c), integer) then a:=a*10^b+j; print(j); fi;
j:=j+1; od; print(); end: P(10^6);
MATHEMATICA
Nest[Append[#, Block[{k = Last@ # + 1}, While[! Divisible[FromDigits@ #, Total[#]] &[Flatten@ Map[IntegerDigits, #]~Join~IntegerDigits@ k], k++]; k]] &, {1}, 49] (* Michael De Vlieger, Dec 23 2017 *)
PROG
(PARI) ok(v, n, m) = {vd = []; for (k=1, n-1, vd = concat(vd, digits(v[k])); ); vd = concat(vd, digits(m)); svd = vecsum(vd); ivd = fromdigits(vd); ivd % svd == 0; }
lista(nn) = {v = vector(nn); v[1] = 1; for (n=2, nn, m = v[n-1]+1; while(!ok(v, n, m), m++); v[n] = m; ); v; } \\ Michel Marcus, Dec 21 2017
CROSSREFS
Sequence in context: A128165 A097646 A077084 * A007926 A320942 A168152
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Mar 21 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:36 EDT 2024. Contains 371970 sequences. (Running on oeis4.)