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-10 of 33 results. Next

A327561 The number of integers m in the range 0 < m < 10^n which are not divisible by any of their own digits (A038772).

Original entry on oeis.org

0, 31, 291, 2421, 20047, 167493, 1414416, 12055582, 103547007, 895037251, 7777564986, 67886919436, 594812780492, 5228677322789, 46092207649088, 407310913585540, 3607044214789103, 32002805595571724, 284404590208016926
Offset: 1

Views

Author

Kevin Ryde, Sep 19 2019

Keywords

Comments

The integers m counted are A038772 so that A038772(a(n)) is the last there of n digits and A038772(a(n)+1) is the first there of n+1 digits, for n>=2.
The digit divisibility condition is a regular language so a(n) is a linear recurrence. Working through a state machine for A038772 (or its complement A038770) shows the recurrence is order 983, though its characteristic polynomial factorizes over rationals into terms of orders at most 36. The recurrence begins at a(4..986) giving a(987). See the links for recurrence coefficients and generating function.
The biggest root (by magnitude) of the characteristic polynomial is 9 and its g.f. coefficient is 4/21 which shows a(n) -> (4/21)*9^n.

Crossrefs

Formula

a(n) = 10^n-1 - A327560(n).

A095251 Erroneous version of A038772.

Original entry on oeis.org

23, 25, 27, 29, 34, 35, 37, 38, 43, 45, 46, 47, 49, 51, 52, 53, 56, 57, 58, 59, 67, 68, 69
Offset: 1

Views

Author

Keywords

A176660 Partial sums of A038772.

Original entry on oeis.org

23, 50, 79, 113, 150, 188, 231, 277, 324, 373, 426, 480, 536, 593, 651, 710, 777, 845, 914, 987, 1061, 1137, 1215, 1294, 1377, 1463, 1550, 1639, 1733, 1830, 1928, 2131, 2338, 2547, 2770, 2997, 3226, 3459, 3698, 3945, 4194, 4447, 4704, 4963, 5226, 5493
Offset: 1

Views

Author

Jonathan Vos Post, Apr 23 2010

Keywords

Comments

Partial sums of numbers not divisible by any of their digits. The partial sums of the complement (A038770, numbers divisible by at least one of their digits) is A176659. Hence the sum of the two partial sums (properly offset) is triangular numbers A000217. The subsequence of primes in the partial sum begins: 23, 79, 113, 277, 373, 593, 1061, 1733, 2131, 4447, 9479. The smallest square in the sequence is 324.

Examples

			a(4) = 23 + 27 + 29 + 34 = 113 is prime.
		

Crossrefs

Formula

a(n) = SUM[i=1..n] A038772(i).

A038770 Numbers divisible by at least one of their digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 30, 31, 32, 33, 35, 36, 39, 40, 41, 42, 44, 45, 48, 50, 51, 52, 55, 60, 61, 62, 63, 64, 65, 66, 70, 71, 72, 75, 77, 80, 81, 82, 84, 85, 88, 90, 91, 92, 93, 95, 96, 99, 100, 101, 102
Offset: 1

Views

Author

Henry Bottomley, May 04 2000

Keywords

Comments

A038769(a(n)) > 0; complement of A038772.
The decimal digit strings of this sequence are a regular language, since it is the union of A011531 and A121022 .. A121029 which are likewise regular languages. Some computer state machine manipulation for this union shows a minimum deterministic finite automaton (DFA) matching the digit strings of this sequence has 11561 states. Reversing strings (so least significant digit first) reduces to 1699 states, or reverse and allow high 0's (which become trailing 0's due to the reverse) reduces to 1424 states. The latter are tractable sizes for the linear recurrence in A327560. - Kevin Ryde, Dec 04 2019

Examples

			35 is included because 5 is a divisor of 35, but 37 is not included because neither 3 nor 7 is a divisor of 37.
		

Crossrefs

Cf. A327560 (counts), A038772 (complement), A034709, A034837, A038769.

