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.

User: Paul Weisenhorn

Paul Weisenhorn's wiki page.

Paul Weisenhorn has authored 86 sequences. Here are the ten most recent ones:

A346295 a(n) = Sum_{k=0..n} (2^k + 1) * (2^k + 2) / 2.

Original entry on oeis.org

3, 9, 24, 69, 222, 783, 2928, 11313, 44466, 176307, 702132, 2802357, 11197110, 44763831, 179006136, 715926201, 2863508154, 11453639355, 45813770940, 183253510845, 733010897598, 2932037298879, 11728136612544, 46912521284289, 187650034805442, 750600038558403
Offset: 0

Author

Paul Weisenhorn, Jul 13 2021

Keywords

Comments

All terms are multiples of 3.

Crossrefs

Cf. A028401 (first differences).

Programs

  • Maple
    a:= proc(n) option remember:
    if n=0 then 3 else (2^n+1)*(2^n+2)/2+procname(n-1) fi:
    end proc:
    seq(a(n), n=0..30);
  • Mathematica
    Accumulate @ Table[(2^k + 1)*(2^k + 2)/2, {k, 0, 25}] (* Amiram Eldar, Jul 27 2021 *)
    LinearRecurrence[{8,-21,22,-8},{3,9,24,69},30] (* Harvey P. Dale, Nov 21 2021 *)
  • PARI
    a(n)=sum(k=0, n, (2^k+1)*(2^k+2)/2); \\ Michel Marcus, Jul 16 2021

Formula

a(n) = (2^(n+1) + 4) * (2^(n+1) + 5) / 6 - 4 + n.
More generally: let f(n, b) be the triangular sum Sum_{k=0..n} (2^k+b) * (2^k+b+1) / 2.
f(n, b) = (2^(n+1) + 3*b + 1) * (2^(n+1) + 3*b + 2) / 6 - (b + 1)^2 + b*(b + 1)*n / 2.
G.f.: ((b^2+3*b+2)/2 - (3*b^2+8*b+4)*x + (4*b^2+8*b+3)*x^2) / ((4*x-1) * (2*x-1) * (x-1)^2).
E.g.f.: exp(x) * ((6*b+3)*exp(x) + 2*exp(3*x) + 3(b^2+b)*x/2 + (3*b^2-3*b-4) / 2) / 3.
Then b = -1 gives A006095, b = 0 gives A076024, b = 1 gives A346295, b = 2 gives A346375.
G.f.: 3*(5*x^2 - 5*x + 1) / ((4*x - 1) * (2*x - 1) * (x - 1)^2).
a(n) = 8*a(n-1) - 21*a(n-2) + 22*a(n-3) - 8*a(n-4) for n > 3.
This recurrence is valid for all sequences f(n,b).
E.g.f.: exp(x) * (9*exp(x) + 2*exp(3*x) + 3*x - 2) / 3. - Stefano Spezia, Aug 13 2021

A346375 a(n) = Sum_{k=0..n} (2^k + 2) * (2^k + 3) / 2.

Original entry on oeis.org

6, 16, 37, 92, 263, 858, 3069, 11584, 44995, 177350, 704201, 2806476, 11205327, 44780242, 179038933, 715991768, 2863639259, 11453901534, 45814295265, 183254559460, 733012994791, 2932041493226, 11728145001197, 46912538061552, 187650068359923, 750600105667318, 3002400087124729
Offset: 0

Author

Paul Weisenhorn, Jul 14 2021

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember:
         if n=0 then 6 else procname(n-1)+(2^n+3)*(2^n+2)/2 fi:
        end proc:
    seq(a(n), n=0..26);
  • Mathematica
    a[n_]:=Sum[(2^k+2)*(2^k+3)/2,{k,0,n}];Array[a,30,0] (* Giorgos Kalogeropoulos, Jul 27 2021 *)
  • PARI
    a(n) = sum(k=0, n, (2^k+2)*(2^k+3)/2); \\ Michel Marcus, Jul 28 2021

Formula

