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.

User: James E Davis

James E Davis's wiki page.

James E Davis has authored 2 sequences.

A322332 'Geobonnaci' sequence: a(1)=a(2)=1, thereafter a(n) = round( 2 * sqrt(a(n-1) * a(n-2)) ).

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 13, 20, 32, 51, 81, 129, 204, 324, 514, 816, 1295, 2056, 3263, 5180, 8222, 13052, 20718, 32888, 52206, 82872, 131551, 208824, 331488, 526204, 835297, 1325951, 2104816, 3341187, 5303804, 8419264, 13364749, 21215216, 33677057, 53458995
Offset: 1

Author

James E Davis, Dec 03 2018

Keywords

Comments

Named because each term is the nearest integer to twice the geometric mean of the previous two terms. This is similar to the Fibonacci sequence, where each term is twice the arithmetic mean of the previous two terms. In fact, the early terms mirror the Fibonacci sequence.

Examples

			For n=6, a(5) is 5 and a(4) is 3. 3 * 5 is 15 and twice the square root of 15 is just above 7.745. This rounds to 8, so a(6) is 8.
		

Programs

  • Java
    public static int G(int n) {
    if(n==1) {return 1;}
    if(n==2) {return 1;}
    return Math.round(2*Math.sqrt(G(n-1)*G(n-2))); //Recursive definition
    } \\ James E Davis, Dec 03 2018
  • Maple
    a:=proc(n) option remember: `if`(n<3,1,round(2*sqrt(a(n-1)*a(n-2)))) end: seq(a(n),n=1..50); # Muniru A Asiru, Dec 20 2018
  • Mathematica
    a[1] =1 ; a[2] = 1; a[n_] := a[n] = Round[2 * Sqrt[a[n-1] * a[n-2]]]; Array[a, 40] (* Amiram Eldar, Dec 04 2018 *)
    nxt[{a_,b_}]:={b,Round[2*Sqrt[a*b]]}; NestList[nxt,{1,1},40][[;;,1]] (* Harvey P. Dale, Dec 04 2024 *)
  • PARI
    seq(n)={my(v=vector(n)); v[1]=v[2]=1; for(n=3, n, v[n]=round(2*sqrt(v[n-1]*v[n-2]))); v} \\ Andrew Howroyd, Dec 03 2018
    

Formula

a(n) ~ c * 2^(2*n/3), where c = 0.50182724761947676453167569419757096890286053854137516239835895319268638286015... - Vaclav Kotesovec, Dec 20 2018

A116543 Number of terms in greedy representation of n in terms of the Lucas numbers.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 3, 3, 1, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 1, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 4, 4, 1, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 4, 4, 2, 3, 3, 3, 3, 4, 4, 3, 4, 4, 4, 1, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 4, 4, 2, 3, 3, 3, 3, 4, 4, 3, 4, 4, 4, 2
Offset: 0

Author

James E Davis, Mar 28 2006, Jun 07 2006

Keywords

Comments

I have been studying A007895 and similar sequences and created this sequence as an analog of A007895 for the Lucas sequence (A000032).

Examples

			a(12)=2 because 12=11+1.
		

Crossrefs

Programs

  • Mathematica
    s = Reverse[Sort[Table[LucasL[n - 1], {n, 1, 22}]]];
    t = Map[Length[Select[Reap[FoldList[(Sow[Quotient[#1, #2]]; Mod[#1, #2]) &, #, s]][[2,1]], # > 0 &]] &, Range[1000]] (* Peter J. C. Moses, Oct 18 2012 *)

Formula

Let L(n) = max(Lucas numbers < n). Then a(0) = 0, a(n) = 1 + a(n-L(n)).
a(n) = A007953(A130310(n)). - Amiram Eldar, Feb 17 2022

Extensions

Edited by N. J. A. Sloane, Aug 10 2007
a(0) added by Amiram Eldar, Feb 17 2022