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 11 results. Next

A327560 The number of integers m in the range 0 < m < 10^n which are divisible by one or more of their own digits (A038770).

Original entry on oeis.org

9, 68, 708, 7578, 79952, 832506, 8585583, 87944417, 896452992, 9104962748, 92222435013, 932113080563, 9405187219507, 94771322677210, 953907792350911, 9592689086414459, 96392955785210896, 967997194404428275, 9715595409791983073
Offset: 1

Views

Author

Kevin Ryde, Sep 16 2019

Keywords

Comments

The integers m counted are A038770, so A038770(a(n)) = 10^n-1 is the last of n digits, and A038770(a(n)+1) = 10^n is the first of n+1 digits, for n>=1.
The digit divisibility condition is a regular language so a(n) is a linear recurrence. Working through a state machine for A038770 shows the recurrence is order 984, though its characteristic polynomial factorizes over rationals into terms of orders at most 36. The recurrence begins at a(4)..a(987) giving a(988). See the links for coefficients and generating function.
The biggest root (by magnitude) of the recurrence characteristic polynomial is 10 and its g.f. coefficient is 1 which shows a(n) -> 10^n. Or simply the number of m containing at least one digit 1 (a subset of those counted here) approaches 10^n per A016189.

Crossrefs

Cf. A038770 (digit strings), A327561 (opposite counts).

Programs

Formula

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

A176659 Partial sums of A038770.

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 277, 302, 328, 356, 386, 417, 449, 482, 517, 553, 592, 632, 673, 715, 759, 804, 852, 902, 953, 1005, 1060, 1120, 1181, 1243, 1306, 1370, 1435, 1501, 1571, 1642
Offset: 1

Views

Author

Jonathan Vos Post, Apr 23 2010

Keywords

Comments

Partial sums of numbers divisible by at least one of their digits. Identical to triangular numbers A000217 until a(23), then differs, because 23 is the smallest natural number in the complement of A038770 (A038772, i.e., not divisible by at least one of its digits). Hence this partial sum is the triangular numbers minus the partial sums of A038772, properly offset. The subsequence of primes (of course 3 is the largest prime triangular number) in the partial sum begins: 3, 277, 449, 673, 953, 1181, 1571, 1789, 2027. What are the equivalents in bases other than 10?

