%I #13 Jul 12 2022 08:41:17
%S 1,2,3,4,5,6,7,8,9,11,12,15,14,15,21,17,18,19,20,22,22,24,23,30,30,28,
%T 27,30,29,33,32,34,36,34,40,45,37,38,42,44,42,44,43,48,50,46,47,60,49,
%U 55,52,54,53,54,60,56,57,58,59,66,62,64,66,68,70,72,67
%N a(n) is the sum of the divisors of n whose decimal expansions appear as substrings in the decimal expansion of n.
%H Rémy Sigrist, <a href="/A355620/b355620.txt">Table of n, a(n) for n = 1..10000</a>
%H Rémy Sigrist, <a href="/A355620/a355620.png">Scatterplot of the first 100000 terms</a> (red pixels indicate when n is a multiple of 10)
%H <a href="/index/De#decimal_expansion">Index entries for sequences related to decimal expansion of n</a>
%H <a href="/index/Di#divisors">Index entries for sequences related to divisors</a>
%F a(n) >= n.
%F a(n) <= A000203(n) with equality iff n belongs to A239058.
%F a(10^n) = A002275(n+1) for any n >= 0.
%e For n = 110:
%e - the divisors of 110 are: 1, 2, 5, 10, 11, 22, 55, 110,
%e - 1, 10, 11 and 110 appear as substrings in 110,
%e - so a(110) = 1 + 10 + 11 + 110 = 132.
%o (PARI) a(n, base=10) = { my (d=digits(n, base), s=setbinop((i,j) -> fromdigits(d[i..j], base), [1..#d]), v=0); for (k=1, #s, if (s[k] && n%s[k]==0, v+=s[k])); return (v) }
%o (Python)
%o from sympy import divisors
%o def a(n):
%o s = str(n)
%o return sum(d for d in divisors(n, generator=True) if str(d) in s)
%o print([a(n) for n in range(1, 68)]) # _Michael S. Branicky_, Jul 10 2022
%Y Cf. A000203, A002275, A121041, A121042, A239058, A355633 (binary analog).
%K nonn,base
%O 1,2
%A _Rémy Sigrist_, Jul 10 2022
|