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.

Previous Showing 11-20 of 34 results. Next

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

A115569 Lynch-Bell numbers: numbers n such that the digits are all different (and do not include 0) and n is divisible by each of its individual digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 24, 36, 48, 124, 126, 128, 132, 135, 162, 168, 175, 184, 216, 248, 264, 312, 315, 324, 384, 396, 412, 432, 612, 624, 648, 672, 728, 735, 784, 816, 824, 864, 936, 1236, 1248, 1296, 1326, 1362, 1368, 1395, 1632, 1692, 1764, 1824
Offset: 1

Views

Author

Mike Smith (mtm_king(AT)yahoo.com), Mar 10 2006; also submitted by Andy Edwards (AndynGen(AT)aol.com), Mar 20 2006

Keywords

Comments

This is a subset of some of the related sequences listed below. Stephen Lynch and Andrew Bell are Brisbane surgeons who contributed to the identification of this sequence.
There are 548 Lynch-Bell numbers. A117911 gives the number of n-digit ones. The digit 5 cannot appear in Lynch-Bell numbers containing an even digit; 5 must be the units digit when it appears. The 7-digit Lynch-Bell numbers are 105 permutations of 1289736 (the smallest such). - Rick L. Shepherd, Apr 01 2006
Can be seen/read as a table with row lengths A117911 (rows r > 7 have zero length). - M. F. Hasler, Jan 31 2016

Examples

			384/3 = 128, 384/8 = 48, 384/4 = 96. Thus 384 is Lynch-Bell as it is a multiple of each of its three distinct digits.
		

Crossrefs

Cf. A117911, A117912 (have even digits only), A117913 (have odd digits only), A010784.

