OFFSET
1,1
COMMENTS
Take decimal expansion of Pi, s = 3,1,4,1,5,9,2,6,5,3,5,8,9,7,9,3,2,3,8,4,6,2. Starting with the first term 3 add terms consecutively until we get sum = 100 or larger. If sum = 100 then a(1) = 3. It is impossible to get 100 this way. Then we try starting with second digit, 1. It happens that the subsequence from i = 2 to 21: s1 = {1,4,1,5,9,2,6,5,3,5,8,9,7,9,3,2,3,8,4,6} has a sum = 100, hence a(1) = 2. Next similar subsequence with sum = 100 has i = 16 to 37: s2 = {3,2,3,8,4,6,2,6,4,3,3,8,3,2,7,9,5,0,2,8,8,4}, hence a(2) = 16, etc.
FORMULA
PROG
(PARI) default(realprecision, 101000); v=digits(floor(Pi*10^10^5));
lista(nn) = {my(x=21, s=103); for(k=2, nn, s-=v[k-1]; if(s==100, print1(k, ", "), while(s<100, s+=v[x++]); if(s==100, print1(k, ", ")))); } \\ Jinyuan Wang, Mar 22 2020
CROSSREFS
KEYWORD
nonn,base,less
AUTHOR
Zak Seidov, Jun 22 2005
STATUS
approved