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 11-20 of 22 results. Next

A232395 (ceiling(sqrt(n^3 + n^2 + n + 1)))^2 - (n^3 + n^2 + n + 1).

Original entry on oeis.org

0, 0, 1, 9, 15, 13, 30, 0, 40, 21, 45, 57, 51, 21, 70, 105, 120, 109, 66, 156, 43, 77, 81, 49, 216, 108, 217, 9, 36, 21, 293, 192, 31, 189, 309, 385, 411, 381, 289, 129, 408, 112, 281, 396, 451, 440, 357, 196, 624, 309, 613, 120, 276, 360, 366, 288, 120, 725
Offset: 0

Views

Author

Vladimir Shevelev, Nov 23 2013

Keywords

Comments

a(n)=0, iff 1 + n + n^2 + n^3 is a perfect square. For example, a(7)=0 and we have 1 + 7 + 7^2 + 7^3 = 20^2.
a(n) = Difference between smallest square >= (n^3 + n^2 + n + 1) and (n^3 + n^2 + n + 1) - Antti Karttunen, Nov 27 2013

Crossrefs

Programs

  • PARI
    a(n) = ceil(sqrt(n^3+n^2+n+1))^2 - (n^3+n^2+n+1); \\ Michel Marcus, Nov 23 2013

Formula

Contribution from Antti Karttunen, Nov 27 2013: (Start)
a(n) = A000290(⌈sqrt(A053698(n))⌉) - A053698(n). Where ⌈x⌉ stands for ceiling(x). This further reduces as:
a(n) = A000290(A135034(A053698(n))) - A053698(n).
a(n) = A048761(A053698(n)) - A053698(n).
a(n) = A068527(A053698(n)).
(End)

Extensions

More terms from Peter J. C. Moses

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

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

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

A256098 Denominators for the numerators A256097.

Original entry on oeis.org

1, 2, 1, 1, 4, 2, 4, 1, 1, 6, 3, 2, 3, 6, 1, 1, 8, 4, 8, 2, 8, 4, 8, 1, 1, 10, 5, 10, 5, 2, 5, 10, 5, 10, 1, 1, 12, 6, 4, 3, 12, 2, 12, 3, 4, 6, 12, 1, 1, 14, 7, 14, 7, 14, 7, 2, 7, 14, 7, 14, 7, 14, 1, 1, 16, 8, 16, 4, 16, 8, 16, 2, 16, 8, 16, 4, 16, 8, 16, 1
Offset: 1

Views

Author

Wolfdieter Lang, Mar 24 2015

Keywords

Comments

The corresponding numerators are given in A256097.
See A256097 for comments, references and links.

Examples

			See A256097.
		

Crossrefs

Programs

Formula

a(n) = denominator(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.

Extensions

a(61)-a(80) from Stefano Spezia, Feb 15 2025

A077503 Smallest n-digit square beginning with n.

Original entry on oeis.org

1, 25, 324, 4096, 50176, 600625, 7001316, 80013025, 900000000, 1000014129, 11000024161, 120000580921, 1300001310976, 14000004588964, 150000007007601, 1600000000000000, 17000000233634401, 180000000244436761
Offset: 1

Views

Author

Amarnath Murthy, Nov 08 2002

Keywords

Crossrefs

Formula

a(n) = ceiling(sqrt(n*10^d))^2 where d = n - digit(n), digit(n) = number of digits in n. - Ray Chandler, Aug 11 2003

Extensions

More terms from Ray Chandler, Aug 11 2003

A099135 a(n) = smallest number m, not occurring earlier, such that a(k)+m is a square for some k

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Sep 29 2004

Keywords

Comments

Permutation of the natural numbers with inverse A099136;
a(n) <> n iff 1 < n <= 14.

Crossrefs

Programs

A140597 Squares nearest to and > terms in A098562.

Original entry on oeis.org

16, 20736, 76176, 239121, 2211169, 3583449, 29203216, 40005625, 45454564, 55606849, 77299264, 108097609, 115004176, 155650576, 226231681, 302934025, 324684361, 519703209, 551357361, 618367689, 797045824, 944025625, 1039740025
Offset: 1

Views

Author

Enoch Haga, May 17 2008

Keywords

Examples

			The first term of A098562 is 13, the prime sum of 2^2 + 3^2, where 4+9=13. The square just exceeding 13 is 16, the first term of this sequence.
		

Crossrefs

Formula

a(n) = A048761(A098562(n)). - Jason Yuen, Sep 30 2024

A166068 a(n) = a(n-1)+ [least square > a(n-1)].

Original entry on oeis.org

1, 5, 14, 30, 66, 147, 316, 640, 1316, 2685, 5389, 10865, 21890, 43794, 87894, 176103, 352503, 705339, 1410939, 2822283, 5644683, 11290059, 22586380, 45177389, 90362673, 180726709, 361467845, 722962014, 1445926558, 2891903234
Offset: 1

Views

Author

Ctibor O. Zizka, Oct 06 2009

Keywords

Comments

This sequence is the base sequence of the map: a(n) = a(n-1)+ [least square > a(n-1)] if a(n) is not divisible by Y, else a(n)=a(n-1)/Y, where Y is a positive integer.
Experimental results shows this map converges to a periodic orbit for all Y.
What is the number and length of periodic orbits for different Y?
What is the trajectory of some input under the map? If Y=2, the map converges to two periodic orbits, {1-5-14-7-16-8-4-2} and {11-27-63-127-271-560-280-140-70-35-71-152-76-38-19-44-22} whose length is L1=8, L2=17.
Two examples of trajectories for initial value 9 resp. 13 under the map for Y=2 are 9-25-61-125-269-558-279-568-284-142-{76-38-19-44-22-11-27-63-127-271-560-280-140-70-35-71-152} and 13-29-65-146-73-154-77-158-79-160-80-40-20-10-{5-14-7-16-8-4-2-1}.

Crossrefs

Programs

  • Maple
    A[1]:= 1:
    for n from 1 to 100 do
      A[n+1]:= A[n] + (floor(sqrt(A[n]))+1)^2
    od:
    seq(A[n],n=1..100); # Robert Israel, Oct 06 2014
  • PARI
    lista(n) = {na = 0; for (i=1, n, na += ceil(sqrt(na+1))^2; print1(na, ", "););} \\ Michel Marcus, Jun 02 2013

Extensions

Typo in data corrected by D. S. McNeil, Aug 17 2010

A259225 Smallest oblong number greater than or equal to n.

Original entry on oeis.org

0, 2, 2, 6, 6, 6, 6, 12, 12, 12, 12, 12, 12, 20, 20, 20, 20, 20, 20, 20, 20, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72
Offset: 0

Views

Author

Michel Marcus, Jun 21 2015

Keywords

Crossrefs

Cf. A002378 (oblong numbers), A048761 (similar, with square instead).

Programs

  • Mathematica
    f[n_] := n*(n + 1); g[n_] := (Sqrt[4*n + 1] - 1)/2; a[n_] := f[Ceiling[g[n]]]; Array[a, 100, 0] (* Amiram Eldar, Aug 16 2022 *)
  • PARI
    a(n) = my(k = 0); while(k*(k+1)
    				

Formula

Sum_{n>=1} 1/a(n)^2 = 4 - Pi^2/3. - Amiram Eldar, Aug 16 2022
Previous Showing 11-20 of 22 results. Next