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.

A060984 a(1) = 1; a(n+1) = a(n) + (largest square <= a(n)).

Original entry on oeis.org

1, 2, 3, 4, 8, 12, 21, 37, 73, 137, 258, 514, 998, 1959, 3895, 7739, 15308, 30437, 60713, 121229, 242333, 484397, 967422, 1933711, 3865811, 7730967, 15459367, 30912128, 61814609, 123625653, 247235577, 494448306, 988888002, 1977738918, 3955408759, 7910812423
Offset: 1

Views

Author

R. K. Guy, May 11 2001

Keywords

Comments

Arises in analyzing "put-or-take" games (see Winning Ways, 484-486, 501-503), the prototype being Epstein's Put-or-Take-a-Square game.

References

  • E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982.
  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section E26.

Crossrefs

Programs

  • Haskell
    a060984 n = a060984_list !! (n-1)
    a060984_list = iterate (\x -> x + a048760 x) 1
    -- Reinhard Zumkeller, Dec 24 2013
    
  • Mathematica
    a[1] = 1; a[n_] := a[n] = a[n - 1] + Floor[ Sqrt[ a[n - 1] ] ]^2; Table[ a[n], {n, 1, 40} ]
    RecurrenceTable[{a[1]==1,a[n]==a[n-1]+Floor[Sqrt[a[n-1]]]^2},a,{n,40}] (* Harvey P. Dale, Nov 19 2011 *)
    NestList[#+Floor[Sqrt[#]]^2&,1,40] (* Harvey P. Dale, Jan 22 2013 *)
  • PARI
    { default(realprecision, 100); for (n=1, 500, if (n==1, a=1, a+=floor(sqrt(a))^2); write("b060984.txt", n, " ", a); ) } \\ Harry J. Smith, Jul 15 2009
    
  • Python
    from sympy import integer_nthroot
    A060984_list = [1]
    for i in range(10**3): A060984_list.append(A060984_list[-1]+integer_nthroot(A060984_list[-1],2)[0]**2) # Chai Wah Wu, Apr 02 2021
    
  • Python
    from math import isqrt
    from itertools import accumulate
    def f(an, _): return an + isqrt(an)**2
    print(list(accumulate([1]*36, f))) # Michael S. Branicky, Apr 02 2021

Formula

a(n+1) = a(n)+[sqrt(a(n))]^2 = a(n)+A061886(n) = a(n)+A048760(a(n)) = A061887(a(n)). - Henry Bottomley, May 12 2001
a(n) ~ c * 2^n, where c = 0.11511532187216693... (see A237888). - Vaclav Kotesovec, Feb 15 2014

Extensions

More terms from David W. Wilson, Henry Bottomley and Robert G. Wilson v, May 12 2001

A227370 Permutation which maps between A227368 and A227369.

Original entry on oeis.org

0, 1, 2, 4, 3, 6, 5, 8, 7, 9, 10, 11, 12, 13, 14, 16, 15, 18, 17, 20, 19, 22, 21, 24, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 35, 38, 37, 40, 39, 42, 41, 44, 43, 46, 45, 48, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 63, 66, 65, 68, 67
Offset: 0

Views

Author

Antti Karttunen, Jul 08 2013

Keywords

Comments

Conjecture 1: This is an involution (self-inverse permutation) of nonnegative integers. (Which would imply that both formulas given in A227368 and A227369 involving A227370 are valid).
Conjecture 2: (which would automatically imply the conjecture 1): the only transpositions (used to compose the permutation) are of adjacent terms 2k-1 and 2k, where A061887 gives the values of k. This is true at least for the first 35 transpositions (up to k=60).
See the example section of A227368 to get a grasp of the problem.

Crossrefs

Programs

Formula

a(n) = A227183(A227369(n)).
Showing 1-2 of 2 results.