The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A333666 Smallest k > 0 with gcd(k, rev(k)) = n, where rev(k) is digit reversal of k and with sum of digits of k = n, or 0 if no such k exists. 2
 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 209, 48, 4000009, 21182, 5055, 21184, 13328, 288, 12844, 0, 1596, 2398, 13892, 2976, 52675, 45890, 2889, 61768, 178292, 0, 177475, 29984, 42999, 279718, 529865, 29988, 1009009009009, 485678, 1951599, 0, 694499, 655998, 1677688, 658988 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS As gcd(k, rev(k)) = n, n | k and n | rev(k). - David A. Corneth, Sep 03 2020 Since the sum of the digits of k is n and n | k, all the terms that are not 0 are Niven numbers (A005349). - Amiram Eldar, Sep 03 2020 The first digit of any number of this sequence is less than or equal to the last digit of this number, because if k fulfills all requirements, also rev(k) does. This means that numbers starting with a "9" are quite rare. So far we have found only 9. But numbers ending with a "1" seem to be even less frequent. Amongst the first 303 terms of this sequence there is none except the trivial solution a(1) = 1. The second number of this sequence ending with a "1", if it exists, is still to be found. - Ruediger Jehn, Sep 20 2020 LINKS Ruediger Jehn, Table of n, a(n) for n = 1..303 Ruediger Jehn, Proofs for difficult terms FORMULA There is no general formula, except for multiples of 10. a(10*n) = 0 since all multiples of 10 have a 0 at the end, but their reverse numbers have no 0 at the end and therefore 10*n cannot be their gcd. EXAMPLE a(11) = 209. The sum of the digits is 11 and gcd(209,902) = 11. a(12) = 48. The sum of the digits is 12 and gcd(48,84) = 12. MATHEMATICA m = 36; s = Table[0, {m}]; c = 0; n = 1; While[c < m - Quotient[m, 10], g = GCD[n, FromDigits @ Reverse @ (d = IntegerDigits[n])]; If[g <= m && g == Plus @@ d && s[[g]] == 0, c++; s[[g]] = n]; n++]; s (* Amiram Eldar, Sep 03 2020 *) PROG (Python) for n in range(11, 20):     for k in range(n, 1000000000, n):        s = str(k)        revk = "" # digit reversal of k        sum = 0        for i in range(len(s)):           revk = revk + s[len(s) - i - 1]           sum = sum + int(s[i])        g = gcd(k, int(revk))        if g == n and sum == n:           print(n, k, revk, g)           break (PARI) a(n) = {if ((n % 10) == 0, return(0)); my(k=n); while (! ((sumdigits(k)==n) && (gcd(k, fromdigits(Vecrev(digits(k)))) == n)), k+=n); k; } \\ Michel Marcus, Sep 03 2020 CROSSREFS It differs from A069554 in such that additionally the sum of the digits of a(n) must be equal to n. This is not required in A069554. Cf. A004086, A005349, A007953. Sequence in context: A084044 A169930 A048379 * A033307 A007376 A189823 Adjacent sequences:  A333663 A333664 A333665 * A333667 A333668 A333669 KEYWORD nonn,base AUTHOR Ruediger Jehn and Kester Habermann, Sep 03 2020 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 22 10:48 EST 2021. Contains 340362 sequences. (Running on oeis4.)