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.

A337840 a(n) is the decimal place of the start of the first occurrence of n in the decimal expansion of n^(1/n).

This page as a plain text file.
%I A337840 #58 Oct 08 2020 19:21:54
%S A337840 0,4,10,1,38,6,9,4,12,17,26,0,264,144,107,101,101,4,78,68,36,86,11,17,
%T A337840 147,151,205,50,55,26,307,88,94,180,177,61,113,244,280,37,110,38,285,
%U A337840 101,124,223,243,25,86,116,66,77,146,283,3,60,20,82,27,146,82,140
%N A337840 a(n) is the decimal place of the start of the first occurrence of n in the decimal expansion of n^(1/n).
%C A337840 Does a(n) exist for all n? Some relatively large values: a(1021) = 67714, a(1111) = 64946. - _Chai Wah Wu_, Oct 07 2020
%H A337840 Chai Wah Wu, <a href="/A337840/b337840.txt">Table of n, a(n) for n = 1..10000</a>
%e A337840 For n = 1, 1^(1/1) = 1.0000000, so a(1) is 0.
%e A337840 For n = 12, 12^(1/12) ~= 1.2300755, so a(12) = 0.
%t A337840 max = 3000; a[n_] := SequencePosition[RealDigits[n^(1/n), 10, max][[1]], IntegerDigits[n]][[1, 1]] - 1; Array[a, 100] (* _Amiram Eldar_, Sep 25 2020 *)
%o A337840 (PARI) a(n) = {if (n==1, 0, my(p=10000); default(realprecision, p+1); my(x = floor(10^p*n^(1/n)), d = digits(x), nb = #Str(n)); for(k=1, #d-nb+1, my(v=vector(nb, i, d[k+i-1])); if (fromdigits(v) == n, return(k-1));); error("not found"););} \\ _Michel Marcus_, Sep 30 2020
%o A337840 (Python)
%o A337840 import gmpy2
%o A337840 from gmpy2 import mpfr, digits, root
%o A337840 gmpy2.get_context().precision=10**5
%o A337840 def A337840(n): # increase precision if -1 is returned
%o A337840     return digits(root(mpfr(n),n))[0].find(str(n)) # _Chai Wah Wu_, Oct 07 2020
%Y A337840 Cf. A177715.
%Y A337840 Decimal expansions of some n^(1/n): A002193, A002581, A005534, A011215, A011231, A011247, A011263, A011279, A011295, A011311, A011327, A011343, A011359.
%K A337840 nonn,base
%O A337840 1,2
%A A337840 _William Phoenix Marcum_, Sep 25 2020
%E A337840 More terms from _Amiram Eldar_, Sep 25 2020