login
A222257
Lexicographically earliest injective sequence of positive integers such that the sum of 6 consecutive terms is always divisible by 6.
4
1, 2, 3, 4, 5, 9, 7, 8, 15, 10, 11, 21, 13, 14, 27, 16, 17, 33, 19, 20, 39, 22, 23, 45, 25, 26, 51, 28, 29, 57, 31, 32, 63, 34, 35, 69, 37, 38, 75, 40, 41, 81, 43, 44, 87, 46, 47, 93, 49, 50, 99, 52, 53, 105, 55, 56, 111, 58, 59, 117, 61, 62, 123, 64, 65, 129, 67, 68, 135, 70, 71, 141, 73
OFFSET
0,2
LINKS
Eric Angelini, k-chunks sum and division by k, post to the SeqFan list, Mar 22 2013.
FORMULA
a(n) = 2*a(n-3) - a(n-6).
G.f.: (1 + 2*x + 3*x^2 + 2*x^3 + x^4 + 3*x^5)/((1 - x)*(1 + x + x^2))^2.
a(n) = A222256(n) + 1. - Paolo Xausa, Sep 30 2025
MATHEMATICA
A222257[n_] := (n - 2)*Mod[n, 3]! + 3; (* after Thomas Scheuerle *)
Array[A222257, 100, 0] (* or *)
LinearRecurrence[{0, 0, 2, 0, 0, -1}, {1, 2, 3, 4, 5 , 9}, 100] (* Paolo Xausa, Sep 30 2025 *)
PROG
(PARI) a(n) = (n-2)*(n%3)!+3 \\ Thomas Scheuerle, Sep 25 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric Angelini and M. F. Hasler, Mar 23 2013
STATUS
approved