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.

Showing 1-6 of 6 results.

A106328 Numbers j such that 8*(j^2) + 9 = k^2 for some positive number k.

Original entry on oeis.org

0, 3, 18, 105, 612, 3567, 20790, 121173, 706248, 4116315, 23991642, 139833537, 815009580, 4750223943, 27686334078, 161367780525, 940520349072, 5481754313907, 31950005534370, 186218278892313, 1085359667819508, 6325939728024735, 36870278700328902, 214895732473948677
Offset: 1

Views

Author

Pierre CAMI, Apr 29 2005

Keywords

Comments

The ratio k(n) /(2*j(n)) tends to sqrt(2) as n increases.
The squares of the numbers in this sequence are one less than a triangular number: a(n)^2 = A164080(n). For example, 18^2 is 324, and 325 is a triangular number. a(n)^2 + 1 = A164055(n). a(n)^2 = A072221(n)(A072221(n)+1)/2 - 1. - Tanya Khovanova & Alexey Radul, Aug 09 2009
For n > 0, a(n+1) is the n-th almost balancing number of first type (see Tekcan and Erdem). - Stefano Spezia, Nov 25 2022

Crossrefs

Programs

  • Haskell
    a106328 n = a106328_list !! (n-1)
    a106328_list = 0 : 3 : zipWith (-) (map (* 6) (tail a106328_list)) a106328_list
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Mathematica
    s=0;lst={};Do[s+=n;If[Sqrt[s-1]==Floor[Sqrt[s-1]],AppendTo[lst,Sqrt[s-1]]],{n,8!}];lst (* Vladimir Joseph Stephan Orlovsky, Apr 02 2009 *)
    Rest@ CoefficientList[Series[3 x^2/(1 - 6 x + x^2), {x, 0, 24}], x] (* Michael De Vlieger, Nov 02 2020 *)
  • PARI
    concat(0, Vec(3*x^2/(1-6*x+x^2) + O(x^40))) \\ Michel Marcus, Sep 07 2016
    
  • PARI
    a(n)=([0,1;-1,6]^n*[-3;0])[1,1] \\ Charles R Greathouse IV, Sep 07 2016

Formula

a(1)=0, a(2)=3 then a(n) = 6*a(n-1) - a(n-2).
a(n) = ((3+2*sqrt(2))^(n-1) - (3-2*sqrt(2))^(n-1))*3/4/sqrt(2). - Max Alekseyev, Jan 11 2007
a(n) = 3*A001109(n). - M. F. Hasler, R. J. Mathar, Jun 03 2009
a(n) = (3/4)*A005319(n-1).
G.f.: 3*x^2/(1 - 6*x + x^2). - Philippe Deléham, Nov 17 2008
E.g.f.: 3 - 3*exp(3*x)*(4*cosh(2*sqrt(2)*x) - 3*sqrt(2)*sinh(2*sqrt(2)*x))/4. - Stefano Spezia, Nov 25 2022

Extensions

More terms from Max Alekseyev, Jan 11 2007

A214838 Triangular numbers of the form k^2 + 2.

Original entry on oeis.org

3, 6, 66, 171, 2211, 5778, 75078, 196251, 2550411, 6666726, 86638866, 226472403, 2943171003, 7693394946, 99981175206, 261348955731, 3396416785971, 8878171099878, 115378189547778, 301596468440091, 3919462027838451, 10245401755863186, 133146330756959526, 348042063230908203
Offset: 1

Views

Author

Alex Ratushnyak, Mar 07 2013

Keywords

Comments

Corresponding k values are in A077241.
Except 3, all terms are in A089982: in fact, a(2) = 3+3 and a(n) = (k-2)*(k-1)/2+(k+1)*(k+2)/2, where k = sqrt(a(n)-2) > 2 for n > 2. [Bruno Berselli, Mar 08 2013]

Examples

			2211 is in the sequence because 2211 = 47^2 + 2.
		

Crossrefs

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(-3*(x^4+x^3-14*x^2+x+1)/((x-1)*(x^2-6*x+1)*(x^2+6*x+1)))); // Bruno Berselli, Mar 08 2013
    
  • Mathematica
    LinearRecurrence[{1, 34, -34, -1, 1}, {3, 6, 66, 171, 2211}, 25] (* Bruno Berselli, Mar 08 2013 *)
  • Maxima
    t[n]:=((5-2*sqrt(2))*(1+(-1)^n*sqrt(2))^(2*floor(n/2))+(5+2*sqrt(2))*(1-(-1)^n*sqrt(2))^(2*floor(n/2))-2)/4$
    makelist(expand(t[n]*(t[n]+1)/2), n, 1, 25); /* Bruno Berselli, Mar 08 2013 */
  • PARI
    for(n=1, 10^9, t=n*(n+1)/2; if(issquare(t-2), print1(t,", "))); \\ Joerg Arndt, Mar 08 2013
    
  • Python
    import math
    for i in range(2, 1<<32):
          t = i*(i+1)//2 - 2
          sr = int(math.sqrt(t))
          if sr*sr == t:
              print(f'{sr:10} {i:10} {t+2}')
    

Formula

