Sums of k consecutive terms

divisible by k

 

 

[Sent: Friday, March 22, 2013 1:16 PM]

 

Hello SeqFans,

I’ve tried yesterday to build a sequence S where the sum of any k successive terms of S is divisible by k (S being the first lexicographically such sequence and S never showing twice the same integer).

 

For k odd, S is trivial:

S=1,2,3,4,5,6,7,8,9,10,11,12,13,...

 

For k even we have a few interesting things.

 

Let’s start with k=2 and a(1)=0:

S=0,2,4,6,8,10,12,14,16,18,20,22,...

 

Well, no revolution here. Let’s try a(1)=1:

S=1,3,5,7,9,11,13,15,17,19,21,23,...

 

Mmmmh.

 

For k=4 and a(1)=0 we have:

S=0,1,2,5,4,9,6,13,8,17,10,21,22,...

... which is http://oeis.org/A114752

    (and which has a quite complicated definition).

 

For k=4 and a(1)=1 we get:

S=1,2,3,6,5,10,7,14,9,18,11,22,13...

... which is http://oeis.org/A043547

    (a nice interspersion)

 

For k=6 and a(1)=0 I get (by hand) the new seq:

S=0,1,2,3,4,8,6,7,14,9,10,20,...

 

Explanation:

The 1st chunk of 6 consecutive integers 0->8 has sum 18, which is divisible by 6

The 2nd chunk of 6 consecutive integers 1->6 has sum 24, which is divisible by 6

The 3rd chunk of 6 consecutive integers 2->7 has sum 30, which is divisible by 6

Etc.

 

For k=6 and a(1)=1 I get (again, by hand) the new seq:

S=1,2,3,4,5,9,7,8,15,...

 

I guess there is a possible new family of seq if we try k=8,10,12,14,16,... for values a(1)=0 and a(1)=1.

 

Interesting patterns might be found...

Best,

É.

 

__________

 

[Alois Heinz] :

 

Hello Eric,

 

k=6, a(1)=0:

 

g.f.: 4*x^5+2*x^4+3*x^3+2*x^2+x)*x/(-x^6+2*x^3-1)

 

a(n) = 2*a(n-3)-a(n-6).

 

0, 1, 2, 3, 4, 8, 6, 7, 14, 9, 10, 20, 12, 13, 26, 15, 16, 32, 18, 19, 38, 21, 22, 44, 24, 25, 50, 27, 28, 56, 30, 31, 62, 33, 34, 68, 36, 37, 74, 39, 40, 80, 42, 43, 86, 45, 46, 92, 48, 49, 98, 51, 52, 104, 54, 55, 110, 57, 58, 116, 60, 61, 122, 63, 64, 128, 66, 67, 134, 69, 70, 140, 72, 73, 146, 75, 76, 152, 78, 79, 158, 81, 82, 164, 84, 85, 170, 87, 88, 176, 90, 91, 182, 93, 94, 188, 96, 97, 194, 99

 

Best, Alois

 

[Thanks, Alois -- this is now http://oeis.org/A222256]

__________

 

[Lars Blomberg] :

 

Hello Eric,

 

I have emprically found the following concerning sequences generated by even k:

 

Given a sequence starting with a(1)=0, the sequence starting with a(1)=1 has +1 for all terms.

 

For a(0)=0, the sequence for a given k is:

a[n] = 2*n - k/2 - 1, when Mod(n+1, k/2) = 0

a[n] = n, otherwise

 

also, the sequences contain all non-negative integers except k*i-1, for i = 1,2,3,...

 

All of this can probably be proven easily by someone with mathematical skills.

 

[Indeed, many thanks, Lars!]

__________

 

[Maximilian Hasler] :

 

Dear Eric & SeqFans,

to avoid duplicate efforts, just to say that I confirm the given values & extended them & fixed some details in the mentioned (and other related) sequences ; I will submit those not yet there (k=6,8,10) as A222256 ff (some unexpected events preventing me from having done this earlier)

 

Have a nice week-end,

 

Maximilian

 

__________

 

Thank you, Alois, Lars, Maximilian and Jean-Marc. This is now there

 

[I will soon produce a page where this idea is applied to the _digits_ of S.]

 

Best,

É.