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”).

A266539
Terms of A006257 (Josephus problem) repeated.
6
0, 0, 1, 1, 1, 1, 3, 3, 1, 1, 3, 3, 5, 5, 7, 7, 1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 21, 21, 23, 23, 25, 25, 27, 27, 29, 29, 31, 31, 1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 21, 21, 23, 23, 25, 25
OFFSET
1,7
COMMENTS
First differs from both A266509 and A266529 at a(25), and shares with them infinitely many terms.
FORMULA
G.f.: (x^2 + x^4)/(1 - x - x^2 + x^3) - (1 - x)^(-1)*Sum_{k>=1} 2^k*x^(2^(k+1)). - Robert Israel, Jan 13 2016
EXAMPLE
Written as an irregular triangle in which the row lengths are twice the terms of A011782 the sequence begins:
0, 0;
1, 1;
1, 1, 3, 3;
1, 1, 3, 3, 5, 5, 7, 7;
1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15;
...
Row sums give 0 together with A004171.
MAPLE
A006257[0]:=0: for n from 1 to 100 do A006257[n]:=(A006257[n-1]+1) mod n +1: end do:
seq(A006257[i]$2, i=0..100); # Robert Israel, Jan 13 2016
MATHEMATICA
Join[{0, 0}, Table[SeriesCoefficient[(1 + x^2)/((-1 + x)^2 (1 + x)), {x, 0, m}], {n, 6}, {m, 0, 2^n - 1}]] // Flatten (* Michael De Vlieger, Jan 05 2016 *)
CROSSREFS
Partial sums give A266540.
Sequence in context: A349813 A266529 A266509 * A090569 A160324 A347026
KEYWORD
nonn,tabf
AUTHOR
Omar E. Pol, Jan 02 2016
EXTENSIONS
Offset changed to 1 by Ivan Neretin, Feb 09 2017
STATUS
approved