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.

Previous Showing 31-40 of 54 results. Next

A061886 Largest square less than or equal to sum of previous terms.

Original entry on oeis.org

1, 1, 1, 1, 4, 4, 9, 16, 36, 64, 121, 256, 484, 961, 1936, 3844, 7569, 15129, 30276, 60516, 121104, 242064, 483025, 966289, 1932100, 3865156, 7728400, 15452761, 30902481, 61811044, 123609924, 247212729, 494439696, 988850916, 1977669841
Offset: 0

Views

Author

Henry Bottomley, May 12 2001

Keywords

Examples

			a(6) = 9 since 1+1+1+1+4+4 = 12 and 9 is the largest square less than or equal to this.
		

Crossrefs

Cf. A061883.

Programs

  • Haskell
    a061886 n = a061886_list !! n
    a061886_list = 1 : zipWith (-) (tail a060984_list) a060984_list
    -- Reinhard Zumkeller, Dec 24 2013

Formula

For n > 0: a(n) = A060984(n+1)-A060984(n) = A048760(A060984(n)).

Extensions

Formula corrected by Reinhard Zumkeller, Dec 24 2013

A061887 n + largest square less than or equal to n; numbers in the range [2k^2,2k^2+2k] for some k.

Original entry on oeis.org

0, 2, 3, 4, 8, 9, 10, 11, 12, 18, 19, 20, 21, 22, 23, 24, 32, 33, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 128, 129
Offset: 0

Views

Author

Henry Bottomley, May 12 2001

Keywords

Examples

			a(15)=15+9=24; a(16)=16+16=32; a(17)=17+16=33.
		

Crossrefs

Programs

  • Mathematica
    Table[n+Floor[Sqrt[n]]^2,{n,0,70}] (* Harvey P. Dale, Aug 23 2012 *)

Formula

a(n) = n+[sqrt(n)]^2 = n+A048760(n) = 2n-A053186(n).

A064672 a(0) = 0, a(1) = 1; for a(n), n >= 2, write n = x^2 + y with y >= 0 as small as possible, then a(n) = a(x) + a(y).

Original entry on oeis.org

0, 1, 2, 3, 2, 3, 4, 5, 4, 3, 4, 5, 6, 5, 6, 7, 2, 3, 4, 5, 4, 5, 6, 7, 6, 3, 4, 5, 6, 5, 6, 7, 8, 7, 6, 7, 4, 5, 6, 7, 6, 7, 8, 9, 8, 7, 8, 9, 10, 5, 6, 7, 8, 7, 8, 9, 10, 9, 8, 9, 10, 11, 10, 11, 4, 5, 6, 7, 6, 7, 8, 9, 8, 7, 8, 9, 10, 9, 10, 11, 6, 3, 4, 5, 6, 5, 6, 7, 8, 7, 6, 7, 8, 9, 8, 9, 10, 5, 6
Offset: 0

Views

Author

Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Oct 09 2001

Keywords

Comments

Because of the definition of a(n), a(n^2) = a(n) and more generally a(n^(2m)) = a(n), so the sequence recursively contains itself.
a(A064689(n)) = n and a(m) < n for m < A064689(n).

Examples

			a(7) = 5 because 7 = 2^2 + 3, a(2) = 2 and a(3) = 3, giving 5
		

Crossrefs

Cf. A064689.
Cf. A048760.

Programs

  • Haskell
    a064672 n = a064672_list !! n
    a064672_list = 0 : 1 : f (drop 2 a000196_list) 1 1 (tail a064672_list)
       where f (r:rs) r' u (v:vs)
               | r == r' = (u + v) : f rs r u vs
               | r /= r' = u' : f rs r u' (tail a064672_list)
               where u' = a064672 $ fromInteger r
    -- Reinhard Zumkeller, Apr 27 2012
  • Mathematica
    a[0]=0; a[1]=1; a[n_] := a[n] = a[ Floor[ Sqrt[n] ] ] + a[ n - Floor[ Sqrt[n] ]^2 ]; Table[a[n], {n, 0, 98}] (* Jean-François Alcover, May 23 2012, after Reinhard Zumkeller *)

Formula

For n > 1: a(n) = a(A000196(n)) + a(A053186(n)), a(0) = 0, a(1) = 1. [Reinhard Zumkeller, Apr 27 2012]

A065732 Largest square <= 2^n.

Original entry on oeis.org

1, 4, 4, 16, 25, 64, 121, 256, 484, 1024, 2025, 4096, 8100, 16384, 32761, 65536, 131044, 262144, 524176, 1048576, 2096704, 4194304, 8386816, 16777216, 33547264, 67108864, 134212225, 268435456, 536848900, 1073741824, 2147395600, 4294967296, 8589767761, 17179869184
Offset: 1

Views

Author

