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 26 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

A229766 Odd numbers whose square's binary reversal is also a square.

Original entry on oeis.org

1, 3, 4523, 11991, 18197, 66075, 72225, 141683, 1092489, 3168099, 6001209, 6226335, 6435309, 12489657, 17906499, 50429883, 51928701, 68301841, 295742437, 390117873, 542959199, 554456167, 566494057
Offset: 1

Views

Author

Alex Ratushnyak, Dec 19 2013

Keywords

Comments

A003166 is a subsequence, except A003166(1)=0.
All odd numbers n such that A068527(A030101(n^2)) = 0. - Antti Karttunen, Dec 20 2013

Crossrefs

Formula

a(n) = sqrt(A229687(n)).

A232397 a(n) = ceiling(sqrt(n^4 + n^3 + n^2 + n + 1))^2 - (n^4 + n^3 + n^2 + n + 1).

Original entry on oeis.org

0, 4, 5, 0, 20, 3, 45, 8, 80, 15, 125, 24, 180, 35, 245, 48, 320, 63, 405, 80, 500, 99, 605, 120, 720, 143, 845, 168, 980, 195, 1125, 224, 1280, 255, 1445, 288, 1620, 323, 1805, 360, 2000, 399, 2205, 440, 2420, 483, 2645, 528, 2880, 575, 3125, 624, 3380, 675
Offset: 0

Views

Author

Vladimir Shevelev, Nov 23 2013

Keywords

Comments

a(n) = 0 if and only if n^4 + n^3 + n^2 + n + 1 is a perfect square.
Using formula below, we immediately prove that a(n)=0 iff n=0 or n=3. This means that all nonnegative solutions of the Diophantine equation n^4 + n^3 + n^2 + n + 1 = m^2 are n=0, m=1 and n=3, m=11.
For m >=0, if we also consider negative values of n, we obtain only one more solution: n=-1, m=1.
Indeed, if one considers sequence b(n) = ceiling(sqrt(n^4 - n^3 + n^2 - n + 1))^2 - (n^4 - n^3 + n^2 - n +1 ), then, for even n, a(n) = b(n), while for odd n>=3, a(n) = b(n-2).

Crossrefs

Programs

  • Magma
    [Ceiling(Sqrt(n^4+n^3+n^2+n+1))^2-(n^4+n^3+n^2+n+1): n in [0..60]]; // Vincenzo Librandi, Jan 31 2016
    
  • Maple
    0, 4, seq(op([5*k^2, k^2-1]),k=1..100); # Robert Israel, Feb 02 2016
  • Mathematica
    Table[Ceiling[Sqrt[n^4 + n^3 + n^2 + n + 1]]^2 - (n^4 + n^3 + n^2 + n + 1), {n, 0, 60}] (* Vincenzo Librandi, Jan 31 2016 *)
  • Python
    from math import isqrt
    def A232397(n): return (1+isqrt(m:=n*(n*(n*(n+1)+1)+1)))**2-m-1 # Chai Wah Wu, Jul 29 2022

Formula

a(1) = 4, for other odd n, a(n) = ((n-1)/2)^2 - 1; for even n>=0, a(n) = 5/4 * n^2.
a(n) = A068527(A053699(n)). [Straight from the description: Difference between smallest square >= (n^4 + n^3 + n^2 + n + 1) and (n^4 + n^3 + n^2 + n + 1)]. - Antti Karttunen, Nov 28 2013
a(n) = (6*n^2-2*n-3+(4*n^2+2*n+3)*(-1)^n+20*(1-(-1)^(2^abs(n-1))))/8. - Luce ETIENNE, Jan 30 2016
G.f.: 4*x+x^2*(x^5-3*x^3-5*x^2-5)/(x^2-1)^3. - Robert Israel, Feb 02 2016

Extensions

More terms from Peter J. C. Moses

A232847 Numbers k such that sum of divisors of k is a square and a triangular number (A000217). That is, numbers k such that A000203(k) is in A001110.

