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-9 of 9 results.

A034838 Numbers k that are divisible by every digit of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22, 24, 33, 36, 44, 48, 55, 66, 77, 88, 99, 111, 112, 115, 122, 124, 126, 128, 132, 135, 144, 155, 162, 168, 175, 184, 212, 216, 222, 224, 244, 248, 264, 288, 312, 315, 324, 333, 336, 366, 384, 396, 412, 424, 432, 444, 448
Offset: 1

Views

Author

Keywords

Comments

Subset of zeroless numbers A052382: Integers with at least one digit 0 (A011540) are excluded.
A128635(a(n)) = n.
Contains in particular all repdigits A010785 \ {0}. - M. F. Hasler, Jan 05 2020
The greatest term such that the digits are all different is the greatest Lynch-Bell number 9867312 = A115569(548) = A113028(10) [see Diophante link]. - Bernard Schott, Mar 18 2021
Named "nude numbers" by Katagiri (1982-83). - Amiram Eldar, Jun 26 2021

Examples

			36 is in the sequence because it is divisible by both 3 and 6.
48 is included because both 4 and 8 divide 48.
64 is not included because even though 4 divides 64, 6 does not.
		

References

  • Charles Ashbacher, Journal of Recreational Mathematics, Vol. 33 (2005), pp. 227. See problem number 2693.
  • Yoshinao Katagiri, Letter to the editor of the Journal of Recreational Mathematics, Vol. 15, No. 4 (1982-83).
  • Margaret J. Kenney and Stanley J. Bezuszka, Number Treasury 3: Investigations, Facts And Conjectures About More Than 100 Number Families, World Scientific, 2015, p. 175.
  • Thomas Koshy, Elementary Number Theory with Applications, Elsevier, 2007, p. 79.

Crossrefs

Intersection of A002796 (numbers divisible by each nonzero digit) and A052382 (zeroless numbers), or A002796 \ A011540 (numbers with digit 0).
Subsequence of A034709 (divisible by last digit).
Contains A007602 (multiples of the product of their digits) and subset A059405 (n is the product of its digits raised to positive powers), A225299 (divisible by square of each digit), and A066484 (n and its rotations are divisible by each digit).
Cf. A113028, A346267 (number of terms with n digits), A087140 (complement).
Supersequence of A115569 (with all different digits).