Examples

			a(23) = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 24 = 277 is prime.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Select[Range[110],MemberQ[Divisible[#,Cases[ IntegerDigits[ #], Except[ 0]]], True]&]] (* Harvey P. Dale, May 11 2017 *)

Formula

a(n) = Sum_{i=1..n} A038770(i).

A038772 Numbers not divisible by any of their digits.

Original entry on oeis.org

23, 27, 29, 34, 37, 38, 43, 46, 47, 49, 53, 54, 56, 57, 58, 59, 67, 68, 69, 73, 74, 76, 78, 79, 83, 86, 87, 89, 94, 97, 98, 203, 207, 209, 223, 227, 229, 233, 239, 247, 249, 253, 257, 259, 263, 267, 269, 277, 283, 289, 293, 299, 307, 308, 323, 329, 334, 337, 338
Offset: 1

Views

Author

Henry Bottomley, May 04 2000

Keywords

Comments

A038769(a(n)) = 0; complement of A038770.
This is a regular language when written in decimal, though the minimal regular expression is probably thousands of characters long. - Charles R Greathouse IV, Aug 19 2011
Exponential density 0.954... = A104139. Asymptotically 8/35 * n^0.954... + O(n^0.903...) members up to n. - Charles R Greathouse IV, Jul 22 2012

Examples

			34 is divisible by neither 3 nor 4.
35 is excluded because 5 is a divisor of 35, but 37 is included because neither 3 nor 7 is a divisor of 37
		

Crossrefs

Cf. A327561 (counts), A038770 (complement).
Cf. also A034709, A034837, A038769.

Programs

  • Haskell
    import Data.Char (digitToInt)
    a038772 n = a038772_list !! (n-1)
    a038772_list = filter p [1..] where
       p n = all (> 0) $ map ((mod n) . digitToInt) $ filter (> '0') $ show n
    -- Reinhard Zumkeller, Jun 19 2011
    
  • Magma
    [k:k in [1..340]| forall{c:c in Set(Intseq(k)) diff {0}|k mod c ne 0}]; // Marius A. Burtea, Dec 22 2019
    
  • Mathematica
    nddQ[n_]:=Module[{idn=DeleteCases[IntegerDigits[n],0]},And@@Table[ !Divisible[n, idn[[i]]],{i,Length[idn]}]]; Select[Range[350],nddQ] (* Harvey P. Dale, Nov 01 2011 *)
  • 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(0))); 1 \\ Charles R Greathouse IV, Jul 22 2011
    
  • Python
    def ok(n): return not any(n%int(d) == 0 for d in str(n) if d != '0')
    print(list(filter(ok, range(1, 339)))) # Michael S. Branicky, May 20 2021

Extensions

Edited by N. J. A. Sloane, Nov 17 2008 at the suggestion of R. J. Mathar

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

A055238 Numbers that are divisible by at least one of their digits in every base.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 24, 28, 30, 36, 42, 48, 60, 120
Offset: 1

Views

Author

Henry Bottomley, May 04 2000

Keywords

Comments

This list is probably finite and complete. For example 180 fails at base 23 and 240 fails at bases 21, 31 and 33

Examples

			9 is included 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 not on the list because in base 4 it is written 23 and 11 is not divisible by either 2 or 3.
		

Crossrefs

Programs

  • Mathematica
    divQ[n_, base_] := AnyTrue[Select[IntegerDigits[n, base], Positive], Divisible[n, #]&];
    okQ[n_] := AllTrue[Range[2, n-1], divQ[n, #]&];
    Select[Range[1000], okQ] (* Jean-François Alcover, Nov 07 2019 *)

A139138 Numbers divisible by at least two of their digits.

Original entry on oeis.org

11, 12, 15, 22, 24, 33, 36, 44, 48, 55, 66, 77, 88, 99, 101, 102, 104, 105, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 128, 131, 132, 135, 138, 140, 141, 142, 144, 145, 147, 148, 150, 151, 152, 153, 155, 156, 161, 162
Offset: 1

Views

Author

Jonathan Vos Post, Jun 05 2008

Keywords

Comments

Digits need not be distinct. This may be considered row 2 of an infinite array whose 1st row is A038770. Each such row is a subset of the ones above it.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Count[Mod[n, Flatten[IntegerDigits[n] /. {0 -> {}}]], 0] > 1; Select[ Range@ 170, fQ] (* Robert G. Wilson v, Jun 23 2014 *)
    Select[Range[200],Count[Divisible[#,Select[IntegerDigits[#], #>0&]], True]>1&] (* Harvey P. Dale, Dec 16 2015 *)
  • Python
    from sympy import factorint
    def ok(n): return sum(1 for d in map(int, str(n)) if d > 0 and n%d == 0) > 1
    print([k for k in range(163) if ok(k)]) # Michael S. Branicky, Nov 12 2021

Extensions

More terms from Alvin Hoover Belt, Apr 06 2009
Own omission (140) fixed by Alvin Hoover Belt, Apr 18 2009

A249766 Numbers n = concat(s,t) such that s and t divide n.

Original entry on oeis.org

11, 12, 15, 22, 24, 33, 36, 44, 48, 55, 66, 77, 88, 99, 101, 102, 104, 105, 110, 120, 125, 150, 202, 204, 208, 210, 220, 240, 250, 303, 306, 312, 315, 330, 360, 375, 404, 408, 416, 420, 440, 480, 505, 510, 520, 525, 550, 606, 612, 624, 630, 660, 707, 714, 728
Offset: 1

Views

Author

Paolo P. Lava, Nov 05 2014

Keywords

Comments

Subset of A038770 and A139138.

Examples

			306 = concat(3, 06) and 306 / 3 = 102 and 306 / 6 = 51.
76152 = concat(76, 152) and 76152 / 76 = 1002 and 76152 / 152 = 501.
		

Crossrefs

Programs

  • Maple
    with(numtheory):P:=proc(q) local a,b,k,n;
    for n from 1 to q do for k from 1 to ilog10(n) do a:=n mod 10^k; b:=trunc(n/10^k);
    if a*b>0 then if type(n/a,integer) and type(n/b,integer) then print(n); break;
    fi; fi; od; od; end: P(10^6);

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

A357929 Numbers that share a (decimal) digit with at least 1 of their proper divisors.

Original entry on oeis.org

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, 74, 75, 77, 80, 81, 82, 84, 85, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 101, 102, 103
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 21 2022

Keywords

Examples

			74 is in the sequence since it shares a (decimal) digit with at least one of its proper divisors, namely 37. Both numbers share the digit 7.
		

Crossrefs

Cf. A038770.

A188454 Numbers n whose decimal digits are distinct and no digit divides n.

Original entry on oeis.org

23, 27, 29, 34, 37, 38, 43, 46, 47, 49, 53, 54, 56, 57, 58, 59, 67, 68, 69, 73, 74, 76, 78, 79, 83, 86, 87, 89, 94, 97, 98, 203, 207, 209, 239, 247, 249, 253, 257, 259, 263, 267, 269, 283, 289, 293, 307, 308, 329, 346, 347, 349, 356, 358, 359, 367, 370, 374
Offset: 1

Views

Author

Andy Edwards, Mar 31 2011

Keywords

Comments

These may not contain 1 or have a 2 or 5 as the last digit. They include prime numbers not containing the digit 1 and composites with a smallest prime factor > 10 and obeying the other constraints (e.g. the largest case is 987654203 = 31*31859813).
The first even case is 34. The first consecutive pair is {37, 38}. {56,57,58,59} is a consecutive quadruple which is the maximal size for such a subset.
There are 202623 terms in this sequence. - Nathaniel Johnston, May 19 2011

Crossrefs

Programs

  • Mathematica
    dddQ[n_]:=Module[{dcn=DigitCount[n]},Max[dcn]==1&&First[dcn]==0 && Union[ Divisible[n,Select[IntegerDigits[n],#!=0&]]]=={False}]; Select[Range[ 400],dddQ] (* Harvey P. Dale, May 01 2012 *)
Showing 1-10 of 11 results. Next