A325909 Lexicographically earliest sequence of distinct positive terms such that for any n > 0, n divides Sum_{k = 1..n} (-1)^k * a(k).
1, 3, 2, 4, 9, 5, 7, 15, 8, 10, 21, 11, 13, 27, 14, 16, 33, 17, 19, 39, 20, 22, 45, 23, 25, 51, 26, 28, 57, 29, 31, 63, 32, 34, 69, 35, 37, 75, 38, 40, 81, 41, 43, 87, 44, 46, 93, 47, 49, 99, 50, 52, 105, 53, 55, 111, 56, 58, 117, 59, 61, 123, 62, 64, 129, 65
Offset: 1
Keywords
Examples
The first terms, alongside the corresponding partial alternating sums, are: n a(n) S_n -- ---- --- 1 1 -1 2 3 2 3 2 0 4 4 4 5 9 -5 6 5 0 7 7 -7 8 15 8 9 8 0 10 10 10 11 21 -11 12 11 0
Crossrefs
Cf. A019444.
Programs
-
PARI
s=t=0; for (n=1, 66, for (v=1, oo, if (!bittest(s,v) && (tt=t+v*(-1)^n)%n==0, print1 (v ", "); t=tt; s+=2^v; break)))
Formula
Apparently:
- a(3*k) = 3*k - 1,
- a(3*k+1) = 3*k + 1,
- a(3*k+2) = 6*k + 3.
Comments