[go: up one dir, main page]

login
Search: a341431 -id:a341431
     Sort: relevance | references | number | modified | created      Format: long | short | data
Numbers divisible by their last digit.
+10
35
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,2
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
LINKS
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 *)
PROG
(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
(Python)
A034709_list = [n for n in range(1, 1000) if n % 10 and not n % (n % 10)]
# Chai Wah Wu, Sep 18 2014
(PARI) for(n=1, 200, if(n%10, if(!(n%digits(n)[#Str(n)]), print1(n, ", ")))) \\ Derek Orr, Sep 19 2014
KEYWORD
nonn,base,easy,nice
STATUS
approved
a(n) is the denominator of the asymptotic density of numbers divisible by their last digit in base n.
+10
4
2, 2, 12, 12, 60, 20, 840, 840, 2520, 2520, 27720, 27720, 360360, 360360, 720720, 720720, 12252240, 4084080, 232792560, 77597520, 33256080, 5173168, 5354228880, 356948592, 3824449200, 26771144400, 11473347600, 80313433200, 332727080400, 2329089562800, 144403552893600
OFFSET
2,1
COMMENTS
a(n) divides A003418(n), and a(n) = A003418(n) for n = 1, 2, 4, 6, 8, 10, 12, ...
LINKS
FORMULA
A341431(n)/a(n) = (1/n) * Sum_{k=1..n-1} gcd(k, n)/k. [corrected by Amiram Eldar, Nov 16 2022]
a(prime(n)) = A185399(n), for n > 1.
EXAMPLE
For n=2, the numbers divisible by their last binary digit are the odd numbers (A005408) whose density is 1/2, therefore a(2) = 2.
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) = 2.
For n=10, the numbers divisible by their last digit in base 10 are A034709 whose density is 1177/2520, therefore a(10) = 2520.
MATHEMATICA
a[n_] := Denominator[Sum[GCD[k, n]/k, {k, 1, n - 1}]/n]; Array[a, 32, 2]
CROSSREFS
Cf. A003418, A005408, A034709, A047236, A185399, A341431 (numerators).
KEYWORD
nonn,base,frac,easy
AUTHOR
Amiram Eldar, Feb 11 2021
STATUS
approved
a(n) = numerator((prime(n)-1)/prime(n)#), where prime(n)# = A002110(n) is the n-th primorial.
+10
2
1, 1, 2, 1, 1, 2, 8, 3, 1, 2, 1, 6, 4, 1, 1, 2, 1, 2, 1, 1, 12, 1, 1, 4, 16, 10, 1, 1, 18, 8, 3, 1, 4, 1, 2, 5, 2, 27, 1, 2, 1, 6, 1, 32, 14, 3, 1, 1, 1, 2, 4, 1, 8, 25, 128, 1, 2, 9, 2, 4, 1, 2, 3, 1, 4, 2, 1, 8, 1, 2, 16, 1, 1, 2, 9, 1, 2, 6, 40, 4, 1, 2, 1
OFFSET
1,3
COMMENTS
f(n) = a(n)/A356094(n) is the asymptotic density of numbers k such that prime(n) = A053669(k) is the smallest prime not dividing k.
The asymptotic mean of A053669 is 2.9200509773... (A249270) which is the weighted mean of the primes with f(n) as weights. The corresponding asymptotic standard deviation, which can be evaluated from the second raw moment Sum_{n>=1} f(n) * prime(n)^2, is 2.8013781465... .
LINKS
FORMULA
a(n) = 1 iff prime(n) is in A039787.
Let f(n) = a(n)/A356094(n):
f(n) = A006093(n)/A002110(n).
Sum_{n>=1} f(n) = 1.
Sum_{n>=1} f(n) * prime(n) = A249270.
EXAMPLE
Fractions begin with 1/2, 1/3, 2/15, 1/35, 1/231, 2/5005, 8/255255, 3/1616615, 1/10140585, 2/462120945, ...
MATHEMATICA
primorial[n_] := Product[Prime[i], {i, 1, n}]; Numerator[Table[(Prime[i] - 1)/primorial[i], {i, 1, 100}]]
PROG
(PARI) a(n) = numerator((prime(n)-1)/factorback(primes(n))); \\ Michel Marcus, Jul 26 2022
(Python)
from math import gcd
from sympy import prime, primorial
def A356093(n): return (p:=prime(n)-1)//gcd(p, primorial(n)) # Chai Wah Wu, Jul 26 2022
CROSSREFS
Cf. A002110, A006093, A039787, A053669, A249270, A356094 (denominators).
Similar sequences: A038110, A338559, A340818, A341431, A342450, A342479.
KEYWORD
nonn,frac
AUTHOR
Amiram Eldar, Jul 26 2022
STATUS
approved

Search completed in 0.004 seconds