Brute force computation of the sequence A000966
5,11,17,23,29,30,36,42,48,54,60,61,67,73,79,85,91,92,98,104,110,116,122,123,129,135, …
is straightforward. Define e
, f
, and g
:
e = n |-> (5^n-1)/4;
f = n |-> (1-x^(e[n]-1))/(1-x^e[n-1]);
t = n |-> x^(e[n]-6);
Then the series generating recurrence is
a[2] = 1;
a[n_/;n>2]:= a[n ]= f[n]a[n-1] + t[n]
And we can compute the sequence—up to some order—as follows:
Position[Rest@CoefficientList[x^5 a[4] + O[x]^200, x],1] // Flatten
It is clear that the differences of the terms in this sequence is either 6 or 1. What is interesting—and does not appear to have been noted before—is that the position of the 1’s is self-referentially indexed by the sequence itself: the first 1 is in the position 5 of the difference sequence, the second 1 is in position 11, and so on. So there should be a “simple” way of “self-referentially” computing this series, starting with 5 and adding 6 or 1 (in positions depending upon the coefficients already determined). However, I’ve not been able to write elegant code to do this yet—so looking for solutions!