Labos Elemer, Nov 15 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Floor[Sqrt[2^w]//N]^2, {w, 1, 50}]
  • PARI
    a(n) = { sqrtint(2^n)^2 } \\ Harry J. Smith, Oct 28 2009

Formula

a(n) = A048760(A000079(n)) = A048760(2^n).

A065736 Largest square <= 10^n.

Original entry on oeis.org

9, 100, 961, 10000, 99856, 1000000, 9998244, 100000000, 999950884, 10000000000, 99999515529, 1000000000000, 9999995824729, 100000000000000, 999999961946176, 10000000000000000, 99999999989350756, 1000000000000000000, 9999999998935075600, 100000000000000000000, 999999999956753113201
Offset: 1

Views

Author

Labos Elemer, Nov 15 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Floor[Sqrt[10^n]]^2,{n,20}] (* Harvey P. Dale, Dec 04 2014 *)
  • PARI
    a(n) = { sqrtint(10^n)^2 } \\ Harry J. Smith, Oct 28 2009

Formula

a(n) = A048760(A011557(n)) = A048760(10^n).

A072689 Difference between (least square >= n) and (largest square <= n).

Original entry on oeis.org

0, 3, 3, 0, 5, 5, 5, 5, 0, 7, 7, 7, 7, 7, 7, 0, 9, 9, 9, 9, 9, 9, 9, 9, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 02 2002

Keywords

Comments

a(n) = 0 iff n is a square.
a(n) = 1+2*A000196(n) if n is not a square. - Robert Israel, Sep 22 2020

Crossrefs

Programs

  • Maple
    f:= proc(n) local t; t:= floor(sqrt(n));
      if n = t^2 then 0 else 1 + 2*t fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Sep 22 2020
  • Mathematica
    ds[n_]:=Module[{s=Sqrt[n]},If[IntegerQ[s],0,1+2Floor[s]]]; Array[ds,80] (* Harvey P. Dale, Dec 05 2013 *)

Formula

a(n) = A057427(n - A048760(n)) * (A000196(A048760(n))*2 + 1).
a(n) = A048761(n) - A048760(n).

A227453 Numbers k such that the distance to the largest square less than k is a multiple of 4.

Original entry on oeis.org

8, 13, 20, 24, 29, 33, 40, 44, 48, 53, 57, 61, 68, 72, 76, 80, 85, 89, 93, 97, 104, 108, 112, 116, 120, 125, 129, 133, 137, 141, 148, 152, 156, 160, 164, 168, 173, 177, 181, 185, 189, 193, 200, 204, 208, 212, 216, 220, 224, 229, 233, 237, 241, 245, 249, 253, 260, 264, 268, 272, 276, 280
Offset: 1

Views

Author

Ralf Stephan, Sep 22 2013

Keywords

Comments

A071797(a(n)) = 4*m, A053186(a(n)+1) = 4*m, m > 0.
Apparently a bisection of A079896. While it may not be difficult to prove that the sequence is a subsequence of A079896, the apparent fact that a(n) = A079896(2n-1) is by no means obvious.

Examples

			8 - 2^2 = 1*4 and 24 - 4^2 = 2*4 so 8 and 24 are in the sequence.
		

Crossrefs

Programs

  • Mathematica
    lsm4Q[n_]:=Module[{s=Floor[Sqrt[n]]^2},sHarvey P. Dale, Jun 20 2014 *)
  • PARI
    is(n)=(n-sqrtint(n-1)^2)%4==0

A232501 Numbers k such that distances from k to three nearest squares are three triangular numbers.

Original entry on oeis.org

1, 10, 15, 19, 26, 197, 253, 325, 631, 1090, 1522, 2395, 3601, 4434, 4625, 6571, 9026, 11026, 11116, 14631, 15454, 19045, 22501, 35722, 38431, 41210, 53036, 61505, 65521, 66239, 69697, 69949, 70291, 85384, 99226, 110890, 152101, 152803, 160021, 168101, 181801, 189631
Offset: 1

Views

Author

Alex Ratushnyak, Feb 23 2014

Keywords

Crossrefs

Cf. A232608 (terms that are triangular numbers).

Programs

  • Haskell
    import Data.List (sort)
    a232501 n = a232501_list !! (n-1)
    a232501_list = filter f [1..] where
       f x = all ((== 1) . a010054) $ init $ sort $
             map (abs . (x -) . (^ 2) . (+ (a000196 x))) [-1..2]
    -- Reinhard Zumkeller, Mar 16 2014

A233401 Numbers k such that k^3 - b2 is a triangular number (A000217), where b2 is the largest square less than k^3.

Original entry on oeis.org

1, 4, 8, 21, 37, 40, 56, 112, 113, 204, 280, 445, 481, 560, 688, 709, 1933, 1945, 3601, 3805, 3861, 4156, 4333, 4365, 7096, 8408, 8516, 11064, 12688, 13609, 13945, 16501, 17080, 18901, 21464, 23125, 27244, 27364, 28141, 45228, 45549, 58321, 60061, 66245, 70585, 78688
Offset: 1

Views

Author

Alex Ratushnyak, Dec 09 2013

Keywords

Comments

The cubes k^3 begin: 1, 64, 512, 9261, 50653, 64000, 175616, 1404928, ...
The squares b2 begin: 0, 49, 484, 9216, 50625, 63504, 175561, 1404225, ...
Their square roots are 0, 7, 22, 96, 225, 252, 419, 1185, 1201, 2913, 4685, 9387, ...

Crossrefs

