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.

Showing 1-2 of 2 results.

A002984 a(0) = 1; for n > 0, a(n) = a(n-1) + floor(sqrt(a(n-1))).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 10, 13, 16, 20, 24, 28, 33, 38, 44, 50, 57, 64, 72, 80, 88, 97, 106, 116, 126, 137, 148, 160, 172, 185, 198, 212, 226, 241, 256, 272, 288, 304, 321, 338, 356, 374, 393, 412, 432, 452, 473, 494, 516, 538, 561, 584, 608, 632, 657, 682, 708, 734
Offset: 0

Views

Author

Keywords

Comments

For n > 3 we have a(n) < n^2/4; for n > 44 we have a(n) > n^2/5. - Stefan Steinerberger, Apr 17 2006
This sequence contains infinitely many squares. - Philippe Deléham, Apr 03 2009
The squares in this sequence are precisely the powers of 4. - Franklin T. Adams-Watters, Jan 06 2014

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000302 (subsequence of squares).
Essentially the same as A109965.

Programs

  • Haskell
    a002984 n = a002984_list !! n
    a002984_list = iterate (\x -> x + a000196 x) 1
    -- Reinhard Zumkeller, Dec 28 2011
    
  • Magma
    [n le 0 select 1 else Self(n)+Floor(Sqrt(Self(n))): n in [0..60]]; // Bruno Berselli, Feb 15 2013
  • Mathematica
    NestList[ # + Floor[ Sqrt[ # ] ] &, 1, 50 ]

Formula

a(n+1) = a(n) + A000196(a(n)). - Reinhard Zumkeller, Dec 28 2011
Conjecture: a(n) ~ n^2/4. - José María Grau Ribas, Feb 13 2024

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Dec 14 2000

A109964 a(n) = floor(sqrt(Sum_{i

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 32, 33, 33, 34, 34, 35, 35
Offset: 0

Views

Author

Henry Bottomley, Jul 06 2005

Keywords

Examples

			a(5) = floor(sqrt(1+1+1+1+2)) = floor(sqrt(8)) = 2.
From _Paul Weisenhorn_, Jun 22, Jun 26 2010: (Start)
n=21; j=3; k=1; a(21)=2^3+1=9;
j=3; k=4; a(27)=a(28)=12.
(End)
		

References

  • Related problem was offered at XXIX Moscow Mathematical Olympiad (1966).

Programs

  • Maple
    sumr:=0: a(0):=1: for n from 1 to 1000 do sumr:=sumr+a(n-1): a(n):=floor(sqrt(sumr)): end do: # Paul Weisenhorn, Jun 22 2010
    a(0..1)=1; for n from 2 to 100 do j:=floor(log[2](n))-1: k:=iquo(n-2^(j+1)-j,2): a(n):=2^j+k: end do: # Paul Weisenhorn, Jun 26 2010
  • Mathematica
    lst={1};Nest[AppendTo[lst,Floor[Sqrt[Total[lst]]]]&,1,85] (* Harvey P. Dale, May 24 2012 *)

Formula

a(n) = floor(sqrt(A109965(n))) = A109965(n+1)-A109965(n). Roughly (n-log_2(n))/2. 1 appears four times, other powers of 2 appear three times, other numbers appear twice.
From Paul Weisenhorn, Jun 22, Jun 26 2010: (Start)
For n>1, a(n)=2^j+k where j=floor(log_2(n))-1 and k=(n-2^(j+1)-j) mod 2.
a(2^(j+1)+j+2*k) = a(2^(j+1)+j+2*k+1) = 2^j+k; a(2^(j+1)+j-1) = 2^j for all j=0..infinity, k=0..(2^j-1).
(End)

Extensions

Formulas corrected by Paul Weisenhorn, Aug 11 2010
Formula a(0..3)=1; a(n)=iquo(n+1-floor(log[2](n-2)),2); n=4..infinity; deleted and second Maple program changed Paul Weisenhorn, Aug 22 2010
Showing 1-2 of 2 results.