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

A083895 Number of divisors of n with largest digit = 8 (base 10).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, May 08 2003

Keywords

Examples

			n=72, 2 of the 12 divisors of 72 have largest digit =8: {8,18}, therefore a(72)=2.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) nops(select(t -> max(convert(t, base, 10))=d, numtheory:-divisors(n))) end proc:
    d:= 8:
    map(f, [$1..200]); # Robert Israel, Oct 06 2019
  • Mathematica
    With[{k = 8}, Array[DivisorSum[#, 1 &, And[#[[k]] > 0, Total@ #[[k + 1 ;; 9]] == 0] &@ DigitCount[#] &] &, 105]] (* Michael De Vlieger, Oct 06 2019 *)

Formula

a(n) = A000005(n) - A083888(n) - A083889(n) - A083890(n) - A083891(n) - A083892(n) - A083893(n) - A083894(n) - A083896(n) = A083903(n) - A083902(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} 1/A283611(k) = 11.62909500243165896645... . - Amiram Eldar, Jan 04 2024

A083888 Number of divisors of n with largest digit = 1 (base 10).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 1, 1
Offset: 1

Views

Author

Reinhard Zumkeller, May 08 2003

Keywords

Examples

			n=110, 4 of the divisors of 110 {1,2,5,10,11,22,55,110} have largest digit =1: {1,10,11,110}, therefore a(110)=4.
		

Crossrefs

Programs

  • Magma
    [#[d:d in Divisors(n) | Max(Intseq(d)) eq 1]: n in [1..110]]; // Marius A. Burtea, Oct 06 2019
  • Maple
    f:= proc(n) nops(select(t -> max(convert(t,base,10))=d, numtheory:-divisors(n))) end proc:
    d:= 1:
    map(f, [$1..200]); # Robert Israel, Oct 06 2019
  • Mathematica
    With[{k = 1}, Array[DivisorSum[#, 1 &, And[#[[k]] > 0, Total@ #[[k + 1 ;; 9]] == 0] &@ DigitCount[#] &] &, 105]] (* Michael De Vlieger, Oct 06 2019 *)

Formula

a(n) = A000005(n) - A083889(n) - A083890(n) - A083891(n) - A083892(n) - A083893(n) - A083894(n) - A083895(n) - A083896(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} 1/A007088(k) = 1.23840561530559480971... . - Amiram Eldar, Jan 04 2024

A083889 Number of divisors of n with largest digit = 2 (base 10).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, May 08 2003

Keywords

Examples

			n=120, 4 of the 16 divisors of 120 have largest digit =2: {2,12,20,120}, therefore a(120)=4.
		

Crossrefs

Programs

  • Magma
    [#[d:d in Divisors(n) | Max(Intseq(d)) eq 2]: n in [1..120]]; // Marius A. Burtea, Oct 06 2019
  • Maple
    f:= proc(n) nops(select(t -> max(convert(t, base, 10))=d, numtheory:-divisors(n))) end proc:
    d:= 2:
    map(f, [$1..200]); # Robert Israel, Oct 06 2019
  • Mathematica
    With[{k = 2}, Array[DivisorSum[#, 1 &, And[#[[k]] > 0, Total@ #[[k + 1 ;; 9]] == 0] &@ DigitCount[#] &] &, 105]] (* Michael De Vlieger, Oct 06 2019 *)

Formula

a(n) = A000005(n) - A083888(n) - A083890(n) - A083891(n) - A083892(n) - A083893(n) - A083894(n) - A083895(n) - A083896(n) = A083897(n) - A083888(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} 1/A277964(k) = 0.85636382912390578285... . - Amiram Eldar, Jan 04 2024

A083896 Number of divisors of n with largest digit = 9 (base 10).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, May 08 2003

Keywords

Examples

			n = 117, 2 of the 6 divisors of 117 have largest digit = 9: {9,39}, therefore a(117) = 2.
		

Crossrefs

Programs

Formula

a(n) = A000005(n) - A083888(n) - A083889(n) - A083890(n) - A083891(n) - A083892(n) - A083893(n) - A083894(n) - A083895(n) = A000005(n) - A083903(n).
Sum_{k=1..n} a(k) ~ n * (log(n) + c), where c = 2*A001620 - 1 - A082838 = -22.766245... . - Amiram Eldar, Apr 17 2025

A091049 a(n) = first term which reduces to an unchanging value in n steps via repeated interpretation of a(n) as a base b+1 number where b is the largest digit of a(n).

Original entry on oeis.org

1, 10, 15, 17, 18, 58, 72, 80, 88, 507, 683, 838, 1384, 1807, 3417, 12651, 18316, 41841, 80852, 132815, 388315, 1182482, 2202048, 6408851, 15438855, 34630248, 72141683, 332386516, 764388521, 1867287828, 5451218338, 24187765577, 68380483575, 215445843883, 677083325011
Offset: 0

Views

Author

Chuck Seggelin, Dec 15 2003, Jul 09 2008

Keywords

Comments

There is no maximum number of steps and for any value of n, there MUST be a term a(n) that reduces in n steps. This is demonstrable as follows: take any term in the above sequence and convert it to base 2. The resulting value, if interpreted as a base 10 value will require one additional step to reduce. The resulting value may not be the FIRST value to resolve in that many steps, however, so it may not belong in this sequence.

Examples

			a(0) = 1 because 1 is the first term that reduces to an unchanging value in zero steps (i.e. 1 is already fully reduced.) a(1) = 10 because 10 reduces in one step (10 in base 2 is 2, 2 does not reduce further.) a(8) = 88 because 88 reduces in 8 steps: 88 --> 80 --> 72 --> 58 --> 53 --> 33 --> 15 --> 11 --> 3.
		

Crossrefs

Cf. A054055 (largest digit of n) A068505 (n as base b+1 number where b=largest digit of n) A091047 (a(n) = the final value of n reached through repeated interpretation of n as a base b+1 number where b is the largest digit of n) A091048 (number of times n must be interpreted as a base b+1 number where b is the largest digit of n until an unchanging value is reached).

Programs

  • Python
    def A091049(n):
        k = 1
        while True:
            m1 = k
            for i in range(n+1):
                m2 = int(str(m1),1+max(int(d) for d in str(m1)))
                if m1 == m2:
                    if i == n:
                        return k
                    else:
                        break
                m1 = m2
            k += 1 # Chai Wah Wu, Jan 07 2015

Extensions

a(30)-a(31) from Chai Wah Wu, Jan 14 2015

A277964 Numbers whose largest decimal digit is 2.

Original entry on oeis.org

2, 12, 20, 21, 22, 102, 112, 120, 121, 122, 200, 201, 202, 210, 211, 212, 220, 221, 222, 1002, 1012, 1020, 1021, 1022, 1102, 1112, 1120, 1121, 1122, 1200, 1201, 1202, 1210, 1211, 1212, 1220, 1221, 1222, 2000, 2001, 2002, 2010, 2011, 2012, 2020, 2021, 2022
Offset: 1

Views

Author

Colin Barker, Nov 06 2016

Keywords

Comments

Number of terms less than 10^n is 3^n-2^n, i.e., A001047(n). - Chai Wah Wu, Nov 06 2016 [extended by Felix Fröhlich, Nov 07 2016]
Numbers n such that A054055(n) = 2. - Felix Fröhlich, Nov 07 2016

Crossrefs

Programs

  • GAP
    Filtered([1..2100],n->Maximum(ListOfDigits(n))=2); # Muniru A Asiru, Mar 01 2019
  • Maple
    N:= 6: # to get all terms of at most N digits
    R:= 2: B:= {1}: C:= {1,2}:
    for  d from 2 to N do B:= map(t -> (10*t,10*t+1),B);
    C:= map(t -> (10*t,10*t+1,10*t+2),C);
    R:= R, op(sort(convert(C minus B,list)))
    od:
    R; # Robert Israel, Nov 07 2016
  • Mathematica
    A277964Q = Max[IntegerDigits[#]] == 2 &; Select[Range[2000], A277964Q] (* JungHwan Min, Nov 06 2016 *)
  • PARI
    L=List(); for(n=1, 10000, if(vecmax(digits(n))==2, listput(L, n))); Vec(L)
    

A156979 Primes p such that 1 = abs(largest digit of p - sum of all the other digits of p).

Original entry on oeis.org

23, 43, 67, 89, 113, 131, 157, 179, 197, 199, 223, 241, 263, 269, 311, 313, 331, 337, 353, 359, 373, 379, 397, 421, 449, 461, 463, 571, 593, 607, 641, 643, 661, 683, 719, 733, 739, 751, 809, 827, 829, 863, 881, 919, 937, 953, 971, 991, 1013, 1031, 1033
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 20 2009

Keywords

Examples

			If prime=197(1<7<9) and 1=abs(9-(1+7)), then 197=a(10). If prime=199(1<9=9) and 1=abs(9-(9+1)), then 199=a(11). If prime=223(2=2<3) and 1=abs(3-(2+2)), then 223=a(12), etc.
		

Crossrefs

Programs

  • Maple
    From R. J. Mathar, Mar 18 2010: (Start)
    A007953 := proc(n) local d ; add(d,d= convert(n,base,10)) ; end proc:
    A054055 := proc(n) local d ; max(op(convert(n,base,10))) ; end proc:
    isA156979 := proc(n) isprime(n) and abs(A007953(n)-2*A054055(n)) = 1 ; end proc:
    for n from 1 to 1050 do if isA156979(n) then printf("%d,",n); end if; end do: (End)
  • Mathematica
    ldodQ[n_]:=Module[{sidn=Sort[IntegerDigits[n]]},Abs[Total[Most[ sidn]]- Last[ sidn]] == 1]; Select[Prime[Range[200]],ldodQ] (* Harvey P. Dale, Nov 13 2013 *)

A209928 Largest digit of all divisors of n.

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Mar 20 2012

Keywords

Comments

Also largest digit of concatenation of all divisors of n (A037278, A176558).
a(n) = 9 for almost all n. - Charles R Greathouse IV, Mar 20 2012
With an offset of 1 rather than 0, A016186 tells us how many integers among the first 10^n have 9s among their digits, and those numbers are therefore guaranteed to index a 9 in this sequence. More interesting of course are those numbers that don't have a 9 in their own digits but do have a 9 among the digits of their nontrivial divisors. - Alonso del Arte, Mar 23 2012

Examples

			a(12) = 6 because digit 6 is largest digit of all divisors of 12: (1, 2, 3, 4, 6, 12).
		

Crossrefs

Cf. A054055 (largest digit of n).

Programs

  • Mathematica
    Flatten[Table[Take[Sort[Flatten[IntegerDigits[Divisors[n]]]], -1], {n, 100}]] (* Alonso del Arte, Mar 23 2012 *)
  • PARI
    a(n)=my(t);fordiv(n, d, t=max(t, vecmax(eval(Vec(Str(d))))); if(t>8, return(t)));t \\Charles R Greathouse IV, Mar 20 2012
    
  • Python
    from sympy import divisors
    def a(n): return int(max("".join(map(str, divisors(n)))))
    print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Feb 22 2021

A060418 Largest decimal digit in n-th prime.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Apr 05 2001

Keywords

Comments

a(n) = A054055(A000040(n)) = A262410(A000040(n)). - Reinhard Zumkeller, Sep 25 2015

Crossrefs

Cf. A054055.
Cf. A262401.

Programs

  • Haskell
    a060418 = a054055 . a000040  -- Reinhard Zumkeller, Sep 25 2015
  • Mathematica
    Table[Max[IntegerDigits[Prime[w]]], {w, 1, 1000}]
  • PARI
    a(n) = vecmax(digits(prime(n))); \\ Michel Marcus, Dec 26 2013
    

Extensions

Offset corrected to 1 by Michel Marcus, Dec 26 2013

A083898 Number of divisors of n with largest digit <= 3 (base 10).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, May 08 2003

Keywords

Crossrefs

Programs

Formula

a(n) = A083897(n) + A083890(n) = A083899(n) - A083891(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} 1/A007090(k) = 2.93694402167748963905... . - Amiram Eldar, Jan 04 2024
Previous Showing 11-20 of 110 results. Next