login
A101705
Numbers n such that n = 12*reversal(n).
6
0, 540, 5940, 54540, 59940, 540540, 599940, 5400540, 5454540, 5945940, 5999940, 54000540, 54594540, 59405940, 59999940, 540000540, 540540540, 545454540, 545994540, 594005940, 594545940, 599459940, 599999940, 5400000540, 5405940540, 5454054540, 5459994540, 5940005940, 5945945940, 5994059940, 5999999940
OFFSET
1,2
COMMENTS
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.
LINKS
FORMULA
a(n) = 540*A057148. - Ray Chandler, Oct 09 2017
EXAMPLE
g(540,0,5)= (540)(6) = 540540540540540540 is in the sequence because reversal(540540540540540540) = 45045045045045045 and 12*45045045045045045 = 540540540540540540.
MATHEMATICA
Do[If[n == 12*FromDigits[Reverse[IntegerDigits[n]]], Print[n]], {n, 0, 6000000000, 60}]
Select[Range[0, 6*10^9, 60], #==12IntegerReverse[#]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 12 2017 *)
PROG
(Python)
def A101705(n):
if n == 1: return 0
a = 1<<n.bit_length()-2
s = bin(a|(n&a-1))[2:]
return 540*int(s+(s[::-1] if a&n else s[-2::-1])) # Chai Wah Wu, Jul 23 2024
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Farideh Firoozbakht, Jan 02 2005
EXTENSIONS
a(25)-a(31) from Max Alekseyev, Aug 18 2013
STATUS
approved