Smallest k such that the sums of digits of k and k^2 in base 10 are both divisible by n or a(n) = -1 if no such k exists.

A389000

Smallest k such that the sums of digits of k and k^2 in base 10 are both divisible by n or a(n) = -1 if no such k exists.

Terms

    a(0) =1a(1) =2a(2) =3a(3) =13a(4) =19a(5) =24a(6) =149a(7) =583a(8) =9a(9) =19a(10) =74a(11) =264a(12) =2236a(13) =1999a(14) =1374a(15) =19499a(16) =299833a(17) =99a(18) =199a(19) =767a(20) =9417a(21) =812083a(22) =199999a(23) =63087a(24) =1994999a(25) =99483667a(26) =999a(27) =1999a(28) =16697a(29) =768108

External references