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.

A266957 Numbers m such that 9*m+10 is a square.

Original entry on oeis.org

-1, 6, 10, 31, 39, 74, 86, 135, 151, 214, 234, 311, 335, 426, 454, 559, 591, 710, 746, 879, 919, 1066, 1110, 1271, 1319, 1494, 1546, 1735, 1791, 1994, 2054, 2271, 2335, 2566, 2634, 2879, 2951, 3210, 3286, 3559, 3639, 3926, 4010, 4311, 4399, 4714, 4806, 5135, 5231, 5574
Offset: 1

Views

Author

Bruno Berselli, Jan 07 2016

Keywords

Comments

Equivalently, numbers of the form h*(9*h+2)-1, where h = 0, -1, 1, -2, 2, -3, 3, -4, 4, ...
Also, integer values of k*(k+2)/9 minus 1.

Crossrefs

Cf. A132355.
Cf. similar sequences listed in A266956.
Cf. A056020: square roots of 9*a(n)+10.

Programs

  • Magma
    [n: n in [-1..6000] | IsSquare(9*n+10)];
    
  • Magma
    [(18*(n-1)*n+5*(2*n-1)*(-1)^n-3)/8: n in [1..50]];
  • Mathematica
    Select[Range[-1, 6000], IntegerQ[Sqrt[9 # + 10]] &]
    Table[(18 (n - 1) n + 5 (2 n - 1) (-1)^n - 3)/8, {n, 1, 50}]
  • PARI
    for(n=-1, 6000, if(issquare(9*n+10), print1(n, ", ")))
    
  • PARI
    vector(50, n, n; (18*(n-1)*n+5*(2*n-1)*(-1)^n-3)/8)
    
  • Python
    from gmpy2 import is_square
    [n for n in range(-1,6000) if is_square(9*n+10)]
    
  • Python
    [(18*(n-1)*n+5*(2*n-1)*(-1)**n-3)/8 for n in range(1, 60)]
    
  • Sage
    [n for n in (-1..6000) if is_square(9*n+10)]
    
  • Sage
    [(18*(n-1)*n+5*(2*n-1)*(-1)^n-3)/8 for n in (1..50)]
    

Formula

G.f.: x*(-1 + 7*x + 6*x^2 + 7*x^3 - x^4)/((1 + x)^2*(1 - x)^3).
a(n) = a(-n+1) = (18*(n-1)*n + 5*(2*n-1)*(-1)^n - 3)/8.
a(n) = A132355(n) + 1.