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-8 of 8 results.

A154357 a(n) = 25*n^2 - 14*n + 2.

Original entry on oeis.org

2, 13, 74, 185, 346, 557, 818, 1129, 1490, 1901, 2362, 2873, 3434, 4045, 4706, 5417, 6178, 6989, 7850, 8761, 9722, 10733, 11794, 12905, 14066, 15277, 16538, 17849, 19210, 20621, 22082, 23593, 25154, 26765, 28426, 30137, 31898, 33709, 35570, 37481, 39442, 41453, 43514
Offset: 0

Views

Author

Vincenzo Librandi, Jan 08 2009

Keywords

Comments

The identity (1250*n^2 - 700*n + 99)^2 - (25*n^2 - 14*n + 2)*(250*n - 70)^2 = 1 can be written as A154359(n)^2 - a(n)*A154361(n)^2 = 1.
Numbers of the form (4*n-1)^2 + (3*n-1)^2. - Bruno Berselli, Dec 11 2011
From Bruno Berselli, Dec 13 2011: (Start)
More generally, considering together this sequence and A154355, A154358-A154361, for
r = (1/4)*(1250*(n-1)*(n-2) + 75*(2*n-3)(-1)^n + 321) with n>=0, i.e. the interleaving of A154358 and A154359 (649, 99, 99, 649, 2049, 3699,...)
s = (5/2)*(50*n+3*(-1)^n-75), the interleaving of A154360 and A154361 (-180, -70, 70, 180, 320, 430,...)
t = (1/8)*(50*(n-1)*(n-2) + 3*(2*n-3)*(-1)^n + 13), the interleaving of A154355 and A154357 (13, 2, 2, 13, 41, 74,...)
we verify that r^2 - t*s^2 = 1.
For n even we obtain (1250*n^2 - 1800*n + 649)^2 - (25*n^2 - 36*n + 13)*(250*n - 180)^2 = 1; for n odd we have the identity shown in the first comment. (End)
sqrt(A154357(n)) for n >= 1 has the continued fraction x; [1 1 1 1 2x] where x = 5n - 2 (the part in [] being repeated). - Robert Israel, May 26 2013
For n >= 1, the continued fraction expansion of sqrt(4*a(n)) is [10n-3; {4, 1, 5n-3, 1, 4, 20n-6}] - Magus K. Chu, Sep 16 2022

Crossrefs

Programs

Formula

G.f.: (2 + 7*x + 41*x^2)/(1-x)^3. - R. J. Mathar, Jan 05 2011
a(n) = 3*a(n-1) -3*a(n-2) +a(n-3). - Vincenzo Librandi, Feb 08 2012
E.g.f.: (2 + 11*x + 25*x^2)*exp(x). - G. C. Greubel, Sep 14 2016

Extensions

One entry and offset corrected by R. J. Mathar, Jan 05 2011
First comment rewritten by Bruno Berselli, Dec 11 2011

A154361 a(n) = 250*n - 70.

Original entry on oeis.org

-70, 180, 430, 680, 930, 1180, 1430, 1680, 1930, 2180, 2430, 2680, 2930, 3180, 3430, 3680, 3930, 4180, 4430, 4680, 4930, 5180, 5430, 5680, 5930, 6180, 6430, 6680, 6930, 7180, 7430, 7680, 7930, 8180, 8430, 8680, 8930, 9180
Offset: 0

Views

Author

Vincenzo Librandi, Jan 08 2009

Keywords

Comments

The identity (1250*n^2 - 700*n + 99)^2 - (25*n^2 - 14*n + 2)*(250*n - 70)^2 = 1 can be written as A154359(n)^2 - A154357(n)*a(n)^2 = 1. See also the third comment in A154357.

Crossrefs

Programs

Formula

G.f.: -10*(7 - 32*x)/(1-x)^2. - Bruno Berselli, Dec 13 2011
a(n) = 2*a(n-1) - a(n-2). - Vincenzo Librandi, Feb 21 2012
E.g.f.: 10*(-7 + 25*x)*exp(x). - G. C. Greubel, Sep 15 2016

Extensions

Offset changed and Librandi's comment rewritten by Bruno Berselli, Dec 13 2011

A154358 a(n) = 1250*n^2 - 1800*n + 649.

Original entry on oeis.org

649, 99, 2049, 6499, 13449, 22899, 34849, 49299, 66249, 85699, 107649, 132099, 159049, 188499, 220449, 254899, 291849, 331299, 373249, 417699, 464649, 514099, 566049, 620499, 677449, 736899, 798849, 863299, 930249
Offset: 0

Views

Author

Vincenzo Librandi, Jan 08 2009

