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!)
A309971 a(1) = 1, a(2) = 2; a(n) = round((n-a(n-1))/a(n-2)) for n > 2. 2

%I #17 Sep 08 2022 08:46:22

%S 1,2,1,2,3,2,2,3,3,2,3,5,3,2,4,6,3,3,5,5,3,4,6,5,3,5,7,4,4,7,6,4,5,7,

%T 6,4,6,8,5,4,7,9,5,4,8,10,5,4,9,10,5,5,10,9,5,6,10,8,5,7,11,7,5,8,11,

%U 7,5,9,12,6,5,11,12,6,6,12,11,6,7,12,10,6,8,13,9,6,9,13,8,6,11,14

%N a(1) = 1, a(2) = 2; a(n) = round((n-a(n-1))/a(n-2)) for n > 2.

%C Inspired by A308622.

%H Altug Alkan, <a href="/A309971/b309971.txt">Table of n, a(n) for n = 1..10000</a>

%e a(4) = 2 because a(4) = round((4-1)/2) = 2.

%o (PARI) q=vector(100); q[1]=1; q[2]=2; for(n=3, #q, q[n] = round((n-q[n-1])/q[n-2])); q

%o (Magma) I:=[1,2]; [n le 2 select I[n] else Round((n-Self(n-1)) / Self(n-2)):n in [1..90]]; // _Marius A. Burtea_, Aug 25 2019

%Y Cf. A308622.

%K nonn,look

%O 1,2

%A _Altug Alkan_, Aug 25 2019

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 March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)