Programs

  • Haskell
    a038770 n = a038770_list !! (n-1)
    a038770_list = filter f [1..] where
       f u = g u where
         g v = v > 0 && (((d == 0 || r > 0) && g v') || r == 0)
               where (v',d) = divMod v 10; r = mod u d
    -- Reinhard Zumkeller, Jul 30 2015, Jun 19 2011
    
  • Mathematica
    Select[Range[120],MemberQ[Divisible[#,Cases[IntegerDigits[#],Except[0]]], True]&] (* Harvey P. Dale, Jun 20 2011 *)
    Select[Range[120],AnyTrue[#/DeleteCases[IntegerDigits[#],0],IntegerQ]&] (* Harvey P. Dale, Mar 29 2024 *)
  • PARI
    is(n)=my(v=vecsort(eval(Vec(Str(n))),,8));for(i=if(v[1],1,2),#v,if(n%v[i]==0,return(1)));0 \\ Charles R Greathouse IV, Jul 22 2011
    
  • Python
    def ok(n): return any(n%int(d) == 0 for d in str(n) if d != '0')
    print(list(filter(ok, range(1, 103)))) # Michael S. Branicky, May 20 2021

Formula

a(n) ~ n. - Charles R Greathouse IV, Jul 22 2011

A038769 Number of digits of n which are divisors of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 0, 2, 1, 1, 0, 1, 0, 1, 1, 1, 2, 0, 1, 2, 0, 0, 1, 1, 1, 1, 0, 2, 1, 0, 0, 2, 0, 1, 1, 1, 0, 0, 2, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 2, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 2, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 2, 1, 2, 2, 1, 2, 2
Offset: 1

Views

Author

Henry Bottomley, May 04 2000

Keywords

Comments

a(A038772(n)) = 0; a(A038770(n)) > 0.

Examples

			a(35)=1 because 5 is a divisor of 35 but 3 is not.
		

Crossrefs

Programs

  • Haskell
    import Data.Char (digitToInt)
    a038769 n = length $ filter (== 0)
                $ map ((mod n) . digitToInt) $ filter (> '0') $ show n
    -- Reinhard Zumkeller, Jun 19 2011
    
  • Magma
    [#[c:c in Intseq(k) |not IsZero(c) and k mod c eq 0]:k in [1..105]]; // Marius A. Burtea, Dec 23 2019
  • Maple
    f:= proc(n) local L; L:= convert(n,base,10);
      nops(select(t -> t > 0 and n mod t = 0, L))
    end proc:
    map(f, [$1..1000]); # Robert Israel, Jul 04 2016
  • Mathematica
    Array[Count[Position[Most@ DigitCount@ #, ?(# > 0 &)][[All, 1]], k /; Mod[#, k] == 0] &, 105] (* Michael De Vlieger, Dec 23 2019 *)
    Table[Count[n/Select[IntegerDigits[n],#>0&],?IntegerQ],{n,110}] (* _Harvey P. Dale, Mar 04 2023 *)

A055239 Numbers which are not divisible by any of their digits in at least one base.

Original entry on oeis.org

11, 13, 17, 19, 21, 22, 23, 25, 26, 27, 29, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92
Offset: 1

Views

Author

Henry Bottomley, May 04 2000

Keywords

Comments

It seems likely all integers greater than 120 appear in this sequence

Examples

			9 is excluded because it can be written as 111111111, 1001, 100, 21, 14, 13, 12, 11, 10 or 9 and in every case there is a digit which divides 9; 11 is in the sequence because in base 4 it is written 23 and 11 is not divisible by either 2 or 3
		

Crossrefs

A237766 Least initial number of n consecutive integers that are not divisible by any of their nonzero digits.

Original entry on oeis.org

23, 37, 56, 56, 866
Offset: 1

Views

Author

Derek Orr, Feb 12 2014

Keywords

Comments

This sequence is complete. If a(6) were to exist, the 6 numbers would have to end in either {1,2,3,4,5,6}, {2,3,4,5,6,7}, {3,4,5,6,7,8}, {4,5,6,7,8,9}, {5,6,7,8,9,0}, {6,7,8,9,0,1}, {7,8,9,0,1,2}, {8,9,0,1,2,3}, {9,0,1,2,3,4}, or {0,1,2,3,4,5}. However, if the number has a 1 as a digit, it cannot be one of the consecutive integers. Also, if a number has a 5 as its last digit, it cannot be one of the consecutive integers. Thus, none of these sets could work.
If all numbers were distinct and nontrivial, a(4) would be 586 (the trivial numbers after 56 are 506 and 556).

Examples

			23 is the first number that is not divisible by either of its digits.
37 and 38 are the first two consecutive numbers that are not divisible by any of their digits. Thus, a(2) = 37.
56, 57, 58 (and 59) are the first three (and four) consecutive numbers that are not divisible by any of their digits. Thus, a(3) = a(4) = 56.
866, 867, 868, 869, and 870 are the first five consecutive numbers that are not divisible by any of their digits. Thus, a(5) = 866.
		

Crossrefs

Programs

  • Python
    def DivDig(x):
      total = 0
      for i in str(x):
        if i != '0':
          if x/int(i) % 1 == 0:
            return True
      return False
    def Nums(x):
      n = 1
      while n < 10**3:
        count = 0
        for i in range(n,n+x):
          if not DivDig(i):
            count += 1
          else:
            break
        if count == x:
          return n
        else:
          n += 1
    x = 1
    while x < 10:
      print(Nums(x))
      x += 1

A239211 Squares that are not divisible by any of their nonzero digits.

Original entry on oeis.org

49, 289, 529, 676, 2209, 2809, 4489, 5329, 5776, 5929, 6889, 7396, 8836, 9409, 20449, 24649, 26569, 27889, 29929, 30976, 34969, 37249, 37636, 38809, 49729, 54289, 55696, 59536, 64009, 65536, 66049, 67600, 75076, 76729, 80089, 82369, 85849, 94249, 97969
Offset: 1

Views

Author

Colin Barker, Mar 12 2014

Keywords

Comments

Intersection of A000290 and A038772.
The sequence is infinite since it contains all the terms (5*10^k+3)^2, k>0. - Giovanni Resta, Mar 12 2014

Examples

			2809 is in the sequence because 2809 is not divisible by 2, 8 or 9.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[350]^2,NoneTrue[#/(IntegerDigits[#]/.(0->Nothing)), IntegerQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 08 2017 *)
  • PARI
    isOK(n) = my(v=vecsort(digits(n^2), , 8)); for(i=1+(v[1]==0), #v, if(n^2%v[i]==0, return(0))); 1
    s=[]; for(n=1, 1000, if(isOK(n), s=concat(s, n^2))); s

A239220 Cubes that are not divisible by any of their nonzero digits.

Original entry on oeis.org

27, 343, 6859, 24389, 50653, 79507, 97336, 205379, 300763, 456533, 493039, 636056, 704969, 2048383, 2924207, 3307949, 3869893, 4330747, 4657463, 4826809, 5735339, 6539203, 7645373, 7880599, 23639903, 26730899, 28934443, 30664297, 33698267, 38272753, 42508549
Offset: 1

Views

Author

Colin Barker, Mar 12 2014

Keywords

Comments

Intersection of A000578 and A038772.
Sequence is infinite because it contains (2*10^k + 3)^3, for k>1 and k not of the form 6*h + 2. - Giovanni Resta, Mar 13 2014

Examples

			50653 is in the sequence because 37^3 = 50653 is not divisible by 3, 5 or 6.
		

Crossrefs

Programs

  • Mathematica
    ndnzdQ[n_]:=NoneTrue[n/Select[IntegerDigits[n],#!=0&],IntegerQ]; Select[ Range[ 400]^3,ndnzdQ] (* Harvey P. Dale, Jan 16 2022 *)
  • PARI
    isOK(n) = my(v=vecsort(digits(n^3), , 8)); for(i=1+(v[1]==0), #v, if(n^3%v[i]==0, return(0))); 1
    s=[]; for(n=1, 1000, if(isOK(n), s=concat(s, n^3))); s

Formula

a(n) = A239219(n)^3. - Michel Marcus, Mar 19 2014

A352379 Numbers k such that no nonzero digit of 2*k divides 2*k.

Original entry on oeis.org

17, 19, 23, 27, 28, 29, 34, 37, 38, 39, 43, 47, 49, 154, 167, 169, 173, 178, 179, 185, 187, 188, 190, 193, 194, 197, 199, 203, 215, 217, 223, 227, 229, 233, 235, 237, 239, 245, 247, 249, 253, 254, 268, 269, 277, 278, 279, 283, 289, 293, 294, 298, 299, 317, 319, 323, 328, 329, 334, 335, 337, 338, 343
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Mar 14 2022

Keywords

Comments

There are no terms between and including 500 and 1500 and there are no terms between and including 5000 and 15000. - Harvey P. Dale, Apr 05 2025

Examples

			a(1) = 17 and 2*17 = 34 is not divisible by 3 or 4;
a(2) = 19 and 2*19 = 38 is not divisible by 3 or 8;
a(3) = 23 and 2*23 = 46 is not divisible by 4 or 6;
a(4) = 27 and 2*27 = 54 is not divisible by 5 or 4; etc.
31 is not in the sequence as 2*31 = 62 is divisible by 2.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := AllTrue[IntegerDigits[2*n], # == 0 || !Divisible[2*n, #] &]; Select[Range[350], q] (* Amiram Eldar, Mar 14 2022 *)
    nnzdQ[n_]:=NoneTrue[Mod[2 n,Select[IntegerDigits[2 n],#!=0&]],#==0&]; Select[Range[350],nnzdQ] (* Harvey P. Dale, Apr 05 2025 *)
  • Python
    def ok(n): return not any(2*n%int(d)==0 for d in set(str(2*n)) if d!='0')
    print([k for k in range(1, 344) if ok(k)]) # Michael S. Branicky, Mar 14 2022
Showing 1-10 of 33 results. Next