cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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, 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, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
Offset: 1

Views

Author

Altug Alkan, Mar 03 2017

Keywords

Comments

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.
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

Examples

			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.
		

Crossrefs

Programs

  • Maple
    A:= Vector(100):
    A[1]:= 2: A[2]:= 2:
    for n from 3 to 100 do A[n]:= A[floor(n/A[n-1])] + A[floor(n/A[n-2])] od:
    convert(A,list); # Robert Israel, Jun 23 2020
  • Mathematica
    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 *)
  • 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
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A283207(n):
        return 2 if n <= 2 else A283207(n//A283207(n-1)) + A283207(n//A283207(n-2)) # Chai Wah Wu, Jun 23 2020