Original entry on oeis.org

1, 22, 17310, 20802, 23110, 24262, 25995, 26542, 29427, 31735, 33835, 38137, 39287, 39859, 40967, 13595040, 14285160, 15129504, 15378336, 15834528, 15912936, 16327008, 16555752, 16897896, 16908264, 17054388, 17145432, 17749044, 18013428, 20239146, 20713482, 21265578
Offset: 1

Views

Author

Alex Ratushnyak, Dec 01 2013

Keywords

Examples

			Sigma(22) = 36. Because 36 is both a square and a triangular number, 22 is in the sequence.
		

Crossrefs

A249142 Let k be the difference between the smallest square >= n and n. Sequence gives difference between the smallest square >= k and k.

Original entry on oeis.org

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

Views

Author

Valtteri Raiko, Oct 22 2014

Keywords

Comments

Equals A068527 applied to itself.

Examples

			For n = 13 the next biggest square is 16, thus k = 16 - 13 = 3 and for 3 the next biggest square is 4, thus a(14) = 3 - 2 = 1.
		

Crossrefs

Cf. A068527.

Programs

  • Magma
    [n - Ceiling(Sqrt(n))^2 + Ceiling(Sqrt(-n+Ceiling(Sqrt(n))^2))^2: n in [1..100]]; // Vincenzo Librandi, Oct 23 2014
  • Maple
    A068527:= n -> ceil(sqrt(n))^2 - n:
    map(A068527@@2, [$1..100]); # Robert Israel, Nov 02 2017
  • Mathematica
    Table[n - Ceiling[Sqrt[n]]^2 + Ceiling[Sqrt[-n + Ceiling[Sqrt[n]]^2]]^2, {n, 1, 100}]
  • PARI
    A068527(n)=if(issquare(n), 0, (sqrtint(n)+1)^2-n)
    a(n)=A068527(A068527(n)) \\ Charles R Greathouse IV, Oct 22 2014
    

Formula

a(n) = A068527(A068527(n)).
a(n) = n - ceiling(sqrt(n))^2 + ceiling(sqrt(-n+ceiling(sqrt(n))^2))^2.
a(n) < (64n)^(1/4). - Charles R Greathouse IV, Oct 22 2014

Extensions

Edited, old crossrefs entry moved to Comments, and first two formula lines interchanged by Wolfdieter Lang, Nov 10 2014

A300001 Side length of the smallest equilateral triangle that can be dissected into n equilateral triangles with integer sides, or 0 if no such triangle exists.

Original entry on oeis.org

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

Views

Author

Hugo Pfoertner, Feb 20 2018

Keywords

Comments

No solutions exist for n = 2, 3 and 5.
a(n) = A290820(n) for n <= 8. It is conjectured that a(n) < A290820(n) for all n > 12.
The seven numbers mentioned by Peter Munn in the Formula section [1, 2, 4, 5, 7, 10, 13] coincide with the seven terms of A123120. - M. F. Hasler and Omar E. Pol, Feb 23 2018

Examples

			            a(9)=3               a(10)=4                a(11)=5
              *                     *                      *
             / \                   / \                    / \
            *---*                 *---*                  +   +
           / \ / \               / \ / \                /     \
          *---*---*             *---*---*              +       +
         / \ / \ / \           / \ / \ / \            /         \
        *---*---*---*         +   *---*   +          *---+---+---*
                             /     \ /     \        / \ / \     / \
                            *---+---*---+---*      *---*---*   +   +
                                                  / \ / \ / \ /     \
                                                 *---*---*---*---+---*
