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

A169819 a(n) = total number of distinct divisors of n and all of its substrings.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 3, 5, 2, 6, 3, 5, 4, 7, 3, 8, 4, 7, 5, 4, 4, 8, 4, 6, 6, 7, 5, 9, 3, 7, 4, 6, 5, 9, 4, 7, 5, 9, 4, 9, 5, 6, 8, 7, 5, 10, 7, 7, 5, 7, 4, 10, 4, 11, 6, 7, 5, 13, 5, 6, 8, 9, 7, 8, 6, 9, 7, 9, 3, 13, 4, 6, 7, 9, 4, 11, 5, 11, 8, 6, 6, 13, 7, 8, 8, 8, 7, 13, 6, 8, 5, 7, 6, 13, 5, 10, 6
Offset: 1

Views

Author

Zak Seidov, May 28 2010

Keywords

Comments

Note that we are counting 0 when it occurs as a digit of n, but are not counting any other integers as divisors of 0. (If we did, there would be infinitely many of them; every integer divides 0.) [From Franklin T. Adams-Watters, May 29 2010]

Examples

			a(56) = 11 because divisors of 56 are d1= {1, 2, 4, 7, 8, 14, 28, 56}; 56 has two substrings 5,6; divisors of 5 are d2= {1, 5}, and divisors of 6 are d3= {1, 2, 3,6} ; union of d1,d2,d3 gives 11 distinct divisors of 56 and all of its substrings: {1, 2, 3, 4, 5, 6, 7, 8, 14, 28, 56}.
		

Crossrefs

Programs

  • Mathematica
    Table[id = IntegerDigits[n]; FLA = Flatten[Table[Partition[id, k, 1], {k, Length[id]}], 1]; fd = Union[FromDigits /@ FLA]; dv = Length[Union[Flatten[Divisors /@ fd]]], {n, 200}]

A169858 Smallest integer k such that k or one of its left substrings (or prefixes, regarded as an integer) is divisible by any integer from {1,2,...,n}.

Original entry on oeis.org

1, 2, 6, 12, 45, 60, 245, 245, 504, 504, 5049, 5049, 10296, 11760, 11760, 11760, 56160, 56160, 198016, 198016, 1008159, 1323008, 2340849, 6240366, 13442580, 13442580, 37536408, 37536408, 75432065, 75432065, 180092645, 319800096, 319800096, 800640126, 2201169600, 2201169600, 3780487275, 5250966084, 5250966084, 6832425609, 36960308625, 36960308625, 62244072512, 62244072512, 62244072512, 62244072512, 372960042489, 372960042489
Offset: 1

Views

Author

Hugo van der Sanden, Jun 01 2010

Keywords

Examples

			a(5) = 45 as the left substrings of 45 are {4, 45} and for every d in {1,2,...,n} = {1, 2, 3, 4, 5} there is a left substring of 45 such that d | 45. That is: 1 | 4, 2 | 4, 3 | 45, 4 | 4, 5 | 45. - _David A. Corneth_, Jun 09 2023
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        n = 1
        for k in count(1):
            s = str(k)
            prefixes = [int(s[:i+1]) for i in range(len(s))]
            if all(any(ki%m == 0 for ki in prefixes) for m in range(1, n+1)):
                yield k; n += 1
                while any(ki%n == 0 for ki in prefixes):
                    yield k; n += 1
    print(list(islice(agen(), 20))) # Michael S. Branicky, Jun 09 2023

Formula

a(n) = min m: forall d in {1..n}: exists k in {0..log_10(m)}: d | floor(m / 10^k).
a(n) <= A003418(n). - Michael S. Branicky, Jun 09 2023

Extensions

Corrected and extended by Hugo van der Sanden, Jun 04 2010 (errors reported by Zak Seidov).

A178538 Records in A169819.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 16, 17, 20, 23, 25, 26, 29, 32, 33, 37, 38, 43, 47, 49, 54, 58, 59, 66, 68, 71, 73, 76, 80, 88, 93, 96, 103, 104, 105, 106, 112, 113, 117, 126, 129, 130, 143, 147, 151, 161, 171, 176, 187, 192, 200, 205, 216
Offset: 1

Views

Author

Zak Seidov, May 29 2010

Keywords

Crossrefs

Programs

  • Mathematica
    mx=0;s={};Do[id=IntegerDigits[n];FLA=Flatten[Table[Partition[id,k,1],
    {k,Length[id]}],1];fd=Union[FromDigits/@FLA];
    dv=Length[Union[Flatten[Divisors/@fd]]];If[dv>mx,mx=dv;AppendTo[s2,{mx,n}]],
    {n,200000}]; A178538 =First/@s

A178539 Where records occur in A169819.

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 16, 18, 30, 48, 56, 60, 108, 120, 144, 180, 288, 396, 504, 720, 840, 1008, 1176, 1260, 1440, 1680, 1980, 2520, 3360, 3780, 6720, 7560, 9240, 10080, 11088, 11760, 13608, 15120, 15840, 19800, 22680, 25200, 26460, 27720, 31680
Offset: 1

Views

Author

Zak Seidov, May 29 2010

Keywords

Comments

Next terms corresponding to terms in A178538: 32760,36960,49504,55440,64680,95040,98280,110880,123760,128520, 159840,163800,191520,196560.

Crossrefs

Programs

  • Mathematica
    mx=0;s={};Do[id=IntegerDigits[n];FLA=Flatten[Table[Partition[id,k,1],
    {k,Length[id]}],1];fd=Union[FromDigits/@FLA];
    dv=Length[Union[Flatten[Divisors/@fd]]];If[dv>mx,mx=dv;AppendTo[s2,{mx,n}]],
    {n,200000}]; A178539 = Last/@s

A178544 a(n) are such that n or one of its substrings is divisible by every integer from 1 to a(n).

Original entry on oeis.org

1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 1, 4, 1, 2, 3, 2, 3, 4, 2, 3, 3, 2, 3, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 2, 4, 4, 2, 5, 4, 2, 4, 4, 2, 1, 2, 1, 6, 1, 8, 1, 2, 1, 6, 3, 3, 3, 4, 3, 3, 3, 4, 3, 2, 1, 4, 1, 2, 1, 4, 1, 4, 1, 2, 4, 2, 4, 4, 2, 4, 4, 2, 4, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 2, 3, 3, 2, 3
Offset: 1

Views

Author

Zak Seidov, May 29 2010

Keywords

Comments

Positions of records 1,2,6,12,45,54,56,... are terms in A177834 (with repetitions).

Examples

			a(56)=8 because divisors of 56 are d1={1,2,4,7,8,14,28,56},
divisors of 5 are d2={1, 5}, divisors of 6 are d3={1,2,3,6},
and union of d1, d2, d3 gives 8 subsequent integers 1..8 (14,28,.. not counted).
		

Crossrefs

Programs

  • Mathematica
    Table[id=IntegerDigits[n]; FLA=Flatten[Table[Partition[id, k, 1],
    {k,Length[id]}], 1]; fd = Complement[Union[FromDigits /@ FLA], {0}];
    dv=Union[Flatten[Divisors /@ fd]]; Complement[Range[100], dv][[1]]-1, {n,10^3}]
Showing 1-5 of 5 results.