G.f.: -3*x*(x^4+x^3-14*x^2+x+1)/((x-1)*(x^2-6*x+1)*(x^2+6*x+1)). - Joerg Arndt, Mar 08 2013
a(n) = A000217(t), where t = ((5-2*sqrt(2))*(1+(-1)^n*sqrt(2))^(2*floor(n/2))+(5+2*sqrt(2))*(1-(-1)^n*sqrt(2))^(2*floor(n/2))-2)/4. - Bruno Berselli, Mar 08 2013

A226072 Primes p such that p-1 is a triangular number and p-2 is a square.

Original entry on oeis.org

2, 11, 11027, 16944049179227, 94511138700672573788068264540372768937231403134027
Offset: 1

Views

Author

Alex Ratushnyak, May 25 2013

Keywords

Comments

Intersection of A129545 and A164055.
a(6) has 106 decimal digits: 12450353555...7512227.
a(7) has 381 decimal digits: 49394105798...1431227.
Roots of corresponding squares and triangular numbers: A226074 and A226073.

Crossrefs

Programs

  • Java
    import java.io.*;
    import java.math.BigInteger;
    public class A226072 {
    public static void main (String[] args) throws Exception {
      try {
        BufferedReader in = new BufferedReader(
          new FileReader(new File("b164055.txt")));
        String line;
        while ((line = in.readLine()) != null) {
          BigInteger b = new BigInteger(line.split(" ")[1]);
          b = b.add(BigInteger.ONE);
          if (b.isProbablePrime(80))
            System.out.printf("%s, ", b.toString());
        }
      } catch (Exception e) {  e.printStackTrace();  }
    }
    }
  • Mathematica
    Select[Prime[Range[1500]],OddQ[Sqrt[8(#-1)+1]]&&IntegerQ[Sqrt[#-2]]&] (* The program generates the first 3 terms of the sequence. *) (* Harvey P. Dale, Jul 20 2024 *)

A164080 Perfect squares one less than a triangular number.

Original entry on oeis.org

0, 9, 324, 11025, 374544, 12723489, 432224100, 14682895929, 498786237504, 16944049179225, 575598885856164, 19553418069930369, 664240615491776400, 22564627508650467249, 766533094678624110084, 26039560591564569275625
Offset: 1

Views

Author

Tanya Khovanova & Alexey Radul, Aug 09 2009

Keywords

Examples

			324=18^2 is a perfect square and 325=A000217(25) is a triangular number. Therefore 324 is in this sequence.
		

Programs

  • Mathematica
    LinearRecurrence[{35,-35,1},{0,9,324},20] (* Harvey P. Dale, Oct 24 2023 *)

Formula

a(n) = A164055(n)-1.
a(n) = A072221(n)*(A072221(n)+1)/2 - 1.
a(n) = 35*a(n-1) -35*a(n-2) +a(n-3) = 9*A001110(n-1). G.f.: 9*x^2*(1+x)/((1-x)*(x^2-34*x+1)). [R. J. Mathar, Oct 21 2009]

Extensions

Comments turned into formulas. - R. J. Mathar, Oct 21 2009

A328791 Triangular numbers of the form k^2 + 3.

Original entry on oeis.org

3, 28, 903, 30628, 1040403, 35343028, 1200622503, 40785822028, 1385517326403, 47066803275628, 1598885794044903, 54315050194251028, 1845112820810490003, 62679520857362409028, 2129258596329511416903, 72332112754346025765628, 2457162575051435364614403
Offset: 1

Views

Author

Jon E. Schoenfield, Oct 27 2019

Keywords

Comments

There exist triangular numbers of the form k^2 + j for j=0 (A001110), j=1 (A164055), j=2 (A214838), and j=3 (this sequence), but not for j=4,7,8,13,16,18,... (A328792).

Crossrefs

Intersection of A000217 and A117950.
Cf. A276598 (the k's).

Programs

Formula

a(1) = 3, a(2) = 28; for n > 2, a(n) = 34*a(n-1) - a(n-2) - 46.

A328792 Numbers that are not the difference between any triangular number and the largest square that does not exceed it.

Original entry on oeis.org

4, 7, 8, 13, 16, 18, 22, 23, 25, 26, 31, 33, 34, 37, 38, 40, 43, 47, 48, 49, 52, 58, 59, 60, 61, 63, 64, 67, 68, 70, 73, 76, 79, 81, 83, 85, 86, 88, 92, 93, 94, 97, 98, 99, 102, 103, 106, 108, 112, 113, 114, 115, 118, 121, 123, 124, 125, 130, 133, 134, 138
Offset: 1

Views

Author

Jon E. Schoenfield, Oct 27 2019

Keywords

Examples

			For any triangular number t, let f(t) = t - floor(sqrt(t))^2.
0 is not a term: for each term t in A001110, f(t) = 0.
1 is not a term: for each term t > 1 in A164055, f(t) = 1.
2 is not a term: for each term t in A214838, f(t) = 2.
3 is not a term: for each term t > 3 in A328791, f(t) = 3.
4 is a term, however: there exists no triangular number t such that f(t) = 4.
		

Crossrefs

The complement of A230044.
Showing 1-6 of 6 results.