.
           a(12)=6                a(13)=4                a(14)=5
              *                      *                      *
             / \                    / \                    / \
            *---*                  *---*                  +   +
           / \ / \                / \ / \                /     \
          *---*---*              *---*---*              +       +
         / \ / \ / \            / \ / \ / \            /         \
        *---*---*---*          *---*   *---*          *---+---+---*
       / \         / \        / \ /     \ / \        / \ / \ / \ / \
      *   +       +   +      *---*---*---*---*      *---*---*---*   +
     /     \     /     \                           / \ / \ / \ /     \
    +       +   +       +                         *---*---*---*---+---*
   /         \ /         \
  *---+---+---*---+---+---*
.
           a(15)=6                 a(16)=4                a(17)=5
              *                       *                      *
             / \                     / \                    / \
            +   +                   *---*                  +   +
           /     \                 / \ / \                /     \
          +       +               *---*---*              +       +
         /         \             / \ / \ / \            /         \
        +           +           *---*---*---*          *---*---*---*
       /             \         / \ / \ / \ / \        / \ / \ / \ / \
      *---*---*---*---*       *---*---*---*---*      *---*---*---*---*
     / \     / \     / \                            / \ / \ / \ / \ / \
    *---*   *---*   *---*                          *---*---*---*---*---*
   / \ / \ / \ / \ / \ / \
  *---*---*---*---*---*---*
.
           a(18)=6                 a(19)=5                 a(20)=6
              *                       *                       *
             / \                     / \                     / \
            +   +                   +   +                   *---*
           /     \                 /     \                 / \ / \
          +       +               *---*---*               *---*---*
         /         \             / \     / \             / \ / \ / \
        +           +           *---*   *---*           *---*---*---*
       /             \         / \ / \ / \ / \         / \ / \ / \ / \
      *---*---*---*---*       *---*---*---*---*       +   *---*---*   +
     / \ / \ / \ / \ / \     / \ / \ / \ / \ / \     /     \ / \ /     \
    *---*---*   *---*---*   *---*---*---*---*---*   +       *---*       +
   / \ / \ /     \ / \ / \                         /         \ /         \
  *---*---*---+---*---*---*                       *---+---+---*---+---+---*
		

Crossrefs

Formula

a(n^2) = n for all n>=1, a(n^2-3) = n for all n>=3. - Corrected by Peter Munn, Feb 24 2018
For n > 23, if A068527(n) = 1, 2, 4, 5, 7, 10 or 13 then a(n) = ceiling(sqrt(n)) + 1 else a(n) = ceiling(sqrt(n)). - Peter Munn, Feb 23 2018

Extensions

a(21)-a(100) from Peter Munn, Feb 24 2018

A072690 a(n) = (n - A048760(n)) * (A048761(n) - n).

Original entry on oeis.org

0, 2, 2, 0, 4, 6, 6, 4, 0, 6, 10, 12, 12, 10, 6, 0, 8, 14, 18, 20, 20, 18, 14, 8, 0, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 0, 12, 22, 30, 36, 40, 42, 42, 40, 36, 30, 22, 12, 0, 14, 26, 36, 44, 50, 54, 56, 56, 54, 50, 44, 36, 26, 14, 0, 16, 30, 42, 52, 60, 66, 70, 72, 72, 70, 66
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 02 2002

Keywords

Comments

a(n)=0 iff n is a square.

Crossrefs

a(n) = A053186(n) * A068527(n).

Formula

a(n) = A053186(n) * (A072689(n) - A053186(n)).

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

A249298 Smallest positive integer k, such that s-k*n is a square where s is the smallest square >= k*n.

Original entry on oeis.org

1, 2, 1, 1, 1, 2, 3, 1, 1, 4, 5, 1, 5, 6, 1, 1, 9, 2, 9, 2, 1, 12, 13, 1, 1, 14, 1, 3, 17, 2, 19, 1, 3, 20, 1, 1, 23, 24, 3, 1, 25, 2, 27, 6, 1, 30, 31, 1, 1, 2, 3, 7, 35, 4, 1, 2, 3, 40, 41, 1, 41, 42, 1, 1, 1, 4, 47, 10, 5, 2, 51, 1, 51, 52, 3, 12, 1, 6, 57, 1, 1, 60, 61, 1, 3, 62, 7, 3, 65, 2
Offset: 1

