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.

Showing 1-3 of 3 results.

A144688 "Magic" numbers: all numbers from 0 to 9 are magic; a number >= 10 is magic if it is divisible by the number of its digits and the number obtained by deleting the final digit is also magic.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 102, 105, 108, 120, 123, 126, 129, 141, 144, 147, 162, 165, 168, 180
Offset: 1

Views

Author

N. J. A. Sloane, based on email from Roberto Bosch Cabrera, Feb 02 2009

Keywords

Comments

Roberto Bosch Cabrera finds that there are exactly 20457 terms. (Total corrected by Zak Seidov, Feb 08 2009.)
The 20457th and largest term is the 25-digit number 3608528850368400786036725. - Zak Seidov, Feb 08 2009
a(n) is also the number such that every k-digit substring ( k <= n ) taken from the left, is divisible by k. - Gaurav Kumar, Aug 28 2009
A probabilistic estimate for the number of terms with k digits for the corresponding sequence in base b is b^k/k!, giving an estimate of e^b total terms. For this sequence, the estimate is approximately 22026, compared to the actual value of 20457. - Franklin T. Adams-Watters, Jul 18 2012
Numbers such that their first digit is divisible by 1, their first two digits are divisible by 2, and so on. - Charles R Greathouse IV, May 21 2013
These numbers are also called polydivisible numbers, because so many of their digits are divisible. - Martin Renner, Mar 05 2016
The unique zeroless pandigital (A050289) term, also called penholodigital, is a(7286) = 381654729 (see Penguin reference); so, the unique pandigital term (A050278) is a(9778) = 3816547290. - Bernard Schott, Feb 07 2022

Examples

			102 has three digits, 102 is divisible by 3, and 10 is also magic, so 102 is a member.
		

References

  • Robert Bosch, Tale of a Problem Solver, Arista Publishing, Miami FL, 2016.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Revised Edition), Penguin Books, 1997, entry 381654729, page 185.

Crossrefs

A subsequence of A098952.

Programs

  • Maple
    P1:={seq(i,i=1..9)}:
    for i from 2 to 25 do
      P||i:={}:
      for n from 1 to nops(P||(i-1)) do
        for j from 0 to 9 do
          if P||(i-1)[n]*10+j mod i = 0 then P||i:={op(P||i),P||(i-1)[n]*10+j}: fi:
        od:
      od:
    od:
    `union`({0},seq(P||i,i=1..25)); # Martin Renner, Mar 05 2016
  • Mathematica
    divQ[n_]:=Divisible[n,IntegerLength[n]];
    lessQ[n_]:=FromDigits[Most[IntegerDigits[n]]];
    pdQ[n_]:=If[Or[n<10,And[divQ[n],divQ[lessQ[n]]]],True];
    Select[Range[0,180],pdQ[#]&] (* Ivan N. Ianakiev, Aug 23 2016 *)
  • Python
    def agen(): # generator of terms
        yield 0
        magic, biggermagic, digits = list(range(1, 10)), [], 2
        while len(magic) > 0:
            yield from magic
            for i in magic:
                for d in range(10):
                    t = 10*i + d
                    if t%digits == 0:
                        biggermagic.append(t)
            magic, biggermagic, digits = biggermagic, [], digits+1
    print([an for an in agen()][:70]) # Michael S. Branicky, Feb 07 2022

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).

Original entry on oeis.org

1, 0, 2, 0, 0, 0, 360, 0, 1680, 0, 35280, 0, 332640, 0, 0, 0, 8648640, 0, 306306000, 0, 0, 0, 232792560, 0, 0, 0, 26771144400, 0, 481880599200, 0, 41923612130400, 0, 0, 0, 0, 0, 5487335009956800, 0, 0, 0, 245774847024907200, 0, 8105227020364874400, 0, 0, 0, 452140231622516236800, 0, 3984485791173424336800, 0
Offset: 1

Views

Author

Eder Vanzei, Jul 20 2020

Keywords

Examples

			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
		

Crossrefs

Cf. A336401 (corresponding numbers), A003418 (LCM's).

Programs

  • Maple
    N:= 1: R:= 1: C:= 1:
    for n from 2 to 60 do
      N:= ilcm(N,n);
      for d from 1 do
        x:= -C*10^d mod N;
        if x = 0 then lx:= 1 else lx:= 1+ilog10(x) fi;
        if lx = d then
           R:= R,x;
           C:= C*10^d+x;
           break
        elif lx < d then
           k:= ceil((10^(d-1)-x)/N);
           x:= x + k*N;
           if x < 10^d then
             R:= R,x;
             C:= C*10^d+x;
             break
        fi fi
    od; od:
    R; # Robert Israel, Sep 16 2020
  • 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])))))};
    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)))), ", "))
    
  • PARI
    \\ See Corneth link. David A. Corneth, Jul 21 2020

Extensions

a(27)-a(50) from David A. Corneth, Jul 20 2020

A336401 a(n) = a(n-1) concatenated with the smallest number k, such that a(n) is divisible by lcm(1..n).

Original entry on oeis.org

1, 10, 102, 1020, 10200, 102000, 102000360, 1020003600, 10200036001680, 102000360016800, 10200036001680035280, 102000360016800352800, 102000360016800352800332640, 1020003600168003528003326400
Offset: 1

Views

Author

Eder Vanzei, Jul 20 2020

Keywords

Crossrefs

Programs

  • PARI
    a(n)={if(n==1,return(1));for(n1=0,oo,k=eval(concat(Str(a(n-1)),n1));n2=0;for(n3=1,n,if(k%n3==0,n2+=1;if(n2==n,return(k)))))};
Showing 1-3 of 3 results.