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

A004615 Divisible only by primes congruent to 1 mod 5.

Original entry on oeis.org

1, 11, 31, 41, 61, 71, 101, 121, 131, 151, 181, 191, 211, 241, 251, 271, 281, 311, 331, 341, 401, 421, 431, 451, 461, 491, 521, 541, 571, 601, 631, 641, 661, 671, 691, 701, 751, 761, 781, 811, 821, 881, 911, 941
Offset: 1

Views

Author

Keywords

Comments

Also numbers with all divisors ending with digit 1.
Union of number 1, A030430 and A068872. - Jaroslav Krizek, Feb 12 2012
Also numbers with all divisors ending with the same digit; as 1 divides all the integers, this digit is necessarily 1 (see first comment); hence, for these numbers m: A330348(m) = A000005(m). - Bernard Schott, Nov 09 2020

Crossrefs

Cf. A027748, A030430 (primes), A068872 (composites).
Cf. A010879, A027750, A002808, A330348, A338784 (subsequence).

Programs

  • Haskell
    a004615 n = a004615_list !! (n-1)
    a004615_list = filter (all (== 1) . (map (`mod` 5) . a027748_row)) [1..]
    -- Reinhard Zumkeller, Apr 16 2012
    
  • Magma
    [n: n in [1..1500] | forall{d: d in PrimeDivisors(n) | d mod 5 eq 1}]; // Vincenzo Librandi, Aug 21 2012
    
  • Mathematica
    ok[1]=True;ok[n_]:=And@@(Mod[#,5]==1&)/@FactorInteger[n][[All,1]];Select[Range[2000],ok] (* Vincenzo Librandi, Aug 21 2012 *)
    Select[Range[1000],Union[Mod[#,5]&/@FactorInteger[#][[All,1]]]=={1}&] (* Harvey P. Dale, Apr 19 2019 *)
  • PARI
    is(n)=#select(p->p%5!=1, factor(n)[,1])==0 \\ Charles R Greathouse IV, Mar 11 2014

Extensions

A206291 merged in by Franklin T. Adams-Watters, Sep 21 2012

A357299 a(n) is the number of divisors of n whose first digit equals the first digit of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 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
Offset: 1

Views

Author

Bernard Schott, Sep 23 2022

Keywords

Comments

Similar to A330348, but with last digit.
a(n) >= 1 because there is always a divisor that fits: n.
a(n) >= 2 for n>1 in A131835.

Examples

			The divisors of 26 that start in 2 are 2 and 26, so a(26) = 2.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := IntegerDigits[n][[1]]; a[n_] := DivisorSum[n, 1 &, f[#] == f[n] &]; Array[a, 100] (* Amiram Eldar, Sep 23 2022 *)
  • PARI
    a(n) = my(fd=digits(n)[1]); sumdiv(n, d, digits(d)[1] == fd); \\ Michel Marcus, Sep 23 2022
    
  • Python
    from sympy import divisors
    def a(n): f = str(n)[0]; return sum(1 for d in divisors(n) if str(d)[0]==f)
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Sep 23 2022

A346392 a(n) is the number of proper divisors of n ending with the same digit as n.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Jul 15 2021

Keywords

Examples

			a(40) = 2 since there are 2 proper divisors of 40 ending with 0: 10 and 20.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Length[Drop[Select[Divisors[n], (Mod[#,10]==Mod[n,10]&)], -1]]; Array[a, 90]
  • PARI
    a(n) = my(x = n%10); sumdiv(n, d, if (dMichel Marcus, Jul 19 2021
    
  • Python
    from sympy import divisors
    def a(n): return sum(d%10 == n%10 for d in divisors(n)[:-1])
    print([a(n) for n in range(1, 91)]) # Michael S. Branicky, Jul 31 2021

Formula

For a prime p, a(p) = 1 if p has the final digit equal to 1, otherwise a(p) = 0.
a(n) = A330348(n) - 1. - Michel Marcus, Jul 19 2021

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

Original entry on oeis.org

1, 11, 40, 60, 160, 120, 640, 240, 360, 480, 8064, 600, 18144, 1920, 1440, 1200, 72576, 1800, 52416, 2400, 5760, 30720, 183456, 3600, 12960, 122880, 9000, 9600, 602784, 7200, 445536, 8400, 92160, 798336, 51840, 12600, 2159136, 576576, 368640, 16800, 2935296, 28800
Offset: 1

Views

Author

Bernard Schott, Jun 11 2020

Keywords

Comments

a(n) exists for any n >= 1. Indeed, the number 5*2^n (see A020714), n >= 1, has exactly n divisors (5*2^1, 5*2^2, ..., 5*2^n), with the last digit 0. - Marius A. Burtea, Jun 12 2020
It's always the case when a(n) ends in 0 then a(n) = 10 * A005179(n). Proof: Let v be the list of divisors of a(n) that end in 0. We then have |v| = n and lcm(v) = a(n) as a(n) is in v and all other terms in v divide a(n). We then have lcm(v)/10 = a(n)/10 where a(n)/10 has exactly n divisors. The least positive integer that has exactly n divisors is A005179(n). - Bernard Schott and David A. Corneth, Jun 12 2020
For some p_i^e_i||a(n) and p_j^e_j||a(n) where p_i and p_j are primes such that p_i < p_j, 10 | (p_j - p_i) and t^k||u denotes t^k|u but t^(k + 1) doesn't divide u i.e. gcd(t, u/t^k) = 1 denotes then e_i >= e_j. For example k * 11^2 * 31^3 where gcd(k, 11*31) = 1 can't be a term as the multiplicity of 11 is less than the multiplicity of 31. - David A. Corneth, Jun 12 2020

Examples

			Of the twelve divisors of 60, four have their last digit equals to the last digit of 60: 10, 20, 30 and 60, and there is no smaller number k with four divisors whose last digit equals the last digit of k, hence a(4) = 60.
		

Crossrefs

Similar with: A333456 (Niven numbers), A335038 (Zuckerman numbers).

Programs

  • Magma
    a:=[]; for n in [1..30] do k:=1; while #[d:d in Divisors(k)|k mod 10 eq d mod 10] ne n do k:=k+1; end while; Append(~a,k); end for; a; // Marius A. Burtea, Jun 12 2020
  • Mathematica
    d[n_] := DivisorSum[n, 1 &, Mod[# - n, 10] == 0 &]; mx = 20; c = 0; n = 1; s = Table[0, {mx}]; While[c < mx, i = d[n]; If[i <= mx && s[[i]] == 0, c++; s[[i]] = n]; n++]; s (* Amiram Eldar, Jun 12 2020 *)
  • PARI
    f(n) = my(u=n%10); sumdiv(n, d, (d%10) == u);
    a(n) = my(k=1); while(f(k) != n, k++); k; \\ Michel Marcus, Jun 12 2020
    

Extensions

Corrected and extended by Marius A. Burtea, Jun 12 2020

A338784 a(n) is the smallest number with exactly n divisors such that all its divisors end with the same digit (which is necessarily 1).

Original entry on oeis.org

1, 11, 121, 341, 14641, 3751, 1771561, 13981, 116281, 453871, 25937424601, 153791, 3138428376721, 54918391, 14070001, 852841, 45949729863572161, 4767521, 5559917313492231481, 18608711, 1702470121, 804060162631, 81402749386839761113321, 9381251, 13521270961, 97291279678351, 195468361
Offset: 1

Views

Author

Bernard Schott, Nov 09 2020

Keywords

Comments

As 1 is a divisor for each number, all the divisors must end with 1.

Examples

			121 is the smallest number whose 3 divisors (1, 11, 121) end with 1, hence a(3) = 121.
3751 is the smallest number whose 6 divisors (1, 11, 31, 121, 341, 3751) end with 1, hence a(6) = 121.
a(18) = 4767521 = 11^2 * 31^2 * 41 as it has 18 divisors all of which end in 1. - _David A. Corneth_, Nov 09 2020
		

Crossrefs

Subsequence of A004615.

Programs

  • PARI
    a(n) = {my(pr); if(n==1, return(1)); if(isprime(n), return(11^(n-1))); forstep(i = 1, oo, 10, f = factor(i); if(numdiv(f) == n, pr = 1; for(j = 1, #f~, if(f[j, 1]%10 != 1, pr = 0; next(2) ) ) ); if(pr, return(i)); ) } \\ David A. Corneth, Nov 09 2020

Formula

If n is prime p, then a(p) = 11^(p-1) = A001020(p-1).
For k>=1, a(2^k) = {Product_m=1..k} A030430(m) = A092609(k).

Extensions

Data corrected by David A. Corneth, Nov 09 2020

A338822 a(n) is the number of divisors of n whose last digits equal the number of digits of n.

Original entry on oeis.org

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

Views

Author

Bernard Schott, Nov 11 2020

Keywords

Comments

Inspired by Project Euler, Problem 474 (see link).
If in the name, one replaces “whose last digits equal” with “whose last digit equals” then, this sequence is finite and the last term should be a(999999999) = 5 because 999999999 has 9 digits and among the 20 divisors of 999999999, five of them (9, 999, 9009009, 12345679 and 999999999) have the last digit 9.
With this name, the next term is a(10^9) = 1 because 10^9 has 10 digits and among the 100 divisors of 10^9, only one of them (10) ends with 10.
For p prime, p >= 7, the number 10^(p - 1) + p - 1 is divisible by p and the number of digits is p, so it has at least one divisor that ends in p. Thus, there is an infinity of terms a(k) > 0. - Marius A. Burtea, Nov 12 2020

Examples

			72 has 2 digits, and among the divisors of 72 (1, 2, 3, 4, 6, 12, 18, 24, 36, 72), three of them (2, 12 and 72) have the last digit 2, hence a(72) = 3.
111 has 3 digits, and among the divisors of 111 (1, 3, 37, 111), only one of them (3) has the last digit 3, hence a(111) = 1.
		

Crossrefs

Programs

  • Magma
    [#[d:d in Divisors(n) | d mod 10^(#Intseq(#Intseq(n))) eq #Intseq(n)]:n in [1..100]]; // Marius A. Burtea, Nov 12 2020
    
  • Maple
    f:= proc(n) local d, dd;
      d:= ilog10(n)+1;
      dd:= ilog10(d)+1;
      nops(select(t -> t mod 10^dd = d, numtheory:-divisors(n)))
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 12 2020
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, Divisible [# - (ndigit = IntegerLength[n]), 10^IntegerLength[ndigit]] &]; Array[a, 100] (* Amiram Eldar, Nov 12 2020 *)
  • PARI
    a(n) = my(nb = #Str(n), nc = #Str(nb)); sumdiv(n, d, if (dMichel Marcus, Nov 16 2020

Formula

For 1-digit numbers: a(n) = 1.
For 2-digit numbers: a(n) = 0 iff n is odd, a(n) >= 1 if n is even.
For 4-digit numbers: a(n) = 0 if n is odd.
For 5-digit numbers, a(n) >= 2 if n ends with 5, a(n) >=1 if n ends with 0, otherwise a(n) = 0.
For 8-digit numbers, a(n) = 0 if n is odd.

Extensions

Name generalized following remark of Marius A. Burtea, Nov 12 2020

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

A346393 Irregular triangle read by rows: the n-th row gives the divisors of n ending with the final digit of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 11, 2, 12, 13, 14, 5, 15, 16, 17, 18, 19, 10, 20, 1, 21, 2, 22, 23, 4, 24, 5, 25, 26, 27, 28, 29, 10, 30, 1, 31, 2, 32, 3, 33, 34, 5, 35, 6, 36, 37, 38, 39, 10, 20, 40, 1, 41, 2, 42, 43, 4, 44, 5, 15, 45, 46, 47, 8, 48, 49, 10, 50
Offset: 1

Views

Author

Stefano Spezia, Jul 21 2021

Keywords

Examples

			The triangle begins:
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
    1     11
    2     12
   13
   14
    5     15
   16
   17
   18
   19
   10     20
    1     21
    2     22
   23
    4     24
    5     25
   26
   27
   28
   29
   10     30
    1     31
    2     32
    3     33
   34
    5     35
    6     36
   37
   38
   39
   10     20     40
   ...
		

Crossrefs

Cf. A010879, A027750, A330348 (row length).

Programs

  • Mathematica
    r[n_]:=Drop[Select[Divisors[n],(Mod[#,10]==Mod[n,10]&)]]; Flatten[Array[r, 50]]
  • PARI
    row(n) = select(x->(x%10) == (n%10), divisors(n)); \\ Michel Marcus, Jul 25 2021
  • Python
    from sympy import divisors
    def auptorow(nn):
        for n in range(1, nn+1):
            yield from [d for d in divisors(n) if d%10 == n%10]
    print([an for an in auptorow(50)]) # Michael S. Branicky, Jul 21 2021
    
Showing 1-8 of 8 results.