The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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.
a(A193422(n)) = n and a(m) <> n for m < A193422(n). [Reinhard Zumkeller, Jul 27 2011]
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)
-- Reinhard Zumkeller, Jul 27 2011
CROSSREFS
Sequence in context: A202690 A342754 A257978 * A214028 A079533 A072872
KEYWORD
nonn
AUTHOR
EXTENSIONS
Offset fixed by Reinhard Zumkeller, Jul 27 2011
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 07:02 EDT 2024. Contains 372729 sequences. (Running on oeis4.)