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

A034709 Numbers divisible by their last digit.

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, 111, 112, 115, 121, 122, 123, 124, 125, 126, 128, 131, 132
Offset: 1

Views

Author

Keywords

Comments

The differences between consecutive terms repeat with period 1177 and the corresponding terms differ by 2520 = LCM(1,2,...,9). In other words, a(k*1177+i) = 2520*k + a(i). - Giovanni Resta, Aug 20 2015
The asymptotic density of this sequence is 1177/2520 = 0.467063... (see A341431 and A341432 for the values in other base representations). - Amiram Eldar, Nov 24 2022

Crossrefs

Programs

  • Haskell
    import Data.Char (digitToInt)
    a034709 n = a034709_list !! (n-1)
    a034709_list =
       filter (\i -> i `mod` 10 > 0 && i `mod` (i `mod` 10) == 0) [1..]
    -- Reinhard Zumkeller, Jun 19 2011
    
  • Maple
    N:= 1000: # to get all terms <= N
    sort([seq(seq(ilcm(10,d)*x+d, x=0..floor((N-d)/ilcm(10,d))), d=1..9)]); # Robert Israel, Aug 20 2015
  • Mathematica
    dldQ[n_]:=Module[{idn=IntegerDigits[n],last1},last1=Last[idn]; last1!= 0&&Divisible[n,last1]]; Select[Range[150],dldQ]  (* Harvey P. Dale, Apr 25 2011 *)
    Select[Range[150],Mod[#,10]!=0&&Divisible[#,Mod[#,10]]&] (* Harvey P. Dale, Aug 07 2022 *)
  • PARI
    for(n=1,200,if(n%10,if(!(n%digits(n)[#Str(n)]),print1(n,", ")))) \\ Derek Orr, Sep 19 2014
  • Python
    A034709_list = [n for n in range(1, 1000) if n % 10 and not n % (n % 10)]
    # Chai Wah Wu, Sep 18 2014
    

A341431 a(n) is the numerator of the asymptotic density of numbers divisible by their last digit in base n.

Original entry on oeis.org

1, 1, 7, 5, 37, 7, 421, 347, 1177, 671, 14939, 6617, 135451, 140311, 271681, 143327, 5096503, 751279, 91610357, 24080311, 9098461, 830139, 2188298491, 77709491, 925316723, 6609819823, 3567606143, 10876020307, 123417992791, 300151059037, 37903472946337, 32271030591223
Offset: 2

Views

Author

Amiram Eldar, Feb 11 2021

Keywords

Examples

			The sequence of fractions begins with 1/2, 1/2, 7/12, 5/12, 37/60, 7/20, 421/840, 347/840, 1177/2520, 671/2520, 14939/27720, 6617/27720, 135451/360360, 140311/360360, ...
For n=2, the numbers divisible by their last binary digit are the odd numbers (A005408) whose density is 1/2, therefore a(2) = 1.
For n=3, the numbers divisible by their last digit in base 3 are the numbers that are congruent to {1, 2, 4} mod 6 (A047236) whose density is 1/2, therefore a(3) = 1.
For n=10, the numbers divisible by their last digit in base 10 are A034709 whose density is 1177/2520, therefore a(10) = 1177.
		

Crossrefs

Cf. A005408, A034709, A047236, A341432 (denominators).

Programs

  • Mathematica
    a[n_] := Numerator[Sum[GCD[k, n]/k, {k, 1, n - 1}]/n]; Array[a, 32, 2]

Formula

a(n)/A341432(n) = (1/n) * Sum_{k=1..n-1} gcd(k, n)/k. [corrected by Amiram Eldar, Nov 16 2022]

A356094 a(n) = denominator((prime(n)-1)/prime(n)#), where prime(n)# = A002110(n) is the n-th primorial.

Original entry on oeis.org

2, 3, 15, 35, 231, 5005, 255255, 1616615, 10140585, 462120945, 6685349671, 1236789689135, 30425026352721, 311494317420715, 13367169186706335, 1253429172199617105, 33151040519900217915, 3909612711980232366109, 119065478046670712967865, 7970583287524270870963077
Offset: 1

Views

Author

Amiram Eldar, Jul 26 2022

Keywords

Comments

See A356093 for details.

Crossrefs

Cf. A002110, A356093 (numerators).
Similar sequences: A038111, A338560, A340819, A341432, A342451, A342480.

Programs

  • Mathematica
    primorial[n_] := Product[Prime[i], {i, 1, n}]; Denominator[Table[(Prime[i] - 1)/primorial[i], {i, 1, 20}]]
  • PARI
    a(n) = denominator((prime(n)-1)/factorback(primes(n))); \\ Michel Marcus, Jul 26 2022
    
  • Python
    from math import gcd
    from sympy import primorial, prime
    def A356094(n): return (p:=primorial(n))//gcd(p,prime(n)-1) # Chai Wah Wu, Jul 26 2022
Showing 1-3 of 3 results.