login
Number of numbers not divisible by 10 that stay multiples of themselves when freed of their last n digits.
4

%I #25 Aug 29 2024 01:19:43

%S 23,473,7053,93643,1166714,13969985,162725300,1857511487,20877697534,

%T 231802823099,2548286736153,27785452448917,300880375389561,

%U 3239062263180829,34693207724723990,369957928177109127,3929837791070240044,41600963003695964039,439035480966899467108

%N Number of numbers not divisible by 10 that stay multiples of themselves when freed of their last n digits.

%H Max Alekseyev, <a href="/A095256/b095256.txt">Table of n, a(n) for n = 1..36</a>

%H S. Das <a href="http://ken.duisenberg.com/potw/archive/040323sol.html">Dividing by Dropping Digits</a>

%F a(n) = Sum_{r=1..10^n-1} tau(r) = A006218(A002283(n)).

%F a(n) = A057494(n) - (n+1)^2. - _Max Alekseyev_, Jan 25 2010

%e We have the following a(1)=23 two-digit numbers not ending in zero: 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 24, 26, 28, 33, 36, 39, 44, 48, 55, 66, 77, 88, 99; each is divisible by its tens digit.

%t k = s = 0; Do[ While[ k < 10^n - 1, k++; s = s + DivisorSigma[ 0, k ]]; Print[s], {n, 9}] (* _Robert G. Wilson v_, Jun 05 2004 *)

%o (Python)

%o from math import isqrt

%o def A095256(n): return -(s:=isqrt(m:=10**n))**2+(sum(m//k for k in range(1,s+1))<<1)-(n+1)**2 # _Chai Wah Wu_, Oct 23 2023

%Y Cf. A057494.

%K base,nonn

%O 1,1

%A _Lekraj Beedassy_, Jul 02 2004

%E a(5)-a(9) from _Robert G. Wilson v_, Jul 05 2004

%E a(10) onward from _Max Alekseyev_, Jan 25 2010, Aug 04 2015