Programs

  • Maple
    with(combinat):
    f:= l-> parse(cat(l[])):
    T:= n-> sort(map(f, select(l-> andmap(x-> irem(f(l), x)=0, l),
             map(p-> permute(p)[], choose([$1..9], n)))))[]:
    seq(T(n), n=1..7);  # Alois P. Heinz, Jul 31 2022
  • Mathematica
    Reap[For[n = 1, n < 10^7, n++, id = IntegerDigits[n]; If[FreeQ[id, 0] && Length[id] == Length[Union[id]] && And @@ (Divisible[n, #]& /@ id), Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Nov 26 2013 *)
    bnQ[n_]:=Max[DigitCount[n]]==1&&FreeQ[IntegerDigits[n],0]&&Union[Divisible[n,IntegerDigits[ n]]]=={True}; Select[Range[2000],lbnQ] (* Harvey P. Dale, Jun 02 2023 *)
    Cases[Union @@ ((FromDigits@#&/@Flatten[Permutations@# & /@ Subsets[Range@9, {#}], 1])&/@ Range@9), ?(DeleteDuplicates[Divisible[#, IntegerDigits@#]] == {True} &)] (* _Hans Rudolf Widmer, Aug 27 2024 *)
  • PARI
    A115569_row(n)={if(n,my(u=vectorv(n,i,10^i)\10,S=List(),M);forvec(v=vector(n,i,[1,9]),(M=lcm(v))%10==0||normlp(v,1)%3^valuation(M,3)||for(k=1,n!,vecextract(v,numtoperm(n,k))*u%M ||listput(S,vecextract(v,numtoperm(n,k))*u)),2);Set(S),concat(apply(A115569_row,[1..7])))} \\ Return terms of length n if given, else the vector of all terms. The checks M%10 and |v| % 3^v(...) are not needed but reduce CPU time by 97%. - M. F. Hasler, Jan 31 2016
    
  • PARI
    A115569(n)=n>9&&for(r=2,7,(n-=#t=A115569_row(r))>9||return(t[n-9+#t]));n \\ M. F. Hasler, Jan 31 2016
    
  • Python
    def ok(n):
        s = str(n)
        if "0" in s or len(set(s)) < len(s): return False
        return all(n%int(d) == 0 for d in s)
    afull = [k for k in range(9867313) if ok(k)]
    print(afull[:55]) # Michael S. Branicky, Jul 31 2022

Extensions

The full list of terms was sent in by Rick L. Shepherd (see link) and also by Sébastien Dumortier, Apr 04 2006

A139222 a(n) = 30*n - 27.

Original entry on oeis.org

3, 33, 63, 93, 123, 153, 183, 213, 243, 273, 303, 333, 363, 393, 423, 453, 483, 513, 543, 573, 603, 633, 663, 693, 723, 753, 783, 813, 843, 873, 903, 933, 963, 993, 1023, 1053, 1083, 1113, 1143, 1173, 1203, 1233, 1263, 1293, 1323, 1353, 1383, 1413, 1443, 1473
Offset: 1

Views

Author

Odimar Fabeny, Jun 06 2008

Keywords

Comments

Multiples of 3 with the units digit equal to 3.

Crossrefs

Subsequence of A034709, together with A017281, A017293, A139245, A017329, A139249, A139264, A139279 and A139280.

Programs

Formula

a(n) = a(n-1) + 30.
From Elmo R. Oliveira, Apr 04 2025: (Start)
G.f.: 3*x*(1+9*x)/(1-x)^2.
E.g.f.: 3*(exp(x)*(10*x - 9) + 9).
a(n) = 3*A017281(n-1) = A139280(n)/3.
a(n) = 2*a(n-1) - a(n-2) for n > 2. (End)

Extensions

More terms from Reinhard Zumkeller, Jun 22 2008

A139249 a(n) = 30*n - 24.

Original entry on oeis.org

6, 36, 66, 96, 126, 156, 186, 216, 246, 276, 306, 336, 366, 396, 426, 456, 486, 516, 546, 576, 606, 636, 666, 696, 726, 756, 786, 816, 846, 876, 906, 936, 966, 996, 1026, 1056, 1086, 1116, 1146, 1176, 1206, 1236, 1266, 1296, 1326, 1356, 1386, 1416, 1446, 1476
Offset: 1

Views

Author

Odimar Fabeny, Jun 06 2008, Jun 07 2008

Keywords

Comments

Multiples of 6 with unit digit equal to 6.

Crossrefs

Subsequence of A034709, together with A017281, A017293, A139222, A139245, A017329, A139264, A139279 and A139280. - Reinhard Zumkeller, Jun 22 2008
Cf. A016861.

Programs

Formula

a(n) = a(n-1) + 30.
From Elmo R. Oliveira, Apr 04 2025: (Start)
G.f.: 6*x*(1+4*x)/(1-x)^2.
E.g.f.: 6*(exp(x)*(5*x - 4) + 4).
a(n) = 6*A016861(n-1).
a(n) = 2*a(n-1) - a(n-2) for n > 2. (End)

Extensions

More terms from Reinhard Zumkeller, Jun 22 2008
Edited by R. J. Mathar, Jul 20 2008

A139264 a(n) = 70*n - 63.

Original entry on oeis.org

7, 77, 147, 217, 287, 357, 427, 497, 567, 637, 707, 777, 847, 917, 987, 1057, 1127, 1197, 1267, 1337, 1407, 1477, 1547, 1617, 1687, 1757, 1827, 1897, 1967, 2037, 2107, 2177, 2247, 2317, 2387, 2457, 2527, 2597, 2667, 2737, 2807, 2877, 2947, 3017, 3087, 3157, 3227
Offset: 1

Views

Author

Odimar Fabeny, Jun 06 2008

Keywords

Comments

Multiples of 7 with unit digit equal to 7.

Crossrefs

Subsequence of A034709, together with A017281, A017293, A139222, A139245, A017329, A139249, A139279 and A139280.

Programs

Formula

a(n) = a(n-1) + 70.
From Elmo R. Oliveira, Apr 04 2025: (Start)
G.f.: 7*x*(1+9*x)/(1-x)^2.
E.g.f.: 7*(exp(x)*(10*x - 9) + 9).
a(n) = 7*A017281(n-1).
a(n) = 2*a(n-1) - a(n-2) for n > 2. (End)

Extensions

More terms from Reinhard Zumkeller, Jun 22 2008

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

A132359 Numbers divisible by the square of their last decimal digit.

Original entry on oeis.org

1, 11, 12, 21, 25, 31, 32, 36, 41, 51, 52, 61, 63, 64, 71, 72, 75, 81, 91, 92, 101, 111, 112, 121, 125, 128, 131, 132, 141, 144, 147, 151, 152, 153, 161, 171, 172, 175, 181, 191, 192, 201, 211, 212, 216, 221, 224, 225, 231, 232, 241, 243, 251, 252, 261, 271, 272
Offset: 1

Views

Author

Jonathan Vos Post, Nov 08 2007

Keywords

Comments

Subsequences are A017281 and A053742 representing last digits 1 and 5. Generators for the subsequences representing last digits 2, 3, 4, 6, 7, 8 and 9 are, in that order, the terms 12+20i, 63+90i, 64+80i, 36+180i, 147+490i, 128+320i, 729+810i, where i=0,1,2,... - R. J. Mathar, Nov 13 2007
This is a 10-automatic sequence. - Charles R Greathouse IV, Dec 28 2011

Examples

			147 belongs to the sequence because 147/7^2 = 3.
		

Crossrefs

Programs

  • Maple
    isA132359 := proc(n) local ldig ; ldig := n mod 10 ; if ldig <> 0 and n mod (ldig^2) = 0 then true ; else false ; fi ; end: for n from 1 to 400 do if isA132359(n) then printf("%d,",n) ; fi ; od: # R. J. Mathar, Nov 13 2007
    a:=proc(n) local nn: nn:=convert(n,base,10): if 0 < nn[1] and `mod`(n,nn[1]^2) =0 then n else end if end proc: seq(a(n),n=1..250); # Emeric Deutsch, Nov 15 2007
  • Mathematica
    Select[Range[250], IntegerDigits[ # ][[ -1]] > 0 && Mod[ #, IntegerDigits[ # ][[ -1]]^2] == 0 &] (* Stefan Steinerberger, Nov 12 2007 *)
    dsldQ[n_]:=Module[{lidnsq=Last[IntegerDigits[n]]^2},lidnsq!=0 && Divisible[n,lidnsq]]; Select[Range[300],dsldQ] (* Harvey P. Dale, May 03 2011 *)
  • PARI
    is(n)=n%(n%10)^2==0 \\ Charles R Greathouse IV, Dec 28 2011
    
  • Python
    def ok(n): return n%10 > 0 and n%(n%10)**2 == 0
    print([k for k in range(273) if ok(k)]) # Michael S. Branicky, Jul 03 2022
  • R
    which(sapply(1:500,function(x) isint(x/(x%%10)^2))) # Christian N. K. Anderson, May 04 2013
    

Formula

Numbers k such that fp[k / (k mod 10)] = 0.
a(n) ~ 6350400*n/1241929 = 5.113...*n. - Charles R Greathouse IV, Dec 28 2011

Extensions

Corrected and extended by Stefan Steinerberger, Emeric Deutsch and R. J. Mathar, Nov 12 2007

A178158 Numbers n that are divisible by every suffix of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 21, 22, 24, 25, 31, 32, 33, 35, 36, 41, 42, 44, 45, 48, 51, 52, 55, 61, 62, 63, 64, 65, 66, 71, 72, 75, 77, 81, 82, 84, 85, 88, 91, 92, 93, 95, 96, 99, 101, 102, 104, 105, 125, 201, 202, 204, 205, 208, 225, 301, 302, 303, 304, 305, 306, 312, 315, 325, 375, 401, 402, 404, 405, 408, 425, 501, 502, 504, 505, 525, 601, 602, 603, 604
Offset: 1

Views

Author

Michel Lagneau, Dec 17 2010

Keywords

Comments

If n = y*10^d+z is in the sequence, where 1<=y<=9 and z < 10^d, then z | y*10^d. - Robert Israel, Oct 17 2018

Examples

			9375 is in the sequence because :
.     5 | 9375 ;
.    75 | 9375 ;
.   375 | 9375 ;
.  9375 | 9375 .
		

Crossrefs

Cf. A034709 .
Cf. A067251.

Programs

  • Haskell
    import Data.List (tails)
    a178158 n = a178158_list !! (n-1)
    a178158_list = filter (\suff -> all ((== 0) . (mod suff))
       (map read $ tail $ init $ tails $ show suff :: [Integer])) a067251_list
    -- Reinhard Zumkeller, Mar 26 2012
  • Maple
    with(numtheory):T:=array(1..5):for n from 1 to 10000 do:ind:=0:l:=length(n):n0:=n:s:=0:for m from 0 to l-1 do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v : s:=s + u*10 ^m:if irem(n,10)<>0 and irem(n, s)=0 then ind:=ind+1:else fi:od:if ind=l then printf(`%d,`, n):else fi:od:
    # Alternative:
    filter:= proc(x)
      if x mod 10 = 0 then return false fi;
      andmap(t -> type(x/(x mod 10^t),integer), [$1..ilog10(x)])
    end proc:
    Res:= $1..9:
    for d from 1 to 6 do
      for y from 1 to 9 do
        for z in sort(convert(select(`<`,numtheory:-divisors(y*10^d),10^d),list)) do
          if filter(y*10^d+z) then
             Res:= Res, y*10^d+z;
          fi
    od od od:
    Res; # Robert Israel, Oct 17 2018

A221651 Numbers divisible by their first digit squared (excluding those whose first digit is 1).

Original entry on oeis.org

20, 24, 28, 36, 48, 50, 200, 204, 208, 212, 216, 220, 224, 228, 232, 236, 240, 244, 248, 252, 256, 260, 264, 268, 272, 276, 280, 284, 288, 292, 296, 306, 315, 324, 333, 342, 351, 360, 369, 378, 387, 396, 400, 416, 432, 448, 464, 480, 496, 500, 525, 550, 575
Offset: 1

Views

Author

Keywords

Comments

Numbers where floor(n/10^floor(log(n)))^2 divides n.

Examples

			48 is divisible by 4^2.
		

Crossrefs

Programs

  • R
    x=0; y=rep(0,1000); len=0
    firstdig<-function(x) as.numeric(substr(as.character(x),1,1))
    isint<-function(x) x==as.integer(x)
    while(len<10000) if((fd=firstdig((x=x+1)))>1) if(isint(x/fd^2)) y[(len=len+1)]=x

A225297 Numbers divisible by their last digit cubed.

Original entry on oeis.org

1, 11, 21, 31, 32, 41, 51, 61, 64, 71, 72, 81, 91, 101, 111, 112, 121, 125, 131, 141, 151, 152, 161, 171, 181, 191, 192, 201, 211, 216, 221, 231, 232, 241, 243, 251, 261, 271, 272, 281, 291, 301, 311, 312, 321, 331, 341, 351, 352, 361, 371, 375, 381, 384, 391
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that (k mod 10)^3 | k.
All numbers ending in 1 are trivially included in this sequence.
The sequence is { 1+10k, 32 + 40k, 243 + 270k, 64 + 320k, 125 + 250k, 216 + 1080k, 3087 + 3430k, 2048 + 2560k, 729 + 7290k ; k = 0,1,2,...}. - M. F. Hasler, Jan 31 2016
The asymptotic density of this sequence is 2201597407/16003008000 = 0.137573... . - Amiram Eldar, Aug 08 2023

Examples

			a(16) = 112 is divisible by 2^3.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[400], (m = Mod[#, 10]) > 0 && Divisible[#, m^3] &] (* Amiram Eldar, Aug 08 2023 *)
  • PARI
    is(n)=n%10&&n%(n%10)^3==0 \\ M. F. Hasler, Jan 31 2016
  • R
    x=0; y=rep(0,100); len=0; isint<-function(x) x==as.integer(x); while(len<100) if((x=x+1)%%10>0) if(isint(x/(x%%10)^3)) y[(len=len+1)]=x
    
Previous Showing 11-20 of 34 results. Next