login
A392198
Position of the first instance of n, expressed in hexadecimal, in the hexadecimal representation of Pi.
1
13, 17, 1, 0, 2, 10, 5, 27, 7, 20, 6, 81, 58, 15, 24, 4, 148, 489, 202, 17, 412, 250, 131, 127, 290, 19, 171, 143, 754, 46, 70, 228, 245, 69, 39, 343, 1, 314, 187, 415, 67, 41, 329, 529, 203, 166, 23, 161, 12, 16, 0, 268, 30, 1446, 242, 26, 37, 218, 379, 512
OFFSET
0,1
COMMENTS
Hexadecimal Pi begins as: 3.243F6A8885A308D313198A2E. The leading "3" value is at position 0. The hexadecimal point is not counted, e.g., the hex number A is at position 6.
LINKS
James S. DeArmon, R Code for A392198
EXAMPLE
a(0)=13, since 0 is at position 13.
MATHEMATICA
d=4000 (* increase d for n>257 *); a[n_]:=SequencePosition[RealDigits[Pi, 16, d][[1]], IntegerDigits[n, 16]][[1, 1]]-1; Array[a, 60, 0] (* James C. McMahon, Mar 06 2026 *)
PROG
(R) # See Links.
(PARI) lista(nn)= localprec(nn*1000); my(p=binary(Pi), a=List()); listput(~a, fromdigits(p[1], 2)); p=p[2]; forstep(i=1, #p-3, 4, listput(~a, fromdigits(p[i..i+3], 2))); p=Vec(a); a=List(); for(i=0, nn-1, my(d=if(i, digits(i, 16), [0])); for(j=1, #p, if(d==p[j..j+#d-1], listput(~a, j-1); break))); Vec(a); \\ Ruud H.G. van Tol, Mar 06 2026
CROSSREFS
KEYWORD
nonn,base
AUTHOR
James S. DeArmon, Jan 31 2026
STATUS
approved