login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A305845 a(1) = a(2) = a(3) = 1; for n > 3, a(n) = a(a(n-2)) + a(n-a(n-2)). 2
1, 1, 1, 2, 3, 3, 3, 4, 4, 5, 5, 6, 7, 7, 7, 7, 8, 8, 9, 10, 10, 11, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 15, 16, 17, 17, 18, 18, 18, 19, 20, 21, 22, 22, 23, 23, 24, 25, 25, 26, 26, 26, 27, 27, 28, 28, 28, 28, 29, 29, 29, 29, 30, 31, 31, 32, 32, 32, 33, 33, 33, 33, 34, 35, 36, 37, 37, 38, 39, 39, 39 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

A solution to recursion of Mallows's sequence (A005229).

LINKS

Table of n, a(n) for n=1..81.

Altug Alkan, Plot of n/2 - a(n) for n <= 7*2^10.

FORMULA

a(n+1) - a(n) = 0 or 1 for all n >= 1.

MATHEMATICA

a[1] = a[2] = a[3] = 1; a[n_] := a[n] = a[a[n - 2]] + a[n - a[n - 2]]; Array[a, 81] (* Michael De Vlieger, Jun 11 2018 *)

PROG

(PARI) a=vector(100); a[1]=a[2]=a[3]=1; for(n=4, #a, a[n] = a[a[n-2]] + a[n-a[n-2]]); a

CROSSREFS

Cf. A004001, A005229, A005350.

Sequence in context: A037037 A156262 A218447 * A120565 A244989 A296021

Adjacent sequences:  A305842 A305843 A305844 * A305846 A305847 A305848

KEYWORD

nonn,easy

AUTHOR

Altug Alkan, Jun 11 2018

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 3 00:35 EDT 2020. Contains 333195 sequences. (Running on oeis4.)