a(n) = Sum_{k=0..n} (2^k + 2) * (2^k + 3) / 2.
a(n) = (2^(n+1) + 7) * (2^(n+1) + 8)/6 - 9 + 3*n.
More generally: let f(n, b) = Sum_{k=0..n} (2^k + b) * (2^k + b + 1)/2 then f(n, b) = (2^(n+1) + 3*b + 1) * (2^(n+1) + 3*b + 2) / 6 - (b + 1)^2 + b*(b + 1)*n/2.
G.f.: ((b^2+3*b+2)/2 - (3*b^2+8*b+4)*x + (4*b^2+8*b+3)*x^2) / ((4*x-1) * (2*x-1) * (x-1)^2).
E.g.f.: exp(x)*((6*b+3)*exp(x) + 2*exp(3*x) + 3*(b^2+b)*x/2 +(3*b^2-3*b-4) / 2) / 3.
Then b = -1 gives A006095, b = 0 gives A076024, b = 1 gives A346295, b = 2 gives A346375.
a(n) = 8*a(n-1) - 21*a(n-2) + 22*a(n-3) - 8*a(n-4) with n > 3.
This recurrence is valid for all sequences f(n, b).
G.f.: (35*x^2 - 32*x + 6) / ((4*x - 1) * (2*x - 1) * (x - 1)^2).
E.g.f.: exp(x) * (1 + 15*exp(x) + 2*exp(3*x) + 9*x)/3. - Stefano Spezia, Aug 15 2021

A320773 Numbers (excluding squares) whose square root has a continued fraction with a period < 3.

Original entry on oeis.org

2, 3, 5, 6, 8, 10, 11, 12, 15, 17, 18, 20, 24, 26, 27, 30, 35, 37, 38, 39, 40, 42, 48, 50, 51, 56, 63, 65, 66, 68, 72, 80, 82, 83, 84, 87, 90, 99, 101, 102, 104, 105, 110, 120, 122, 123, 132, 143, 145, 146, 147, 148, 150, 152, 156, 168, 170, 171, 182, 195, 197, 198, 200
Offset: 1

Author

Paul Weisenhorn, Oct 21 2018

Keywords

Comments

The Heron sequence of every number a(n) has the following relationship: numerator(h(k))^2 - a(n)*denominator(h(k))^2 = 1 for k > 1.
The Heron sequence of every number a(n) has the following relationship with the continued fraction f(s) convergent to sqrt(a(n)): h(k) = f(2^k-1).
From Gerhard Kirchner, Jan 17 2020: (Start)
Numbers k = m^2 + r with m > 0 and 0 < r <= 2m such that r is a divisor of 2m.
Continued fraction: k = [m; 2m/r, 2m, 2m/r, 2m, ...].
The number of terms that are between m^2 and (m+1)^2 is equal to the number of divisors of 2m, which is A099777(m).
Proof see link. The Maxima code below demonstrates the divisor property. Note that there is no divisor of 2m between m and 2m.
(End)

Examples

			The continued fraction of sqrt(6) = 2 + 1/(2 + 1/(4 + 1/(2 + 1/(4 + 1/(2 + 1/(4 + ...)))))) = [2; 2, 4, 2, 4, 2, 4, ...] has repeating portion (2, 4) with period 2, so 6 is a term.
		

