A091657 Length of the smallest prefix of the continued fraction expansion for Pi that includes each of 1..n.
4, 9, 9, 30, 40, 40, 40, 44, 130, 130, 276, 276, 276, 276, 276, 276, 647, 647, 647, 647, 647, 647, 647, 647, 791, 791, 791, 791, 791, 791, 878, 878, 878, 878, 1008, 1008, 1008, 3041, 3041, 3041, 3041, 3041, 3041, 3041, 3041, 3200, 3200, 3200, 3200, 3200, 3200
Offset: 1
Keywords
Programs
-
Mathematica
f[n_] := Block[{k = 1}, While[ StringPosition[ ToString[ Union[ ContinuedFraction[Pi, k]]], StringDrop[ ToString[ Table[i, {i, n}]], -1]] == {}, k++ ]; k]; Table[ f[n], {n, 1, 51}]
Formula
a(n) = max(A032523(n), a(n-1)) for n > 1. - Andrew Howroyd, Aug 05 2024
Extensions
Name clarified by Andrew Howroyd, Aug 05 2024