cp's OEIS Frontend

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.

A103161 GCD of reverse(2^n) and reverse(2^(n+1)), where reverse(k) = A004086(k), the decimal representation of k read backwards.

This page as a plain text file.
%I A103161 #15 Dec 12 2021 20:12:56
%S A103161 2,4,1,1,23,1,1,1,1,4201,2,2,1,1,1,1,1,1,1,1,2,2,1,1,1,7,1,1,1,1,4,2,
%T A103161 1,1,1,1,1,1,1,1,2,2,19,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,
%U A103161 1,1,1,1,34,1,1,1,7,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1
%N A103161 GCD of reverse(2^n) and reverse(2^(n+1)), where reverse(k) = A004086(k), the decimal representation of k read backwards.
%H A103161 Antti Karttunen, <a href="/A103161/b103161.txt">Table of n, a(n) for n = 1..10000</a>
%F A103161 a(n) = gcd(A004094(n), A004094(n+1)).
%e A103161 n=10: GCD of backward written powers of 2 is GCD(4201, 8402) = 4201 = a(10).
%t A103161 rd[x_] :=FromDigits[Reverse[IntegerDigits[x]]] Table[GCD[rd[2^w], rd[2^(w+1)]], {w, 1, 100}]
%t A103161 GCD[IntegerReverse[#[[1]]],IntegerReverse[#[[2]]]]&/@ Partition[ 2^Range[110],2,1] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Aug 24 2017 *)
%o A103161 (PARI)
%o A103161 rev(n) = subst(Polrev(digits(n)), 'x, 10); \\ These two functions from _Charles R Greathouse IV_, Oct 20 2014
%o A103161 A004094(n) = rev(2^n);
%o A103161 A103161(n) = gcd(A004094(n),A004094(1+n)); \\ _Antti Karttunen_, Dec 07 2017
%Y A103161 Cf. A000079, A004094.
%K A103161 base,nonn
%O A103161 1,1
%A A103161 _Labos Elemer_, Jan 25 2005