login
A290787
a(n) is the position of the first occurrence of n^3 in the concatenation of the positive integers in decimal representation.
2
1, 8, 44, 83, 265, 378, 58, 267, 783, 2890, 289, 5802, 6781, 9866, 12390, 15274, 4288, 9223, 22764, 30890, 6595, 42130, 49725, 58010, 1575, 76770, 87305, 7670, 110835, 123890, 53786, 127309, 168575, 11048, 10389, 1884, 164216, 116326, 86857, 188924, 73351, 15241, 30690, 81318, 45139, 157378, 511828, 41849, 594784, 638890
OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..100 from Zhining Yang)
EXAMPLE
3^3 = 27, so a(3) = 44 because the digit string "27" first occurs beginning at the 44th digit of the string
s = "12345678910111213141516171819202122232425262728...":
.
. 1 2 3 4
Position: 12345678901234567890123456789012345678901234567...
vv
s: 12345678910111213141516171819202122232425262728...
^^
MATHEMATICA
T = StringJoin @@ ToString /@ Range@ 700000; Table[StringPosition[T, ToString[ n^3], 1][[1, 1]], {n, 50}] (* Giovanni Resta, Aug 11 2017 *)
PROG
(VBA)
Sub test()
Dim i&, t$, s$(1 To 125000)
For i = 1 To 125000
s(i) = i
Next
t = Join(s, "")
For i = 1 To 50
Debug.Print InStr(t, i ^ 3); ", ";
Next
End Sub
CROSSREFS
Sequence in context: A046329 A046377 A075816 * A188148 A316466 A100583
KEYWORD
nonn,look,base
AUTHOR
Zhining Yang, Aug 10 2017
STATUS
approved