OFFSET
1,2
COMMENTS
a(1)=1, and each subsequent term is obtained by interpreting the previous term as a hexadecimal number, converting it into decimal, and incrementing by 1.
This same procedure can be applied to create other base-switch sequences, e.g., between hexadecimal and octal or between decimal and octal. The base b1 in which a(n-1) is interpreted must be larger than the base b2 into which it is converted; otherwise, the b1-th term will be b1 written in base b2, which will not be a valid base-b1 expansion (e.g., with b1=10 and b2=16, we would obtain a(10)="A", which is not a valid decimal number).
FORMULA
a(n) = A102489(a(n-1)) + 1. - Jon E. Schoenfield, Jan 23 2022
Limit_{n->infinity} log(a(n))/log_10(16)^n = 0.180064331228631629088182553063.... - Jon E. Schoenfield, Jan 23 2022
EXAMPLE
a(1)=1;
1_16 = 1_10; 1 + 1 = 2 = a(2);
2_16 = 2_10; 2 + 1 = 3 = a(3);
...
This will continue till a(10)=10, when base differences start to have an effect.
10_16 = 16_10; 16 + 1 = 17 = a(11);
17_16 = 23_10; 23 + 1 = 24 = a(12);
24_16 = 36_10; 36 + 1 = 37 = a(13);
37_16 = 55_10; 55 + 1 = 56 = a(14).
MATHEMATICA
NestList[FromDigits[IntegerDigits[#], 16] + 1 &, 1, 30] (* Amiram Eldar, Jan 23 2022 *)
PROG
(Python)
#Hex-dec switch
seq=[]
seq.append(1)
print(seq[0])
for i in range(1, 50):
dec=int(str(seq[i-1]), 16)
dec=dec+1
seq.append(dec)
print(seq)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Divyanand Valsan, Jan 23 2022
STATUS
approved