Programs

  • PARI
    f(k) = if (issquare(k), sqrtint(k-1)^2, sqrtint(k)^2); \\ adapted from A048760
    isok(k) = my(b2 = sqrtint(k^3-1)^2); (k^3-b2) && ispolygonal(k^3-b2, 3); \\ Michel Marcus, Jan 26 2019
  • Python
    from math import isqrt
    def isTriangular(a):
      a+=a
      sr = isqrt(a)
      return (a==sr*(sr+1))
    for n in range(1,79999):
      n3 = n*n*n
      b = isqrt(n3)
      if b*b==n3: b-=1
      if isTriangular(n3-b*b):  print(n, end=', ')
    

A256097 Numerators of a rational guess r(n) for the input for Newton's algorithm to find sqrt(n).

Original entry on oeis.org

1, 3, 2, 2, 9, 5, 11, 3, 3, 19, 10, 7, 11, 23, 4, 4, 33, 17, 35, 9, 37, 19, 39, 5, 5, 51, 26, 53, 27, 11, 28, 57, 29, 59, 6, 6, 73, 37, 25, 19, 77, 13, 79, 20, 27, 41, 83, 7, 7, 99, 50, 101, 51, 103, 52, 15, 53, 107, 54, 109, 55, 111, 8, 8, 129, 65, 131, 33, 133, 67
Offset: 1

Views

Author

Wolfdieter Lang, Mar 24 2015

Keywords

Comments

The corresponding denominators are given in A256098.
This educated guess for the rational input R(n) = x(n;k=0) for the so-called Babylonian (also called Heron's) iteration to find sqrt(n) (Newton's method for sqrt(n)), x(n; k+1) = (x(n; k) + n/x(n; k))/2, k >= 0, was used in Vedic Mathematics (see the H.-W. Alhen et al. reference, pp. 145-146, and the MacTutor link on Sulbasutras). In the Wikipedia link on Shulba Sutras another suggestion is given how the approximation 1 + 1/3 + 1/(3*4) - 1/(3*4*34) for sqrt(2) was obtained in Sulbasutras. The explanation given in the H.-W. Alten et al. reference seems to me more convincing.
This R(n) is obtained by n = s(n)^2 + r(n) with s(n)^2 = A048760(n) (largest square not exceeding n) and the remainder r(n). Then the approximation of the square root is used sqrt(n) = sqrt(s(n)^2 + r(n)) approximately s(n)*(1 + r(n)/(2*s(n)^2)) = s(n) + r(n)/(2*s(n)). Note that A048760(n) = A000196(n)^2, that is, s(n) = floor(sqrt(n)).

Examples

			n = 2: s(n) = floor(sqrt(2)) = sqrt(A048760(2)) = 1, r(n) = 2 - 1^2 = 1. R(2) = s(2) + r(2)/(2*s(2)) = 1 + 1/(2*1) = 3/2. That is a(2) = 3 and A256098(2) = 2.
n = 17: s(n) = floor(sqrt(17)) = sqrt(A048760(17)) = 4 , r(n) = 17 - 4^2 = 1. R(17) = s(17) + r(17)/(2*s(17)) = 4 + 1/(2*4) = 33/8. That is, a(n) = 33 and A256098(17) = 8.
The rationals R(n) for n = 1..60 are: [1, 3/2, 2, 2, 9/4, 5/2, 11/4, 3, 3, 19/6, 10/3, 7/2, 11/3, 23/6, 4, 4, 33/8, 17/4, 35/8, 9/2, 37/8, 19/4, 39/8, 5, 5, 51/10, 26/5, 53/10, 27/5, 11/2, 28/5, 57/10, 29/5, 59/10, 6, 6, 73/12, 37/6, 25/4, 19/3, 77/12, 13/2, 79/12, 20/3, 27/4, 41/6, 83/12, 7, 7, 99/14, 50/7, 101/14, 51/7, 103/14, 52/7, 15/2, 53/7, 107/14, 54/7, 109/14,...]
For n=2 the Newton (Babylonian also called Heron) iteration produces. with x(2; k=0) = R(2) = 3/2: x(2; 1) = (3/2 + 4/3)/2 = 17/12 = 1 + 5/2  = 1 + 1/3 + 1/(3*4).
  x(2; 2) = (17/12 + 24/17)/2 = 577/408 = 17/12 + (577/408 - 17*34/408)  = 17/12 - 1/408 = 1 + 1/3 + 1/(3*4) - 1/(3*4*34) = 1.4142156... versus sqrt(2) = 1.4142135... (see A002193).
		

References

  • H.-W. Alten et al., 4000 Jahre Algebra, 2. Auflage, Springer, 2014, p. 145-146.

Crossrefs

Programs

Formula

a(n) = numerator(R(n)) with the rational (in lowest terms) R(n) = f(n) + (n - f(n)^2)/(2*f(n)) = (f(n) + n/f(n))/2 with f(n) := floor(sqrt(n)) = A000196(n), for n >= 1. See the comment above for this formula.

Extensions

a(61)-a(70) from Stefano Spezia, Feb 15 2025
Previous Showing 31-40 of 54 results. Next