Programs

  • Maple
    Digits:=40: nr:=0:
    for z from 2 to 200 do
      test:=true: c:=sqrt(z):
      if (c=floor(c)) the test:=false: end if:
      while (test=true) do
        b[0]:=floor(c):
        r[0]:=c:
        for k from 1 to 2 do
          r[k]:=evalf(1/(r[k-1]-b[k-1])):
          b[k]:=floor(r[k]):
        end do:
        if (b[1]=2*b[0]) or (b[2]=2*b[0]) then nr:=nr+1: a[nr]:=z: printf("%4d",z): end if:
        test:=false:
      end do:
    end do:
  • Mathematica
    Select[Range[200], !IntegerQ[Sqrt[#]] && Length@ContinuedFraction[Sqrt[#]][[-1]]<3 &] (* Amiram Eldar, Nov 01 2018 *)
  • Maxima
    block([n: 2, m: 0, r: 0, k: 0, kmax: 10,v: ""],
      while kGerhard Kirchner, Jan 17 2020 */

Extensions

Edited by Jon E. Schoenfield, Oct 19 2019

A319750 a(n) is the denominator of the Heron sequence with h(0) = 3.

Original entry on oeis.org

1, 3, 33, 3927, 55602393, 11147016454528647, 448011292165037607943004375755833, 723685043824607606355691108666081531638582859833105061571146291527
Offset: 0

Author

Paul Weisenhorn, Sep 27 2018

Keywords

Comments

The numerators of the Heron sequence are in A319749.
There is the following relationship between the denominator of the Heron sequence and the denominator of the continued fraction A041018(n)/ A041019(n) convergent to sqrt(13).
n even: a(n) = A041019((5*2^n-5)/3).
n odd: a(n) = A041019((5*2^n-1)/3).
General: all numbers c(n) = A078370(n) = (2*n+1)^2 + 4 have the same relationship between the denominator of the Heron sequence and the denominator of the continued fraction convergent to 2*n+1.
sqrt(c(n)) has the continued fraction [2*n+1; n, 1, 1, n, 4*n+2].
hn(n)^2 - c(n)*hd(n)^2 = 4 for n > 1.

Examples

			A078370(2) = 29.
hd(0) = A041047(0) = 1, hd(1) = A041047(3) = 5,
hd(2) = A041047(5) = 135, hd(3) = A041047(13) = 38145.
		

Programs

  • Maple
    hn[0]:=3: hd[0]:=1:
    for n from 1 to 6 do
      hn[n]:=(hn[n-1]^2+13*hd[n-1]^2)/2:
      hd[n]:=hn[n-1]*hd[n-1]:
      printf("%5d%40d%40d\n", n, hn[n], hd[n]):
    end do:
  • Python
    def aupton(nn):
        hn, hd, alst = 3, 1, [1]
        for n in range(nn):
            hn, hd = (hn**2 + 13*hd**2)//2, hn*hd
            alst.append(hd)
        return alst
    print(aupton(7)) # Michael S. Branicky, Mar 15 2022

Formula

h(n) = hn(n)/hd(n), hn(0) = 3, hd(0) = 1.
hn(n+1) = (hn(n)^2 + 13*hd(n)^2)/2.
hd(n+1) = hn(n)*hd(n).
A041018(n) = A010122(n)*A041018(n-1) + A041018(n-2).
A041019(n) = A010122(n)*A041019(n-1) + A041019(n-2).
a(0) = 1, a(1) = 3 and a(n) = 2*T(2^(n-2), 11/2)*a(n-1) for n >= 2, where T(n,x) denotes the n-th Chebyshev polynomial of the first kind. - Peter Bala, Mar 16 2022

Extensions

a(5) corrected and terms a(6) and a(7) added by Peter Bala, Mar 15 2022

A319749 a(n) is the numerator of the Heron sequence with h(0)=3.

Original entry on oeis.org

3, 11, 119, 14159, 200477279, 40191139395243839, 1615327685887921300502934267457919, 2609283532796026943395592527806764363779539144932833602430435810559
Offset: 0

Author

Paul Weisenhorn, Sep 27 2018

Keywords

Comments

The denominator of the Heron sequence is in A319750.
The following relationship holds between the numerator of the Heron sequence and the numerator of the continued fraction A041018(n)/A041019(n) convergent to sqrt(13).
n even: a(n)=A041018((5*2^n-5)/3).
n odd: a(n)=A041018((5*2^n-1)/3).
More generally, all numbers c(n)=A078370(n)=(2n+1)^2+4 have the same relationship between the numerator of the Heron sequence and the numerator of the continued fraction convergent to 2n+1.
sqrt(c(n)) has the continued fraction 2n+1; n,1,1,n,4n+2.
hn(n)^2-c(n)*hd(n)^2=4 for n>1.
From Peter Bala, Mar 29 2022: (Start)
Applying Heron's method (sometimes called the Babylonian method) to approximate the square root of the function x^2 + 4, starting with a guess equal to x, produces the sequence of rational functions [x, 2*T(1,(x^2+2)/2)/x, 2*T(2,(x^2+2)/2)/( 2*x*T(1,(x^2+2)/2) ), 2*T(4,(x^2+2)/2)/( 4*x*T(1,(x^2+2)/2)*T(2,(x^2+2)/2) ), 2*T(8,(x^2+2)/2)/( 8*x*T(1,(x^2+2)/2)*T(2,(x^2+2)/2)*T(4,(x^2+2)/2) ), ...], where T(n,x) denotes the n-th Chebyshev polynomial of the first kind. The present sequence is the case x = 3. Cf. A001566 and A058635 (case x = 1), A081459 and A081460 (essentially the case x = 4). (End)

Examples

			A078370(2)=29.
hn(0)=A041046(0)=5; hn(1)=A041046(3)=27; hn(2)=A041046(5)=727;
hn(3)=A041046(13)=528527.
		

Crossrefs

2*T(2^n,x/2) modulo differences of offset: A001566 (x = 3 and x = 7), A003010 (x = 4), A003487 (x = 5), A003423 (x = 6), A346625 (x = 8), A135927 (x = 10), A228933 (x = 18).

Programs

  • Maple
    hn[0]:=3:  hd[0]:=1:
    for n from 1 to 6 do
    hn[n]:=(hn[n-1]^2+13*hd[n-1]^2)/2:
    hd[n]:=hn[n-1]*hd[n-1]:
       printf("%5d%40d%40d\n", n, hn[n], hd[n]):
    end do:
    #alternative program
    a := n -> if n = 0 then 3 else simplify( 2*ChebyshevT(2^(n-1), 11/2) ) end if:
    seq(a(n), n = 0..7); # Peter Bala, Mar 16 2022
  • Python
    def aupton(nn):
        hn, hd, alst = 3, 1, [3]
        for n in range(nn):
            hn, hd = (hn**2 + 13*hd**2)//2, hn*hd
            alst.append(hn)
        return alst
    print(aupton(7)) # Michael S. Branicky, Mar 16 2022

Formula

h(n) = hn(n)/hd(n); hn(0)=3; hd(0)=1.
hn(n+1) = (hn(n)^2+13*hd(n)^2)/2.
hd(n+1) = hn(n)*hd(n).
A041018(n) = A010122(n)*A041018(n-1) + A041018(n-2).
A041019(n) = A010122(n)*A041019(n-1) + A041019(n-2).
From Peter Bala, Mar 16 2022: (Start)
a(n) = 2*T(2^(n-1),11/2) for n >= 1, where T(n,x) denotes the n-th Chebyshev polynomial of the first kind.
a(n) = 2*T(2^n, 3*sqrt(-1)/2) for n >= 2.
a(n) = ((11 + 3*sqrt(13))/2)^(2^(n-1)) + ((11 - 3*sqrt(13))/2)^(2^(n-1)) for n >= 1.
a(n+1) = a(n)^2 - 2 for n >= 1.
a(n) = A057076(2^(n-1)) for n >= 1.
Engel expansion of (1/6)*(13 - 3*sqrt(13)); that is, (1/6)*(13 - 3*sqrt(13)) = 1/3 + 1/(3*11) + 1/(3*11*119) + .... (Define L(n) = (1/2)*(n - sqrt(n^2 - 4)) for n >= 2 and show L(n) = 1/n + L(n^2-2)/n. Iterate this relation with n = 11. See also Liardet and Stambul, Section 4.)
sqrt(13) = 6*Product_{n >= 0} (1 - 1/a(n)).
sqrt(13) = (9/5)*Product_{n >= 0} (1 + 2/a(n)). See A001566. (End)

Extensions

a(6) and a(7) added by Peter Bala, Mar 16 2022

A201632 If the sum of the squares of 4 consecutive numbers is a triangular number t(u), then a(n) is its index u.

Original entry on oeis.org

35, 83, 1203, 2835, 40883, 96323, 1388835, 3272163, 47179523, 111157235, 1602714963, 3776073843, 54445129235, 128275353443, 1849531679043, 4357585943235, 62829631958243, 148029646716563, 2134357954901235, 5028650402419923
Offset: 1

Author

Paul Weisenhorn, Jan 09 2013

Keywords

Comments

Sum_{(e(n)+j)^2,j=0..3} = a(n)*(a(n)+1)/2=t(a(n)) give the Pell equation c(n)^2 - 32*d(n)^2 = 41 with 2*a(n) + 1 = c(n) and e(n) + 1.5 = d(n). e(n) = A201633(n).
In general, for the sum of the squares of k consecutive numbers, one get an analog sequence with k in {4, 5, 6, 7, 11, 15, 17, 19, 23,...}. It gives the Pell equation c(n)^2 - 8k*d(n)^2 = 4*binomial((k+1),3) + 1 with 2*a(n) + 1 = c(n) and e(n) + (k-1)/2 = d(n).

Examples

			For n=2: a(2)=83; t(83)=83*84/2=3486.
A201633(2)=e(2)=28; 28^2+29^2+30^2+31^2=3486.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,34,-34,-1,1},{35,83,1203,2835,40883},30] (* Harvey P. Dale, Dec 10 2024 *)

Formula

G.f.: (35*x+48*x^2-70*x^3+3*x^5)/((1-x)*(1-34*x^2+x^4)).
a(n+4) = 34*a(n+2) - a(n) + 16.
a(n+5) = a(n+4) + 34*a(n+3) - 34*a(n+2) - a(n+1) + a(n).
eigenvalues ej: {1,(3+2r),-(3+2r),(3-2r),-(3-2r)}.
a(n+1) = (k1*e1 + k2*e2^n + k3*e3^n + k4*e4^n + k5*e5^n)/4 for k1=-2; k2=50+35r; k3=21+15r; k4=50-35r; k5=21-15r, where r = sqrt(2).

Extensions

Corrected by R. J. Mathar, Jun 14 2016

A187789 a(n) is the start position for a Sankt-Petrus-game with n white and n black stones and the least step A187788(n).

Original entry on oeis.org

2, 3, 2, 8, 5, 5, 2, 7, 1, 17, 15, 4, 8, 1, 2, 30, 26, 11, 35, 7, 26, 27, 23, 44, 24, 30, 6, 39, 53, 18, 2, 15, 61, 40, 30, 68, 44, 32, 78, 29, 81, 15, 19, 76, 51, 67, 40, 19, 53, 42, 53, 3, 74, 103, 73, 35, 105, 78, 110, 105, 76, 61, 2, 5, 48, 128, 82, 36, 37, 63, 88, 87, 31, 123, 93, 126, 2, 1, 156, 89, 33, 160, 90, 135, 124, 136, 145, 79, 42, 26, 104, 94, 67, 44, 186, 30, 133, 137, 40, 118
Offset: 1

Author

Paul Weisenhorn, Jan 06 2013

Keywords

Comments

Beginning at the position a(n) with the least step A187788(n) (n-1) white stones were eliminated; then starting at the position 1 of the last white stone, n black stones were eliminated.

Examples

			n=8; WWBBWBBWWBBWWBWB; step=A187788(8)=3; start=a(8)=7; elimination: white stones: {9,12,15,2,5,8,13}, black stones: {4,10,16,6,14,7,3,11}.
		

References

  • W. Ahrens, Das Josephusspiel, Archiv für Kulturgeschichte, Jg 11(1913), 129-151.

Crossrefs

Programs

  • Maple
    stone:=proc(n1)
    local n,j,k,h,z,zp: global a,m,s:
    n:=2*n1: m:=m+1:
    for j from 1 to n-1 do z[j]:=z[j]+1: end do:
    z[n]:=1: zp:=1:
    for j from 1 to n1 do
    for k from 1 to (s-2) do  zp:=z[zp]: end do:
      h:=z[zp]: z[zp]:=z[z[zp]]: zp:=z[zp]:
    end do:
    if (h=1) then a[n1]:=1: else a[n1]:=n+2-h: end if:
    end proc:
    m:=0: s:=1:
    while (m < 100) do
    s1:=s: s:=s+1: c:=1:
    for p from 2 to 100 by 2 do  p1:=p-1: p2:=p+1:
      b:=(c+s1) mod p +1:
      if (b=1) and (a[p1]=0) then stone(p1): end if:
      c:=(b+s1) mod p2 +1:
      if (c=1) and (a[p]=0) then stone(p): end if:
    end do:
    end do:

A187788 a(n) is the least step for the Sankt-Petrus-game with n white and n black stones.

Original entry on oeis.org

2, 5, 2, 4, 3, 11, 2, 3, 8, 16, 4, 21, 6, 5, 2, 11, 20, 34, 8, 15, 10, 7, 13, 11, 13, 45, 18, 23, 8, 3, 2, 25, 75, 42, 13, 5, 23, 13, 50, 16, 18, 89, 38, 8, 39, 30, 29, 38, 7, 45, 23, 137, 46, 63, 17, 48, 5, 46, 34, 140, 33, 39, 2, 28, 29, 79, 33, 48, 3, 10, 46, 120, 6, 37, 17, 8, 44, 15, 160, 20, 35, 144, 104, 179, 153, 24, 8, 265, 19, 9, 62, 7, 139, 19, 44, 93, 182, 27, 158, 185
Offset: 1

Author

Paul Weisenhorn, Jan 06 2013

Keywords

Comments

Beginning at the position A187789(n) with step a(n), (n-1) white stones were eliminated; then from the position 1 of the last white stone, n black stones were eliminated.

Examples

			n=4; WBWWBBWB; startposition=A187789(4)=8; least step=a(4)=4; elimination: white stones: {3,7,4}; black stones: {6,5,8,2}.
		

References

  • W. Ahrens, Das Josephusspiel, Archiv für Kulturgeschichte, Jg 11(1913), 129-151.

Crossrefs

First column in A321781.

Programs

  • Maple
    s:=1: M:={}:
    for n from 1 to 100 do M:=M union {n}:
    while (M <> {}) do
      s1:=s: s:=s+1: f[1]:=1:
      for n from 2 to 101 do  n1:=n-1:
        f[n]:=(f[n1]+s1) mod n +1:
        if (f[n]=1) and (n1 in M) then
          a[n1]:=s: M:=M minus {n1}:
        end if:
      end do:
    end do:

A201633 Numbers k such that Sum_{j=0..3} (k + j)^2 is a triangular number.

Original entry on oeis.org

11, 28, 424, 1001, 14453, 34054, 491026, 1156883, 16680479, 39300016, 566645308, 1335043709, 19249260041, 45352186138, 653908196134, 1540639285031, 22213629408563, 52336383504964, 754609491695056, 1777896399883793, 25634509088223389, 60396141212544046
Offset: 1

Author

Paul Weisenhorn, Jan 09 2013

Keywords

Comments

Sum_{j=0..3} (a(n)+j)^2 = u(n)*(u(n)+1)/2 = t(u(n)) with A201632(n) = u(n) give the Pell equation c(n)^2 - 32*d(n)^2 = 41. 2*u(n)+1 = c(n) and a(n) + 1.5 = d(n).
Also integers k such that k^2 + (k+1)^2 + (k+2)^2 + (k+3)^2 is equal to a hexagonal number. - Colin Barker, Dec 21 2014

Examples

			For n=3: a(3)=424; 424^2+425^2+426^2+427^2=724206.
u(3)=A201632(3)=1203; t(1203)=1203*1204/2=724206.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,34,-34,-1,1},{11,28,424,1001,14453},30] (* Harvey P. Dale, Apr 16 2013 *)
  • PARI
    Vec(x*(x^4+x^3-22*x^2-17*x-11)/((x-1)*(x^2-6*x+1)*(x^2+6*x+1)) + O(x^30)) \\ Colin Barker, Dec 21 2014
    
  • Python
    from functools import cache
    @cache
    def a(n):
        if n < 6: return [11, 28, 424, 1001, 14453][n-1]
        return a(n-1) + 34*a(n-2) - 34*a(n-3) - a(n-4) + a(n-5)
    print([a(n) for n in range(1, 23)]) # Michael S. Branicky, Nov 28 2021

