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!)
A283207 a(n) = a(floor(n/a(n-1))) + a(floor(n/a(n-2))) with a(1) = a(2) = 2. 4

%I #62 Jun 28 2020 11:13:54

%S 2,2,4,4,4,4,4,4,4,4,4,8,6,4,6,6,4,8,6,6,8,6,6,8,8,8,8,8,8,8,8,8,8,8,

%T 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,

%U 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8

%N a(n) = a(floor(n/a(n-1))) + a(floor(n/a(n-2))) with a(1) = a(2) = 2.

%C For the first 10^6 terms, the maximum value of a(n) is 64 and the values of b(n) = least k such that a(k) = 2*n are 1, 3, 13, 12, 105, 97, 126, 96, 1681, 1552, 1746, 1537, 1734, 1926, 4050, 1536, 53793, 49665, 53890, 49185, 53862, 57024, 55616, 49153, 55488, 55302, 81249, 61446, 83619, 115214, 162000, 49152; note that b(2^n) = 3*2^((n+2)*(n-1)/2) for n = 1 to 5.

%C This sequence is a_{1,2}(n) where a_{r,s}(n) = a_{r,s}(floor(n/a_{r,s}(n-r))) + a_{r,s}(floor(n/a_{r,s}(n-s))) with a_{r,s}(n) = 2 for n <= s (r < s). - _Altug Alkan_, Jun 28 2020

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

%H Altug Alkan, <a href="/A283207/a283207_1.png">Alternative Graph of A283207</a>

%H Altug Alkan, <a href="/A283207/a283207_3.png">Line plot of (a(floor(n/a(n-1))), a(floor(n/a(n-2)))) for n <= 2^15</a>

%H Rémy Sigrist, <a href="/A283207/a283207_2.png">Scatterplot of the first 2^34 terms</a>

%H Rémy Sigrist, <a href="/A283207/a283207_4.png">Line plot of (a(floor(n/a(n-1))), a(floor(n/a(n-2)))) for n <= 12855108032</a>

%e a(5) = 4 because a(5) = a(floor(5/a(4))) + a(floor(5/a(3))) = a(floor(5/4)) + a(floor(5/4)) = a(1) + a(1) = 4.

%p A:= Vector(100):

%p A[1]:= 2: A[2]:= 2:

%p for n from 3 to 100 do A[n]:= A[floor(n/A[n-1])] + A[floor(n/A[n-2])] od:

%p convert(A,list); # _Robert Israel_, Jun 23 2020

%t a[1] = a[2] = 2; a[n_] := a[n] = a[Floor[n/a[n - 1]]] + a[Floor[n/a[n - 2]]]; Array[a, 120] (* _Michael De Vlieger_, Mar 06 2017 *)

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

%o (Python)

%o from functools import lru_cache

%o @lru_cache(maxsize=None)

%o def A283207(n):

%o return 2 if n <= 2 else A283207(n//A283207(n-1)) + A283207(n//A283207(n-2)) # _Chai Wah Wu_, Jun 23 2020

%Y Cf. A005185, A130535.

%K nonn

%O 1,1

%A _Altug Alkan_, Mar 03 2017

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 April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)