# [seqfan] Re: More sequences

Robert G. Wilson v rgwv at rgwv.com
Sun May 9 22:30:33 CEST 2010

```Et al,

The following Mathematica coding will generate the sequence desired.
lst = {}; f[s_List] := Block[{k = 1, l = s[[-1]]}, While[ MemberQ[s, k] ||
!IntegerQ@ Sqrt[k + l], k++ ]; AppendTo[lst, k]]; Nest[f, lst, 100]

It produces the following terms beginning with zero as opposed to one:
{0, 1, 3, 6, 10, 15, 21, 4, 5, 11, 14, 2, 7, 9, 16, 20, 29, 35, 46, 18, 31,
33, 48, 52, 12, 13, 23, 26, 38, 43, 57, 24, 25, 39, 42, 22, 27, 37, 44, 56,
8, 17, 19, 30, 34, 47, 53, 28, 36, 45, 55, 66, 78, 91, 105, 64, 80, 41, 40,
60, 61, 83, 86, 58, 63, 81, 88, 108, 117, 79, 65, 104, 92, 77, 67, 54, 90,
106, 119, 50, 71, 73, 96, 100, 69, 75, 94, 102, 123, 133, 156, 168, 121,
135, 154, 170, 191, 98, 127, 129, 160, 164, 32, 49, 51, 70, 74, 95, 101, 68,
76, 93, 103, 122, 134, 62, 59, 85, 84, 112, 113, 143, 82, 87, 109, 116, 140,
149, 107, 89, 136, 120, ..., }

permutation of the natural numbers.

Bob.

--------------------------------------------------
From: "Richard Guy" <rkg at cpsc.ucalgary.ca>
Sent: Sunday, May 09, 2010 1:05 PM
To: "Sequence Fanatics Discussion list" <seqfan at list.seqfan.eu>
Subject: [seqfan]  More sequences

> Here's an(other) idea for infinitely many sequences.
>
> It arose from a quest for chains and necklaces of
> positive integers, the sum of any consecutive pair
> of which is a perfect square.
>
> 1,3,6,10,15,21,4,5,11,14,2,7,9,16,20,29,35,46,18,31,33,48,52,...
> (I've probably made enough errors by now)
>
> The idea was:  a(1) = 1,  (can include a(0) = 0, but in
> some other cases this causes trouble)  and  a(n)  for
> n > 1  is the least positive integer not already in the
> sequence such that  a(n) + a(n-1)  is a perfect square.
>
> Some questions arise:
>
> Are there any values of  n  other than  1  such that
> the first  n  members of the sequence comprise the
> numbers  1  to  n ?
>
> Are there any positive integers which do not occur in
> the sequence?
>
> Instead of the squares, one can use any other sequence
> for the base sequence, provided it contains arbitrarily
> large members.
>
> If the base sequence is the even numbers, the result is
> the odd numbers.  If the base sequence is the odd numbers
> the result is the natural numbers.  It's doubtful if this
> merits a comment at either of the last two.
>
> If the base sequence is the Fibonacci numbers, then the
> result is the Fibonacci numbers.  If that's correct it
> might merit a comment.
>
> If the base sequence is the Lucas numbers, 2,1,3,4,7,11,...
> then we get (I believe)
>
> 1,2,5,6,12,17,30,46,77,122,200,321,522,...
>
> whose members are alternately one less and one more than
> the Lucas numbers themselves,  L_n - (-1)^n  (n > 1).
> Perhaps that's already been noticed ?
>
> If the base sequence is the triangular numbers, then we
> get (E&OE as usual)
>
> 1,2,4,6,9,12,3,7,8,13,15,21,24,31,35,10,5,16,20,25,11,17,...
>
> Is there an enthusiastic editor who would like to submit
> a few, a lot, of these?        R.
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/

```