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

A357300 a(n) is the smallest number m with exactly n divisors whose first digit equals the first digit of m.

Original entry on oeis.org

1, 10, 100, 108, 120, 180, 1040, 1020, 1170, 1008, 1260, 1680, 10010, 10530, 10200, 10260, 10560, 10800, 11340, 10920, 12600, 10080, 15840, 18480, 15120, 102060, 104400, 101640, 100320, 102600, 100980, 117600, 114660, 107100, 174240, 113400, 105840, 100800, 120120, 143640
Offset: 1

Views

Author

Bernard Schott, Sep 23 2022

Keywords

Comments

a(m) <= a(551) = 18681062400 for m < 555. All terms with values up to 2*10^10 start with 1. Do there exist a(n) starting with any other digit? - Charles R Greathouse IV, Sep 25 2022

Examples

			Of the twelve divisors of 108, four have their first digit equals to the first digit of 108: 1, 12, 18 and 108, and there is no such smaller number, hence a(4) = 108.
		

Crossrefs

Cf. A335491 (with last digit), A206287, A355592, A357299.
Similar, but with: A333456 (Niven numbers), A335038 (Zuckerman numbers).

Programs

  • Mathematica
    f[n_] := IntegerDigits[n][[1]]; s[n_] := Module[{fn = f[n]}, DivisorSum[n, 1 &, f[#] == fn &]]; seq[len_, nmax_] := Module[{v = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = s[n]; If[i <= len && v[[i]] == 0, c++; v[[i]] = n]; n++]; v]; seq[40, 10^6] (* Amiram Eldar, Sep 23 2022 *)
  • PARI
    f(n) = my(fd=digits(n)[1]); sumdiv(n, d, digits(d)[1] == fd); \\ A357299
    a(n) = my(k=1); while (f(k)!=n, k++); k; \\ Michel Marcus, Sep 23 2022
    
  • PARI
    v=vector(1000); v[1]=r=1; forfactored(n=2, 10^11, t=a(n[1],n[2],r); if(t>r && v[t]==0, v[t]=n[1]; print(t" "n[1]" = "n[2]); while(v[r],r++); r--)) \\ Charles R Greathouse IV, Sep 25 2022

Extensions

More terms from Michel Marcus, Sep 23 2022

A342833 Integers m such that the number of divisors whose last digit equals the last digit of m sets a new record.

Original entry on oeis.org

1, 11, 40, 60, 120, 240, 360, 480, 600, 1200, 1800, 2400, 3600, 7200, 8400, 12600, 16800, 25200, 50400, 75600, 100800, 151200, 201600, 252000, 277200, 453600, 504000, 554400, 831600, 1108800, 1663200, 2217600, 2772000, 3326400, 4989600, 5544000, 6652800, 7207200
Offset: 1

Views

Author

Bernard Schott, Mar 23 2021

Keywords

Comments

Inspired by Project Euler, Problem 474 (see link).
The corresponding number of divisors whose last digit equals the last digit: 1, 2, 3, 4, 6, 8, 9, 10, 12, 16, 18, 20, ...

Examples

			a(5) = 120 is in the sequence because A330348(120) = 6, the six corresponding divisors are {10, 20, 30, 40, 60, 120} and 6 is larger than any earlier value in A330348.
		

Crossrefs

Programs

  • Mathematica
    d[n_] := DivisorSum[n, 1 &, Mod[# - n, 10] == 0 &]; dm = 0; s = {}; Do[d1 = d[n]; If[d1 > dm, dm = d1; AppendTo[s, n]], {n, 1, 10^7}]; s (* Amiram Eldar, Mar 23 2021 *)
  • PARI
    f(n) = my(dig = n%10); sumdiv(n, d, d%10 == dig); \\ A330348
    lista(nn) = my(m, k=0, kk); for (n=1, nn, kk = f(n); if (kk>k, print1(n, ", "); k = kk)); \\ Michel Marcus, Mar 24 2021

Formula

For n >= 3, a(n) = 10 * A002182(n) (conjectured).
Showing 1-2 of 2 results.