This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A055483 #62 Feb 19 2024 01:58:47 %S A055483 1,2,3,4,5,6,7,8,9,1,11,3,1,1,3,1,1,9,1,2,3,22,1,6,1,2,9,2,1,3,1,1,33, %T A055483 1,1,9,1,1,3,4,1,6,1,44,9,2,1,12,1,5,3,1,1,9,55,1,3,1,1,6,1,2,9,2,1, %U A055483 66,1,2,3,7,1,9,1,1,3,1,77,3,1,8,9,2,1,12,1,2,3,88,1,9,1,1,3,1,1,3,1,1,99,1,101,3,1,1,3,1,1,9,1,11,111 %N A055483 a(n) is the GCD of n and the reverse of n. %C A055483 a(A226778(n)) = 1; a(A071249(n)) > 1. - _Reinhard Zumkeller_, Jun 18 2013 %C A055483 a(n) = n iff n >= 1 is a palindrome (n is in A002113). - _Felix Fröhlich_, Oct 28 2014 %H A055483 Indranil Ghosh, <a href="/A055483/b055483.txt">Table of n, a(n) for n = 1..50000</a> (first 1000 terms from T. D. Noe) %F A055483 a(n) = gcd(n, A004086(n)). - _Felix Fröhlich_, Oct 28 2014 %F A055483 3 | a(n) if 3 | n and 9 | a(n) if 9 | n. - _Alonso del Arte_, Aug 31 2021 %e A055483 a(12) = 3 since gcd(12, 21) = 3. %e A055483 a(13) = 1 since 13 and 31 are coprime. %e A055483 a(101) = gcd(101, 101) = 101. %t A055483 gcn[n_] := GCD[n, IntegerReverse[n]]; Array[gcn, 120] (* _Harvey P. Dale_, Jan 23 2012 *) %o A055483 (Haskell) %o A055483 a055483 n = gcd n $ a004086 n -- _Reinhard Zumkeller_, Jun 18 2013 %o A055483 (PARI) a004086(n)=eval(concat(Vecrev(Str(n)))) %o A055483 a(n)=gcd(n, a004086(n)) \\ _Felix Fröhlich_, Oct 28 2014 %o A055483 (Magma) [Gcd(n, Seqint(Reverse(Intseq(n)))): n in [1..100]]; // _Vincenzo Librandi_, Oct 29 2014 %o A055483 (Scala) def reverseDigits(n: Int): Int = Integer.parseInt(n.toString.reverse) %o A055483 def euclGCD(a: Int, b: Int): Int = b match { case 0 => a; case n => Math.abs(euclGCD(b, a % b)) } %o A055483 (1 to 120).map(n => euclGCD(n, reverseDigits(n))) // _Alonso del Arte_, Aug 31 2021 %o A055483 (Python) %o A055483 from math import gcd %o A055483 def a(n): return gcd(n, int(str(n)[::-1])) %o A055483 print([a(n) for n in range(1, 112)]) # _Michael S. Branicky_, Aug 31 2021 %Y A055483 Different from A069652, first differs at a(101), since gcd(101, 110) = 1. %Y A055483 Cf. A002113, A004086, A071249, A226778. %K A055483 base,easy,nonn,nice %O A055483 1,2 %A A055483 _Erich Friedman_, Jun 27 2000 %E A055483 Edited by _Robert G. Wilson v_, Apr 10 2002