Formula

G.f.: (11*x+17*x^2+22*x^3-x^4-x^5)/((1-x)*(1-34*x^2+x^4)). [corrected by Georg Fischer, May 11 2019]
a(n+4) = 34*a(n-2) - a(n-4) + 48; r=sqrt(2).
a(n+5) = a(n+4) + 34*a(n+3) - 34*a(n+2) - a(n+1) + a(n).
Eigenvalues ej: {1,(3+2r),-(3+2r),(3-2*r),-(3-2*r)}.
a(n+1) = (k1*e1+k2*e2^n+k3*e3^n+k4*e4^n+k5*e5^n)/16 for k1=-24, k2=70+50r, k3=30+21r, k4=70-50r, k5=30-21r.

Extensions

More terms from Colin Barker, Dec 21 2014

A218395 Numbers whose square is the sum of the squares of 11 consecutive integers.

Original entry on oeis.org

11, 77, 143, 1529, 2849, 30503, 56837, 608531, 1133891, 12140117, 22620983, 242193809, 451285769, 4831736063, 9003094397, 96392527451, 179610602171, 1923018812957, 3583208949023, 38363983731689, 71484568378289, 765356655820823, 1426108158616757
Offset: 0

Author

Paul Weisenhorn, Oct 28 2012

Keywords

