login
A272479
a(n) is the smallest k different from n such that (n, k) is a Harshad amicable pair (see the comments).
0
10, 10, 12, 20, 10, 12, 70, 40, 18, 1, 10, 3, 76, 10, 12, 35, 296, 9, 10, 2, 3, 20, 10, 6, 14, 184, 9, 10, 20999, 3, 100, 10, 12, 98, 16, 9, 10, 11, 12, 4, 10, 6, 99799, 40, 9, 10, 2099999, 12, 52, 5, 12, 49, 1000, 9, 10, 11, 12, 1001, 7998998, 6, 7999999, 200, 9, 10, 319, 12, 68989999, 98, 30, 7, 1000, 9, 10, 11, 12, 13, 56, 15, 10000, 8
OFFSET
1,1
COMMENTS
Let m and k be distinct integers and dsum(n) be the sum of digits of n. We call m and k Harshad amicable if dsum(m) divides k and dsum(k) divides m.
For any n with no Harshad amicable partner, a(n)=0.
Conjecture: the sequence contains no zeros.
Large terms of a(n) correspond to prime indices and prime indices whose sum of digits is prime correspond to particularly large terms.
EXAMPLE
For n=12, a(12)=3 as the smallest number such that its sum of digits (3) divides n and the sum of digits of n (3) divides a(n).
For n=13, a(13)=76 as the smallest number such that its sum of digits (13) divides n and the sum of digits of n (4) divides a(n).
MATHEMATICA
lst={}; Do[k=1; While[ k!=n&& !(Divisible[n, Total@IntegerDigits@k]&& Divisible[k, Total@IntegerDigits@n]), k++]; If[k==n, k=n+1; While[!(Divisible[n, Total@IntegerDigits@k]&& Divisible[k, Total@IntegerDigits@n]), k++]]; AppendTo[lst, k], {n, 1, 80}]; lst
PROG
(PARI) for(n=1, 80, k=1; while(k!=n && !(n%sumdigits(k)==0 && k%sumdigits(n)==0), k++); if(k==n, k=n+1; while(!(n%sumdigits(k)==0 && k%sumdigits(n)==0), k++)); print1(k ", "))
CROSSREFS
Cf. A005349 (Harshad numbers), A007953 (digital sum).
Sequence in context: A354113 A354114 A175220 * A167427 A227437 A352314
KEYWORD
nonn,base
AUTHOR
Waldemar Puszkarz, May 01 2016
STATUS
approved