Keywords

Comments

The identity (1250*n^2 - 1800*n + 649)^2 - (25*n^2 - 36*n + 13)*(250*n - 180)^2 = 1 can be written as a(n)^2 - A154355(n)*A154360(n)^2 = 1. See also the third comment in A154357.

Crossrefs

Programs

  • Magma
    [1250*n^2-1800*n+649: n in [0..40]]; // Bruno Berselli, Sep 15 2016
  • Mathematica
    LinearRecurrence[{3, -3, 1}, {649, 99, 2049}, 50] (* Vincenzo Librandi, Feb 21 2012 *)
  • PARI
    for(n=0, 40, print1(1250*n^2 - 1800*n + 649", ")); \\ Vincenzo Librandi, Feb 21 2012
    

Formula

G.f.: (649 - 1848*x + 3699*x^2)/(1-x)^3. - R. J. Mathar, Jan 05 2011
a(n) = 3*a(n-1) -3*a(n-2) +a(n-3).
E.g.f.: (649 - 550*x + 1250*x^2)*exp(x). - G. C. Greubel, Sep 14 2016

Extensions

Offset and one entry corrected by R. J. Mathar, Jan 05 2011
Librandi's comment rewritten by Bruno Berselli, Dec 13 2011

A154360 a(n) = 250*n - 180.

Original entry on oeis.org

-180, 70, 320, 570, 820, 1070, 1320, 1570, 1820, 2070, 2320, 2570, 2820, 3070, 3320, 3570, 3820, 4070, 4320, 4570, 4820, 5070, 5320, 5570, 5820, 6070, 6320, 6570, 6820, 7070, 7320, 7570, 7820, 8070, 8320, 8570, 8820, 9070, 9320, 9570, 9820, 10070, 10320
Offset: 0

Views

Author

Vincenzo Librandi, Jan 08 2009

Keywords

Comments

The identity (1250*n^2 - 1800*n + 649)^2 - (25*n^2 - 36*n + 13)*(250*n - 180)^2 = 1 can be written as A154358(n)^2 - A154355(n)*a(n)^2 = 1. See also the third comment in A154357.

Crossrefs

Programs

Formula

G.f.: -10*(18 - 43*x)/(1-x)^2. - Bruno Berselli, Dec 13 2011
a(n) = 2*a(n-1) - a(n-2). - Vincenzo Librandi, Feb 21 2012
E.g.f.: 10*(-18 + 25*x)*exp(x). - G. C. Greubel, Sep 15 2016

Extensions

Offset changed and Librandi's comment rewritten by Bruno Berselli, Dec 13 2011

A202141 a(n) = 13*n^2 - 16*n + 5.

Original entry on oeis.org

5, 2, 25, 74, 149, 250, 377, 530, 709, 914, 1145, 1402, 1685, 1994, 2329, 2690, 3077, 3490, 3929, 4394, 4885, 5402, 5945, 6514, 7109, 7730, 8377, 9050, 9749, 10474, 11225, 12002, 12805, 13634, 14489, 15370, 16277, 17210, 18169, 19154, 20165, 21202, 22265
Offset: 0

Views

Author

Bruno Berselli, Dec 12 2011

Keywords

Comments

Numbers of the form (r*n - r + 1)^2 + ((r+1)*n - r)^2; in this case, r=2.
Inverse binomial transform of this sequence: 5,-3, 26, 0, 0 (0 continued).

Crossrefs

Cf. A190816 (r=1), A154355 (r=3), A161587.

Programs

  • Magma
    [13*n^2-16*n+5: n in [0..42]];
  • Maple
    A202141:=n->13*n^2-16*n+5: seq(A202141(n), n=0..100); # Wesley Ivan Hurt, Oct 09 2017
  • Mathematica
    Table[13 n^2 - 16 n + 5, {n, 0, 42}]
    LinearRecurrence[{3,-3,1},{5,2,25},50] (* Harvey P. Dale, Aug 23 2025 *)
  • PARI
    for(n=0, 42, print1(13*n^2-16*n+5", "));
    

Formula

G.f.: (5 - 13*x + 34*x^2)/(1-x)^3.
a(n) = A161587(n-1) + 1 with A161587(-1) = 4.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. - Wesley Ivan Hurt, Oct 09 2017
E.g.f.: (5 - 3*x + 13*x^2)*exp(x). - Elmo R. Oliveira, Oct 20 2024

A007533 a(n) = (5*n + 1)^2 + 4*n + 1.

Original entry on oeis.org