Comments

a(n)^2 = Sum_{j=0..10} (x(n)+j)^2 = 11*(x(n)+5)^2 + 110 and b(n) = x(n)+5 give the Pell equation a(n)^2 - 11*b(n)^2 = 110 with the 2 fundamental solutions (11; 1) and (77; 23) and the solution (10; 3) for the unit form. A198949(n+1) = b(n); A106521(n) = x(n) and x(0) = -4.
General: If the sum of the squares of c neighboring numbers is a square with c = 3*k^2-1 and 1 <= k, then a(n)^2 = Sum_{j=0..c-1} (x(n)+j)^2 and b(n) = 2*x(n)+c-1 give the Pell equation a(n)^2 - c*(b(n)/2)^2 = binomial(c+1,3)/2. a(n) = 2*e1*a(n-k) - a(n-2*k); b(n) = 2*e1*b(n-k) - b(n-2*k); a(n) = e1*a(n-k) + c*e2*b(n-k); b(n) = e2*a(n-k) + e1*b(n-k) with the solution (e1; e2) for the unit form.

Examples

			For n=6, Sum_{z=17132..17142} z^2 = 3230444569;
a(6) = sqrt(3230444569) = 56837;
b(6) = sqrt((a(6)^2-110)/11) = 17137; x(6) = b(6)-5 = 17132.
		