Programs

  • Haskell
    a034838 n = a034838_list !! (n-1)
    a034838_list = filter f a052382_list where
       f u = g u where
         g v = v == 0 || mod u d == 0 && g v' where (v',d) = divMod v 10
    -- Reinhard Zumkeller, Jun 15 2012, Dec 21 2011
    
  • Magma
    [n:n in [1..500]| not 0 in Intseq(n) and #[c:c in [1..#Intseq(n)]| n mod Intseq(n)[c] eq 0] eq #Intseq(n)] // Marius A. Burtea, Sep 12 2019
  • Maple
    a:=proc(n) local nn,j,b,bb: nn:=convert(n,base,10): for j from 1 to nops(nn) do b[j]:=n/nn[j] od: bb:=[seq(b[j],j=1..nops(nn))]: if map(floor,bb)=bb then n else fi end: 1,2,3,4,5,6,7,8,9,seq(seq(seq(a(100*m+10*n+k),k=1..9),n=1..9),m=0..6); # Emeric Deutsch
  • Mathematica
    divByEvryDigitQ[n_] := Block[{id = Union[IntegerDigits[n]]}, Union[ IntegerQ[ #] & /@ (n/id)] == {True}]; Select[ Range[ 487],  divByEvryDigitQ[#] &] (* Robert G. Wilson v, Jun 21 2005 *)
    Select[Range[500],FreeQ[IntegerDigits[#],0]&&AllTrue[#/ IntegerDigits[ #], IntegerQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 31 2019 *)
  • PARI
    is(n)=my(v=vecsort(eval(Vec(Str(n))),,8)); if(v[1]==0, return(0)); for(i=1, #v, if(n%v[i], return(0))); 1 \\ Charles R Greathouse IV, Apr 17 2012
    
  • PARI
    is_A034838(n)=my(d=Set(digits(n)));d[1]&&!forstep(i=#d,1,-1,n%d[i]&&return) \\ M. F. Hasler, Jan 10 2016
    
  • Python
    A034838_list = []
    for g in range(1,4):
        for n in product('123456789',repeat=g):
            s = ''.join(n)
            m = int(s)
            if not any(m % int(d) for d in s):
                A034838_list.append(m) # Chai Wah Wu, Sep 18 2014
    
  • Python
    for n in range(10**3):
        s = str(n)
        if '0' not in s:
            c = 0
            for i in s:
                if n%int(i):
                    c += 1
                    break
            if not c:
                print(n,end=', ') # Derek Orr, Sep 19 2014
    
  • Python
    # finite automaton accepting sequence (see comments in A346267)
    from math import gcd
    def lcm(a, b): return a * b // gcd(a, b)
    def inF(q): return q[0]%q[1] == 0
    def delta(q, c): return ((10*q[0]+c)%2520, lcm(q[1], c))
    def ok(n):
        q = (0, 1)
        for c in map(int, str(n)):
            if c == 0: return False # computation dies
            else: q = delta(q, c)
        return inF(q)
    print(list(filter(ok, range(450)))) # Michael S. Branicky, Jul 18 2021
    

A117911 Number of n-digit Lynch-Bell numbers.

Original entry on oeis.org

0, 9, 5, 30, 67, 84, 248, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Rick L. Shepherd, Apr 02 2006

Keywords

Comments

There are 548 Lynch-Bell numbers, listed in A115569; a(n)=0 for n>7.

Examples

			There are no (Lynch-Bell) numbers with zero digits.
The nine one-digit Lynch-Bell numbers are {1, ..., 9}.
The five two-digit Lynch-Bell numbers are {12, 15, 24, 36, 48}.
The seven-digit Lynch-Bell numbers are 105 permutations of (the digits of) 9867312, which is the largest possible Lynch-Bell number. (The digit 5 cannot appear since there is at least one even digit. Replacing any of the given 7 digits by a digit 4 yields numbers not divisible by 9, or not divisible by 3 if the 9 is replaced.)
		

Crossrefs

Cf. A115569.

Programs

Extensions

Extended to index 0, and some more zeros appended by M. F. Hasler, Jan 31 2016

A117912 Lynch-Bell numbers whose digits are all even.

Original entry on oeis.org

2, 4, 6, 8, 24, 48, 248, 264, 624, 648, 824, 864
Offset: 1

Views

Author

Rick L. Shepherd, Apr 02 2006

Keywords

Crossrefs

Cf. A115569, A117913 (same but digits are all odd).

A117913 Lynch-Bell numbers whose digits are all odd.

Original entry on oeis.org

1, 3, 5, 7, 9, 15, 135, 175, 315, 735, 1395, 1935, 3195, 3915, 9135, 9315
Offset: 1

Views

Author

Rick L. Shepherd, Apr 02 2006

Keywords

Comments

Equivalently, the odd Lynch-Bell numbers.

Crossrefs

Cf. A115569, A117912 (same but digits are all even).

A120673 Least number including digits 1,2,...,n and divisible by each of 1,2,...,n.

Original entry on oeis.org

1, 12, 132, 12324, 123540, 1234560, 122365740, 123487560, 1234759680
Offset: 1

Views

Author

Rick L. Shepherd, Jun 23 2006

Keywords

Comments

The first three terms are Lynch-Bell numbers (A115569).

Examples

			a(4) = 12324 as it is the least positive integer including at least one of each decimal digit 1, 2, 3 and 4, which is also divisible by each of these same numbers.
		

Crossrefs

Cf. A120674 (same but require distinct digits), A115569.

A120674 Least number with distinct digits including digits 1,2,...,n and divisible by each of 1,2,...,n.

Original entry on oeis.org

1, 12, 132, 12348, 123540, 1234560, 123487560, 123487560, 1234759680
Offset: 1

Views

Author

Rick L. Shepherd, Jun 23 2006

Keywords

Comments

The first three terms are Lynch-Bell numbers (A115569).

Examples

			a(4) = 12348 as it is the least positive integer with no duplicate digits, including at least one of each decimal digit 1, 2, 3 and 4 and which is also divisible by each of these same numbers. (12348 is not divisible by 8.).
		

Crossrefs

Cf. A120673 (same but digits need not be distinct), A115569.

A116957 Lynch-Bell numbers n such that 5 is a digit of n.

Original entry on oeis.org

5, 15, 135, 175, 315, 735, 1395, 1935, 3195, 3915, 9135, 9315
Offset: 1

Views

Author

Walter Kehowski, Apr 03 2006

Keywords

Comments

A Lynch-Bell number is a positive integer n with distinct nonzero digits such that each of its digits divides the number: n mod d = 0 if d is a digit of n.

Examples

			a(3)=135 since 135 is the third Lynch-Bell number that contains a 5.
		

Crossrefs

Programs

  • Mathematica
    lbn5Q[n_]:=Module[{idn=IntegerDigits[n]},MemberQ[idn,5]&&FreeQ[idn,0]&&Max[DigitCount[n]]==1&&AllTrue[n/idn,IntegerQ]]; Select[Range[ 10000],lbn5Q] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 19 2019 *)

A116960 Lynch-Bell numbers k such that 1 is not a digit of k.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 24, 36, 48, 248, 264, 324, 384, 396, 432, 624, 648, 672, 728, 735, 784, 824, 864, 936, 2364, 2436, 3264, 3276, 3492, 3624, 3648, 3864, 3924, 4236, 4368, 4392, 4632, 4872, 4896, 4932, 4968, 6324, 6384, 6432, 6984, 8496, 8736, 9324, 9432
Offset: 1

Views

Author

Walter Kehowski, Apr 03 2006

Keywords

Comments

The Lynch-Bell numbers are those positive integers k with distinct nonzero digits such that each digit divides k: k mod d = 0 if d is a digit of k.

Examples

			a(9)=24 since it is the 9th Lynch-Bell number that does not contain a 1.
		

Crossrefs

A117954 Reversible Lynch-Bell numbers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 216, 612, 2136, 2196, 2316, 2364, 2916, 4236, 4632, 4896, 6132, 6192, 6312, 6324, 6912, 6984, 21384, 42816, 48312, 61248, 61824, 84216, 213648, 213864, 213984, 219384, 234168, 234816, 236184, 238416, 291384, 293184, 428136, 468312, 481392, 481632, 483192, 483216, 483912, 489312, 612384, 614328, 614832, 618432, 631248, 631824, 823416, 842136, 846312, 861432, 6379128, 8219736
Offset: 1

Views

Author

Rick L. Shepherd, Apr 05 2006

Keywords

Comments

There are 61 terms; all the multi-digit terms are even.

Examples

			a(60)=6379128 and a(61)=8219736 because both 6379128 and its reversal, 8219736, are Lynch-Bell numbers (A115569) -- and there are no intervening (or indeed any other) 7-digit such terms.
		

Crossrefs

Cf. A115569.
Showing 1-9 of 9 results.