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

%I #24 Dec 27 2017 02:08:40

%S 1,2,6,10,20,24,25,26,33,52,62,72,75,150,180,225,226,251,306,399,426,

%T 471,486,564,624,668,916,1152,1176,1302,1536,1575,1755,1935,1952,1954,

%U 2016,2160,2250,2340,2500,2513,2700,2776,2824,3328,3330,3408,3459,3528

%N 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.

%H Paolo P. Lava and Giovanni Resta, <a href="/A239542/b239542.txt">Table of n, a(n) for n = 1..10000</a> (first 100 terms from Paolo P. Lava)

%e 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.

%e 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.

%p with(numtheory);

%p S:=proc(s) local w; w:=convert(s, base, 10); sum(w[j], j=1..nops(w)); end:

%p 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 P:=proc(q) local a,b,c,j,n; a:=1; j:=1; print(1);

%p for n from 1 to q do b:=T(j); c:=a*10^b+j;

%p if type(c/S(c),integer) then a:=a*10^b+j; print(j); fi;

%p j:=j+1; od; print(); end: P(10^6);

%t 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 *)

%o (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;}

%o 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

%Y Cf. A005349, A130804, A239543.

%K nonn,base

%O 1,2

%A _Paolo P. Lava_, Mar 21 2014

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 19 15:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)