Views

Author

Valtteri Raiko, Oct 24 2014

Keywords

Comments

For any n>=3, there exists at least one positive integer k, 1 <= k <= n-1 such that the difference between the smallest square >= k*n and k*n is a square. To prove this, consider the multiplier k = n-2. Then (n-2)*n = (n-1)^2-1, thus the difference from the next square is 1, which is a square. If n = 1, k = 1 and if n = 2, k = 2.
Smallest positive integer k such that ceiling(sqrt(k*n))^2-k*n is a square.

Examples

			a(10) = 4, for ceiling(sqrt(10))^2-10 = 6, ceiling(sqrt(2*10))^2-2*10 = 5, ceiling(sqrt(3*10))^2-3*10 = 6 and ceiling(sqrt(4*10))^2-4*10 = 9 = 3^2.
		

Crossrefs

Cf. A000290, A145236 (equals a(A000040)), A068527 (difference for k=1).

Programs

  • Mathematica
    dif[n_] := Ceiling[Sqrt[n]]^2 - n;a[k_] := Module[{n = 1}, While[dif[dif[n*k]] != 0, n++]; Return[n]];Table[a[k], {k, 1, 90}]
  • PARI
    a(n) = {k=1; while(!issquare(ceil(sqrt(k*n))^2-k*n), k++); k;} \\ Michel Marcus, Oct 24 2014

A256173 Numbers k such that ceiling(sqrt(k))^2 - k is a square.

Original entry on oeis.org

0, 1, 3, 4, 5, 8, 9, 12, 15, 16, 21, 24, 25, 27, 32, 35, 36, 40, 45, 48, 49, 55, 60, 63, 64, 65, 72, 77, 80, 81, 84, 91, 96, 99, 100, 105, 112, 117, 120, 121, 128, 135, 140, 143, 144, 153, 160, 165, 168, 169, 171, 180, 187, 192, 195, 196, 200, 209, 216, 221, 224, 225, 231, 240, 247, 252, 255, 256, 264, 273, 280, 285, 288, 289, 299
Offset: 1

Views

Author

Valtteri Raiko, Mar 17 2015

Keywords

Comments

Numbers k such that A068527(k) is a square. k is in the sequence if and only if k - ceiling(sqrt(k))^2 + ceiling(sqrt(ceiling(sqrt(k))^2 - k))^2 = 0.
A000290 is a subsequence since for a square k, ceiling(sqrt(k))^2 - k = 0, a square too.
Also, numbers k such that A249298(k) is 1.
Also, numbers k such that A249142(k) is 0.
The only prime numbers in the sequence are 3 and 5.
No number from A016825 appears in the sequence.
If p and q are terms of A065091 and if q satisfies the inequality p - 2*sqrt(2p) + 2 < q < p + 2*sqrt(2p) + 2, then p*q is in the sequence. Thus infinitely many numbers from A046315 appear in the sequence.

Examples

			Ceiling(sqrt(27))^2 - 27 = 9 = 3^2, so 27 is in the sequence.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..200] | IsSquare(Ceiling(Sqrt(n))^2-n)]; // Vincenzo Librandi, Mar 18 2015
  • Mathematica
    Flatten[Position[Table[n - Ceiling[Sqrt[n]]^2 + Ceiling[Sqrt[-n + Ceiling[Sqrt[n]]^2]]^2, {n, 0, 300}], 0]] - 1
    Select[Range[0,300],IntegerQ[Sqrt[Ceiling[Sqrt[#]]^2-#]]&] (* Harvey P. Dale, Sep 06 2023 *)
  • PARI
    isok(n) = issquare(ceil(sqrt(n))^2-n); \\ Michel Marcus, Mar 18 2015
    
Previous Showing 11-20 of 26 results. Next