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
KEYWORD
nonn,base
AUTHOR
Waldemar Puszkarz, May 01 2016
STATUS
approved