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.

A101705 Numbers n such that n = 12*reversal(n).

This page as a plain text file.
%I A101705 #16 Jul 23 2024 20:21:35
%S A101705 0,540,5940,54540,59940,540540,599940,5400540,5454540,5945940,5999940,
%T A101705 54000540,54594540,59405940,59999940,540000540,540540540,545454540,
%U A101705 545994540,594005940,594545940,599459940,599999940,5400000540,5405940540,5454054540,5459994540,5940005940,5945945940,5994059940,5999999940
%N A101705 Numbers n such that n = 12*reversal(n).
%C A101705 60 divides all terms of the sequence. For all nonnegative integers m and n all numbers of the form f(m,n) = (100*(6*10^m - 1)+ 40)*(10^((m + 2)*n) - 1)/(10^(m + 2) - 1) are in the sequence, in fact f(m,n) = (5.(9)(m))(n).0 where dot between numbers means concatenation and "(r)(t)" means number of r's is t. f(m,1) = 100*(6*10^m - 1)+ 40 = 5.(9)(m).40; f(0,1) = 540, f(1,1) = 5940, f(2,1)=59940, etc. f(m,2) = 5.(9)(m).50(9)(m).40; f(0,2) = 54540, f(1,2) = 5945940, etc. Let g(s,t,r) = s*(10^((L+t)(1+r))-1)/(10^(L+t)-1) where L = number of digits of s. If s is in the sequence then all numbers of the form g(s,t,r) for nonnegative integers t and r are in the sequence (the function g is the same function that has been defined in the sequence A101704). If n and m are nonnegative integers then g(n,0,m) = (n)(m+1) for example g(13,0,3) = (13)(4) = 13131313.
%H A101705 Ray Chandler, <a href="/A101705/b101705.txt">Table of n, a(n) for n = 1..10000</a>
%F A101705 a(n) = 540*A057148. - _Ray Chandler_, Oct 09 2017
%e A101705 g(540,0,5)= (540)(6) = 540540540540540540 is in the sequence because reversal(540540540540540540) = 45045045045045045 and 12*45045045045045045 = 540540540540540540.
%t A101705 Do[If[n == 12*FromDigits[Reverse[IntegerDigits[n]]], Print[n]], {n, 0, 6000000000, 60}]
%t A101705 Select[Range[0,6*10^9,60],#==12IntegerReverse[#]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Apr 12 2017 *)
%o A101705 (Python)
%o A101705 def A101705(n):
%o A101705     if n == 1: return 0
%o A101705     a = 1<<n.bit_length()-2
%o A101705     s = bin(a|(n&a-1))[2:]
%o A101705     return 540*int(s+(s[::-1] if a&n else s[-2::-1])) # _Chai Wah Wu_, Jul 23 2024
%Y A101705 Cf. A101704, A101706, A001232, A008918.
%K A101705 base,nonn
%O A101705 1,2
%A A101705 _Farideh Firoozbakht_, Jan 02 2005
%E A101705 a(25)-a(31) from _Max Alekseyev_, Aug 18 2013