|
|
A193358
|
|
a(0)=1; a(1)=2 and for n>1: a(n)=a(n-a(n-2))+2.
|
|
5
|
|
|
1, 2, 4, 4, 3, 4, 6, 6, 6, 6, 5, 6, 8, 8, 8, 8, 8, 8, 7, 8, 10, 10, 10, 10, 10, 10, 10, 10, 9, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Conjecture: Every positive integer is in this sequence.
Conjecture: Odd numbers are not repeated.
Both conjectures are true. Sequence follows the pattern: for n = 0,1,2,..., the sequence consists of 2*n terms of value 2*(n+1), followed by the terms 2*n+1 and 2*(n+1). Thus 0 terms of 2 followed by 1 and 2, then 2 terms of 4 followed by 3 and 4, then 4 terms of 6 followed by 5 and 6, etc. In other words, a(n*(3+n)) = 2n+1 and for the rest of the terms, a(n*(n+1)) ,..., a(n+(n+1)^2) = 2*(n+1). It can be shown that this definition satisfies the recurrence relation. - Chai Wah Wu, Jun 06 2016
|
|
LINKS
|
|
|
MATHEMATICA
|
a[0]=1; a[1]=2; a[n_]:=a[n]=a[n-a[n-2]]+2; Table[a[n], {n, 0, 1000}]
|
|
PROG
|
(Haskell)
a193358 n = a193358_list !! n
a193358_list =
1 : 2 : (map ((+ 2) . a193358) $ zipWith (-) [2..] a193358_list)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|