2, 41, 130, 269, 458, 697, 986, 1325, 1714, 2153, 2642, 3181, 3770, 4409, 5098, 5837, 6626, 7465, 8354, 9293, 10282, 11321, 12410, 13549, 14738, 15977, 17266, 18605, 19994, 21433, 22922, 24461, 26050, 27689, 29378, 31117, 32906, 34745, 36634, 38573, 40562, 42601
Offset: 0

Views

Author

Keywords

Comments

Also, numbers of the form (3*k + 1)^2 + (4*k + 1)^2. - Bruno Berselli, Dec 11 2011
The continued fraction expansion of sqrt(a(n)) is [5n+1; {2, 2, 10n+2}]. For n=0, this collapses to [1; {2}]. - Magus K. Chu, Aug 27 2022

References

  • W. Sierpiński, Elementary Theory of Numbers. Państ. Wydaw. Nauk., Warsaw, 1964, p. 323.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A154355.

Programs

Formula

From Bruno Berselli, Dec 11 2011: (Start)
a(n) = 25*n^2 + 14*n + 2.
G.f.: (2 + 35*x + 13*x^2)/(1-x)^3. (End)
From Elmo R. Oliveira, Oct 31 2024: (Start)
E.g.f.: (2 + 39*x + 25*x^2)*exp(x).
a(n) = A154355(n+1).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

A154354 List of primes of the form 25n^2-36n+13 with n>=0.

Original entry on oeis.org

2, 13, 41, 269, 2153, 3181, 4409, 9293, 11321, 21433, 27689, 46829, 51257, 70969, 87853, 100109, 106537, 119993, 141677, 157133, 165161, 256441, 277097, 367721, 430861, 444089, 457517, 650281, 858217, 895673, 914701, 1033069, 1053497, 1137209, 1224121
Offset: 1

Views

Author

Vincenzo Librandi, Jan 07 2009

Keywords

Comments

Primes in A154355.

Examples

			a(6) = 3181 corresponds to n=12, therefore 3181 = (3*12-2)^2+(4*12-3)^2 = 34^2+45^2 (see second comment in A154355). - _Bruno Berselli_, Feb 21 2012
		

Crossrefs

Cf. A154355.

Programs

  • Magma
    [a: n in [0..350] | IsPrime(a) where a is 25*n^2-36*n+13]; // Vincenzo Librandi, Jul 16 2012
  • Mathematica
    Select[Table[25*n^2-36*n+13,{n,0,2000}],PrimeQ] (* Vincenzo Librandi, Jul 16 2012 *)

Extensions

Corrected by Don Reble, Jun 16 2010
a(1)-a(2) in b-file corrected by Andrew Howroyd, Feb 22 2018

A334116 a(n) is the least number k greater than n such that the square roots of both k and n have continuous fractions with the same period p and, if p > 1, the same periodic terms except for the last term.

Original entry on oeis.org

1, 5, 8, 4, 10, 12, 32, 15, 9, 17, 40, 20, 74, 33, 24, 16, 26, 39, 1880, 30, 112, 660, 96, 35, 25, 37, 104, 299, 338, 42, 77600, 75, 60, 78, 48, 36, 50, 84, 68, 87, 130, 56, 288968, 468, 350, 3242817, 192, 63, 49, 65, 200, 2726, 1042, 1628, 180, 72, 308, 425, 5880, 95
Offset: 1

Views

Author

Gerhard Kirchner, Apr 14 2020

Keywords

Comments

Note that a(n)=n if n is a square. The square root of a squarefree integer n has a continued fraction of the form [e(0);[e(1),...,e(p)]] with e(p)=2e(0) and e(i)=e(p-i) for 0 < i < p, see reference. The symmetric part [e(1),...,e(p-1)] of the continued fraction [m;[e(1),...,e(p-1), 2m]] will be called the pattern of n. 2 has the empty pattern (sqrt(2)=[1,[2]]), 3 has the pattern [1] (sqrt(3)=[1,[1,2]]) and so on. In this sense, the description of the sequence can be simplified as "Least number greater than n with the same pattern".
It can be can proved (see link) that integers with the same pattern are terms of a quadratic sequence.
An ambiguity has to be fixed: sqrt(2)=[1,[2]] = [1,[2,2]] = [1,[2,2,2]] and so on. We define that the shortest pattern is correct, here it is empty. Comment on the third subsequence (2),6,12,... below: The second term 6 has the pattern [2], but the first term 2 in brackets has the "wrong" pattern, after fixing the ambiguity.

Examples

			1) p=1: f(1)=2, f(2)=a(2)=5, f(3)=a(5)=10, f(4)=a(10)=17,..