Crossrefs

c=2: A001653(n+1) = a(n); A002315(n) = b(n); A001652(n) = x(n).
Cf. A001032 (11 is a term of that sequence), A198947.

Programs

  • Maple
    s:=0: n:=-1:
    for j from -5 to 5 do s:=s+j^2: end do:
    for z from -4 to 100000 do
      s:=s-(z-1)^2+(z+10)^2: r:=sqrt(s):
      if (r=floor(r)) then
        n:=n+1: a(n):=r: x(n):=z:
        b(n):=sqrt((s-110)/11):
        print(n,a(n),b(n),x(n)):
      end if:
    end do:
  • Mathematica
    LinearRecurrence[{0,20,0,-1},{11,77,143,1529},30] (* Harvey P. Dale, Aug 15 2022 *)

Formula

a(n) = 20*a(n-2) - a(n-4); b(n) = 20*b(n-2) - b(n-4);
a(n) = 10*a(n-2) + 33*b(n-2); b(n) = 3*a(n-2) + 10*b(n-2).
a(n) = a(n-1) + 20*a(n-2) - 20*a(n-3) - a(n-4) + a(n-5).
G.f.: 11 * (1-x)*(1+8*x+x^2) / (1 - 20*x^2 + x^4).
With r=sqrt(11); s=10+3*r; t=10-3*r:
a(2*n) = ((11+r)*s^n + (11-r)*t^n)/2.
a(2*n+1) = ((77+23*r) * s^n + (77-23*r)*t^n)/2.
a(n) = 11 * A198947(n+1). - Bill McEachen, Dec 01 2022