login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A262986
Start of first run of length n in Golomb's sequence A001462.
1
1, 2, 6, 12, 24, 39, 63, 91, 123, 168, 218, 273, 345, 423, 507, 597, 709, 828, 954, 1087, 1247, 1415, 1591, 1775, 1991, 2216, 2450, 2693, 2945, 3235, 3535, 3845, 4165, 4495, 4869, 5254, 5650, 6057, 6475, 6943, 7423, 7915, 8419, 8935, 9463, 10048, 10646, 11257, 11881, 12518
OFFSET
1,2
COMMENTS
The first run of length n in A001462 begins with A095114(n), i.e., A001462(a(n)) = A095114(n).
a(n) = A095114(A095114(n)).
FORMULA
a(1) = 1; a(n+1) = a(n) + A001462(n)*n.
EXAMPLE
Since Golomb's sequence starts 1,2,2,3,3,4,4,4,5,... the first run of length three starts at position 6, so a(3) = 6.
MATHEMATICA
a[1] = 1; a[n_] := a[n] = 1 + a[n - a[a[n - 1]]]; s = Array[a, {13000}]; t = Most@ Map[Last, Tally@ s]; Table[Total@ Take[t, First@ Flatten@ Position[t, n]] - n + 1, {n, 50}] (* Michael De Vlieger, Oct 07 2015, after Robert G. Wilson v at A001462 *)
PROG
(PARI) a(n) = if (n<2, 1, a(n-1)+ t(n-1)*(n-1));
t(n) = local(A, t, i); if(n<3, max(0, n), A=vector(n); t=A[i=2]=2; for(k=3, n, A[k]=A[k-1]+if(t--==0, t=A[i++ ]; 1)); A[n]);
vector(100, n, a(n))\\ Altug Alkan, Oct 06 2015
CROSSREFS
Sequence in context: A210594 A307252 A306625 * A307559 A211978 A028923
KEYWORD
nonn
AUTHOR
Glen Whitney, Oct 06 2015
EXTENSIONS
More terms from Altug Alkan, Oct 06 2015
STATUS
approved