A337904 Numbers k such that the decimal expansion of the k-th harmonic number starts with the digits of k, in the same order.
1, 43, 714, 715, 9763, 122968, 122969, 1478366, 17239955, 196746419, 2209316467, 24499118645, 268950072605
Offset: 1
Examples
1/1 + 1/2 + 1/3 + ... + 1/1478366 = 14.78366... .
Programs
-
Mathematica
s=0;Do[s=s+(1/n);t=IntegerLength[n];m=IntegerLength[Floor[s]];k = Floor[s (10^(t-m))];If[k==n,Print[n]],{n,1,10^11}]
-
PARI
lista(nn) = {my(s=0.); for (n=1, nn, s += 1./n; my(d = digits(floor(10^20*s))); if (fromdigits(vector(#Str(n), j, d[j])) == n, print1(n, ", ")););} \\ Michel Marcus, Sep 30 2020
Extensions
a(9) from Jinyuan Wang, Sep 30 2020
a(10)-a(12) from Chai Wah Wu, Oct 12 2020
a(13) from Chai Wah Wu, Oct 14 2020
Comments