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.

A298950 Numbers k such that 5*k - 4 is a square.

Original entry on oeis.org

1, 4, 8, 17, 25, 40, 52, 73, 89, 116, 136, 169, 193, 232, 260, 305, 337, 388, 424, 481, 521, 584, 628, 697, 745, 820, 872, 953, 1009, 1096, 1156, 1249, 1313, 1412, 1480, 1585, 1657, 1768, 1844, 1961, 2041, 2164, 2248, 2377, 2465, 2600, 2692, 2833, 2929, 3076, 3176, 3329, 3433
Offset: 1

Views

Author

Bruno Berselli, Jan 30 2018

Keywords

Comments

a(n) is a member of A140612. Proof: a(n) = n^2 + (n/2-1)^2 for even n, otherwise a(n) = (n-1)^2 + ((n+1)/2)^2; also, a(n) + 1 = (n-1)^2 + (n/2+1)^2 for even n, otherwise a(n) + 1 = n^2 + ((n-3)/2)^2. Therefore, both a(n) and a(n) + 1 belong to A001481.
Primes in sequence are listed in A245042.
Squares in sequence are listed in A081068.

Crossrefs

Cf. A195162: numbers k such that 5*k + 4 is a square.
Subsequence of A001481, A020668, A036404, A140612.
Cf. A036666, A081068, A106833 (first differences), A245042.

Programs

  • GAP
    List([1..60], n -> (10*n*(n-1)+(2*n-1)*(-1)^n+9)/8);
    
  • Magma
    [(10*n*(n-1)+(2*n-1)*(-1)^n+9)/8: n in [1..60]];
    
  • Mathematica
    Table[(10 n (n - 1) + (2 n - 1) (-1)^n + 9)/8, {n, 1, 60}]
    LinearRecurrence[{1,2,-2,-1,1},{1,4,8,17,25},60] (* Harvey P. Dale, Sep 16 2022 *)
  • Maxima
    makelist((10*n*(n-1)+(2*n-1)*(-1)^n+9)/8, n, 1, 60);
    
  • PARI
    Vec((1+x^2)*(1+3*x+x^2)/((1-x)^3*(1+x)^2)+O(x^60))
    
  • PARI
    vector(60, n, nn; (10*n*(n-1)+(2*n-1)*(-1)^n+9)/8)
    
  • Python
    [(10*n*(n-1)+(2*n-1)*(-1)**n+9)/8 for n in range(1, 60)]
  • Sage
    [(10*n*(n-1)+(2*n-1)*(-1)^n+9)/8 for n in (1..60)]
    

Formula

G.f.: x*(1 + x^2)*(1 + 3*x + x^2)/((1 - x)^3*(1 + x)^2).
a(n) = a(1-n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
a(n) = (10*n*(n-1) + (2*n-1)*(-1)^n + 9)/8.
a(n) = A036666(n) + 1.