sqrt(2)=[1,[2]], sqrt(5)=[2,[4]], sqrt(10)=[3,[6]], sqrt(17)=[4,[8]],..
2) p=2: f(1)=3, f(2)=a(3)=8, f(3)=a(8)=15, f(4)=a(15)=24,..
sqrt(3)=[1,[1,2]], sqrt(8)=[2,[1,4]], sqrt(15)=[3,[1,6]], sqrt(24)=[4,[1,8]],..
3) p=3: f(1)=41, f(2)=a(41)=130, f(3)=a(130)=269,..
sqrt(41)=[6,[2,2,12]], sqrt(130)=[11,[2,2,121]], sqrt(269)=[16,[2,2,256]],..
4) p=4: f(1)=33, f(2)=a(33)=60, f(3)=a(60)=95,..
sqrt(33)=[5,[1,2,1,10]], sqrt(60)=[7,[1,2,1,49]], sqrt(95)=[9,[1,2,1,81]],..
Several subsequences f(k) with f(k+1)=a(f(k)).
k>1 if first term in brackets, k>0 otherwise.
First terms  Period  Formula           Example
1) 2,5,10,17   1  A002522(k)=k^2+1           1
2) 3,8,15,24   2  A005563(k)=(k+1)^2-1       2
3)(2),6,12     2  A002378(k)=k*(k+1)
4) 7,32,75     4  A013656(k)=k*(9*k-2)
5) 11,40,87    2  A147296(k)=k*(9*k+2)
6) 13,74,185   5  A154357(k)=25*k^2-14*k+2
7) (3),14,33   4  A033991(k)=k*(4*k-1)       4
8) (5),18,39   2  A007742(k)=k*(4*k+1)
9) 21,112,275  6  A157265(k)=36*k^2-17*k+2
10)23,96,219   4  A154376(k)=25*k^2-2*k
11)27,104,231  2  A154377(k)=25*k^2+2*k
12)28,299,858  4  A156711(k)=144*k^2-161*k+45
13)29,338,985  5  A156640(k)=169*k^2+140*k+29
14)(8),34,78   4  A154516(k)=9*k^2-k
15)(10),38,84  2  A154517(k)=9*k^2+k
16)(2),41,130  3  A154355(k)=25*k^2-36*k+13  3
17)47,192,435  4  A157362(k)=49*k^2-2*k
		

References

  • Kenneth H. Rosen, Elementary number theory and its applications, Addison-Wesley, 3rd ed. 1993, page 428.

Crossrefs

Programs

  • Maxima
    block([nmax: 100],
    /*saves the first nmax terms in the current directory*/
    algebraic: true, local(coeff), showtime: true,
    fl: openw(sconcat("terms",nmax, ".txt")),
    coeff(w,m):=
      block(a: m, p: 0, s: w, vv:[],
       while a<2*m do
        (p: p+1, s: ratsimp(1/(s-floor(s))), a: floor(s),
         if a<2*m then vv: append(vv, [a])),
       j: floor((p-1)/2),
       if mod(p,2)=0 then v: [1,0,vv[j+1]] else v: [0,1,1],
       for i from j thru 1 step(-1) do
        (h: vv[i], u: [v[1]+h*v[3], v[3], 2*h*v[1]+v[2]+h^2*v[3]], v: u),
       return(v)),
       for n from 1 thru nmax do
        (w: sqrt(n), m: floor(w),
         if w=m then  b: n else
          (v: coeff(w,m),  x: v[1], y: v[2], z: v[3], q: mod(z,2),
           if q=0 then (z: z/2, y: y/2) else x: 2*x,
           fr: (x*m+y)/z, m: m+z, fr: fr+x, b: m^2+fr),
          printf( fl, "~d, ", b)),
          close(fl));
    
  • Python
    from sympy import floor, S, sqrt
    def coeff(w,m):
        a, p, s, vv = m, 0, w, []
        while a < 2*m:
            p += 1
            s = S.One/(s-floor(s))
            a = floor(s)
            if a < 2*m:
                vv.append(a)
        j = (p-1)//2
        v = [0,1,1] if p % 2 else [1, 0, vv[j]]
        for i in range(j-1,-1,-1):
            h = vv[i]
            v = [v[0]+h*v[2], v[2], 2*h*v[0]+v[1]+h**2*v[2]]
        return v
    def A334116(n):
        w = sqrt(n)
        m = floor(w)
        if w == m:
            return n
        else:
            x, y, z = coeff(w,m)
            if z % 2:
                x *= 2
            else:
                z //= 2
                y //= 2
            return (m+z)**2+x+(x*m+y)//z # Chai Wah Wu, Sep 30 2021, after Maxima code
Showing 1-8 of 8 results.