login
A220280
The reluctant sequence for A002260.
4
1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 2, 3, 1, 2, 1, 1, 2, 1, 2, 3, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3
OFFSET
1,6
COMMENTS
The reluctant sequence B for a sequence A is a triangular array in which row k (>= 1) consists of the first k terms of A.
Here A002260 is the reluctant sequence for the sequence 1,2,3,... of positive numbers (A000027).
LINKS
Boris Putievskiy, Transformations Integer Sequences And Pairing Functions, arXiv:1212.2732 [math.CO], 2012.
FORMULA
a(n) = n1 - t1(t1+1)/2, where n1 = n - t(t+1)/2, t1 = floor[(-1+sqrt(8*n1-7))/2], t=floor[(-1+sqrt(8*n-7))/2]. For example, a(6)=2 since t=2, t1=1, n1=3.
EXAMPLE
A002260 begins
1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, ...
so the first few rows of the new triangle are
1,
1, 1,
1, 1, 2,
1, 1, 2, 1,
1, 1, 2, 1, 2,
1, 1, 2, 1, 2, 3,
...
~
PROG
(Python)
t=int((math.sqrt(8*n-7) - 1)/ 2)
n1=n-t*(t+1)/2
t1=int((math.sqrt(8*n1-7) - 1)/ 2)
a=n1-t1*(t1+1)/2
CROSSREFS
KEYWORD
easy,nonn,tabl
AUTHOR
Boris Putievskiy, Dec 12 2012
EXTENSIONS
Edited by N. J. A. Sloane, Jun 07 2024
STATUS
approved