Python, A010892 and "Anyone for Twopins"

Rainer Rosenthal r.rosenthal at web.de
Tue Jan 2 01:26:29 CET 2007


Alec Mihailovs schrieb:
> 
> Here is the Python program for A010892,
> 
> %o A010892 # Python program from Alec Mihailovs, January 1 2007.
> %o A010892 def A010892(n): [1,1,0,-1,-1,0][n%6]
> 

Many thanks to you and others, including Neil, for your quick
and helpful replies regarding the Maple program in A010892.
I welcome all your suggestions but my primary concern was
to just understand the existing line.

I promised to insert the sequences from R. K. Guy's "Anyone
for Twopins". And this lead me into very interesting corners
of the OEIS. The work is strongly intertwined with these
lovely S_r family sequences and I made great progress today.

So I am happy with the corrected version for A010892, which I
already submitted today:

with(numtheory,cyclotomic);
c := series(1/cyclotomic(6,x),x,102):
seq(coeff(c,x,n),n=0..101);

I like the cross reference to cyclotomic(6,x). And I like
the Chebyshev reference to U(n,1/2) even more! I appreciate
all versions which try to describe A010892 in a simple way.
But the other desriptions are the fun, aren't they :-?

Here are just three findings in connection with Twopins:
(I will wait with submission until I get a better view)

1.  A005251 is Twopins_t sequence for k=2.

2.  A005252 is Twopins_t sequence for k=3.
    Recursion is given by "history vector" [1,1,0,1] and
    due to formula a(n) = 2*a(n-1)-a(n-2)+a(n-3) it has
    also the history vector [2,-1,1].
    A010901 is essentially the same sequence, built on [2,-1,1].

    My interest in A010892 stems from this sequence.

3.  A098574 is Twopins_t sequence for k=6.

Other observations are exploding all the time. But now I am
more calm in registering them, because I have a nice method
for catalogizing them. I am sure that many of you will feel
like me when you stroll thru the OEIS and get excited by all
these links and interesting facts. 

I feel confident to submit the Twopins sequences in a good
form in the next days.

Best regards and a Happy New Year to all SeqFans, especially
to Neil - with best wishes for your health and good luck,

Rainer Rosenthal
r.rosenthal at web.de





More information about the SeqFan mailing list