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
Michael S. Branicky, Table of n, a(n) for n = 0..10000
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
