cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A336399 a(1) = 1, a(n) is the smallest number such that the concatenation a(1)a(2)...a(n) is divisible by lcm(1..n).

This page as a plain text file.
%I A336399 #43 Jan 29 2025 19:36:49
%S A336399 1,0,2,0,0,0,360,0,1680,0,35280,0,332640,0,0,0,8648640,0,306306000,0,
%T A336399 0,0,232792560,0,0,0,26771144400,0,481880599200,0,41923612130400,0,0,
%U A336399 0,0,0,5487335009956800,0,0,0,245774847024907200,0,8105227020364874400,0,0,0,452140231622516236800,0,3984485791173424336800,0
%N A336399 a(1) = 1, a(n) is the smallest number such that the concatenation a(1)a(2)...a(n) is divisible by lcm(1..n).
%H A336399 Robert Israel, <a href="/A336399/b336399.txt">Table of n, a(n) for n = 1..2297</a>
%H A336399 David A. Corneth, <a href="/A336399/a336399.gp.txt">PARI program</a>
%e A336399 a(7) = 360 as the smallest positive integer k such that the concatenation a(1)a(2)..a(6)k is divisible by lcm(1..7) = 420. - _David A. Corneth_, Jul 21 2020
%p A336399 N:= 1: R:= 1: C:= 1:
%p A336399 for n from 2 to 60 do
%p A336399   N:= ilcm(N,n);
%p A336399   for d from 1 do
%p A336399     x:= -C*10^d mod N;
%p A336399     if x = 0 then lx:= 1 else lx:= 1+ilog10(x) fi;
%p A336399     if lx = d then
%p A336399        R:= R,x;
%p A336399        C:= C*10^d+x;
%p A336399        break
%p A336399     elif lx < d then
%p A336399        k:= ceil((10^(d-1)-x)/N);
%p A336399        x:= x + k*N;
%p A336399        if x < 10^d then
%p A336399          R:= R,x;
%p A336399          C:= C*10^d+x;
%p A336399          break
%p A336399     fi fi
%p A336399 od; od:
%p A336399 R; # _Robert Israel_, Sep 16 2020
%o A336399 (PARI) a(n) = {if(n==1,return(1));for(n1 = 0, oo, ; k[n]=eval(concat(Str(k[n-1]), n1)); n2=0; for(n3 = 1, n, if(k[n] % n3 == 0, n2+=1; if(n2==n, return(k[n])))))};
%o A336399 k = vector(10000);print1(k[1]=1,", ");for(j=1, 20, print1(a(j+1) - a(j)*10^(length(Str(a(j+1))) - length(Str(a(j)))), ", "))
%o A336399 (PARI) \\ See Corneth link. _David A. Corneth_, Jul 21 2020
%Y A336399 Cf. A336401 (corresponding numbers), A003418 (LCM's).
%Y A336399 Cf. A045874, A051883, A078282, A078283, A214437.
%K A336399 base,nonn
%O A336399 1,3
%A A336399 _Eder Vanzei_, Jul 20 2020
%E A336399 a(27)-a(50) from _David A. Corneth_, Jul 20 2020