A138585 The sequence is formed by concatenating subsequences S1, S2, ... each of finite length. S1 consists of the element 1. The n-th subsequence consist of numbers {(n/2)*(n/2 - 1)+ 1, ..., (n/2)*(n/2 + 1)} for n even, {((n-1)/2)^2, ..., (n-1)/2 * ((n-1)/2 + 2)} for n odd.
1, 1, 2, 1, 2, 3, 3, 4, 5, 6, 4, 5, 6, 7, 8, 7, 8, 9, 10, 11, 12, 9, 10, 11, 12, 13, 14, 15, 13, 14, 15, 16, 17, 18, 19, 20, 16, 17, 18, 19, 20, 21, 22, 23, 24, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 31, 32, 33, 34, 35
Offset: 1
Examples
S1: {1} S2: {1,2} S3: {1,2,3,} S4: {3,4,5,6} S5: {4,5,6,7,8} S6: {7,8,9,10,11,12}, etc. so concatenation of S1/S2/S3/S4/S5/S6/... gives: 1,1,2,1,2,3,3,4,5,6,4,5,6,7,8,7,8,9,10,11,12,...
Links
- Nathaniel Johnston, Table of n, a(n) for n = 1..10000
- Douglas E. Iannucci and Donna Mills-Taylor. On Generalizing the Connell Sequence. Journal of Integer Sequences 2 (1999), Article 99.1.7.
Crossrefs
Cf. A001614.
Programs
-
Maple
S := proc(n) local s: if(n=1)then s:=1: elif(n mod 2 = 0)then s:=(n/2)*(n/2 -1)+1: else s:=((n-1)/2)^2: fi: seq(k,k=s..s+n-1): end: seq(S(n),n=1..12); # Nathaniel Johnston, Oct 01 2011
Extensions
Corrected and edited by D. S. McNeil, Dec 12 2010
Comments