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.

Previous Showing 11-20 of 29 results. Next

A081231 Let p = n-th prime of the form 4k+3, take smallest solution (x,y) to the Pellian equation x^2 - p*y^2 = 1 with x and y >= 1; sequence gives value of x.

Original entry on oeis.org

2, 8, 10, 170, 24, 1520, 3482, 48, 530, 48842, 3480, 80, 82, 227528, 962, 4730624, 10610, 77563250, 1728148040, 64080026, 168, 4190210, 8994000, 16266196520, 278354373650, 224, 226, 6195120, 3674890, 139128, 115974983600, 138274082
Offset: 1

Views

Author

N. J. A. Sloane, Apr 18 2003

Keywords

Examples

			For n=3, p = 11, x=10, y=3 since we have 10^2 = 11*3^2 + 1, so a(3) = 10.
		

Crossrefs

Values of y are in A082394. Equals A002350(p). Cf. A082393.

Programs

  • Mathematica
    PellSolve[(m_Integer)?Positive] := Module[{cf, n, s}, cf = ContinuedFraction[ Sqrt[m]]; n = Length[ Last[cf]]; If[ OddQ[n], n = 2*n]; s = FromContinuedFraction[ ContinuedFraction[ Sqrt[m], n]]; {Numerator[s], Denominator[s]}]; Transpose[ PellSolve /@ Select[ Prime[ Range[72]], Mod[ #, 4] == 3 &]][[1]] (* Robert G. Wilson v, Sep 02 2004 *)

Extensions

More terms from Robert G. Wilson v, Sep 02 2004

A081232 Let p = n-th prime of the form 4k+1, take smallest solution (x,y) to the Pellian equation x^2 - p*y^2 = 1 with x and y >= 1; sequence gives value of x.

Original entry on oeis.org

9, 649, 33, 9801, 73, 2049, 66249, 1766319049, 2281249, 500001, 62809633, 201, 158070671986249, 1204353, 6083073, 25801741449, 46698728731849, 2499849, 2469645423824185801, 6224323426849, 393, 5848201, 1072400673
Offset: 1

Views

Author

N. J. A. Sloane, Apr 18 2003

Keywords

Examples

			For n = 1, p = 5, x=9, y=4 since 9^2 = 5*4^2 + 1, so a(1) = 9.
		

Crossrefs

Values of y are in A082393. Cf. A082394, A081233. Equals A002350(p).

Programs

  • Mathematica
    PellSolve[(m_Integer)?Positive] := Module[{cof, n, s}, cof = ContinuedFraction[Sqrt[m]]; n = Length[Last[cof]]; If[ OddQ[n], n = 2*n]; s = FromContinuedFraction[ContinuedFraction[Sqrt[m], n]]; {Numerator[s], Denominator[s]}]; First /@ PellSolve /@ Select[Prime@Range@54, Mod[ #, 4] == 1 &] (* Robert G. Wilson v *)

Extensions

More terms from Robert G. Wilson v, Feb 28 2006

A298211 Smallest n such that A001353(a(n)) == 0 (mod n), i.e., x=A001075(a(n)) and y=A001353(a(n)) is the fundamental solution of the Pell equation x^2 - 3*(n*y)^2 = 1.

Original entry on oeis.org

1, 2, 3, 2, 3, 6, 4, 4, 9, 6, 5, 6, 6, 4, 3, 8, 9, 18, 5, 6, 12, 10, 11, 12, 15, 6, 27, 4, 15, 6, 16, 16, 15, 18, 12, 18, 18, 10, 6, 12, 7, 12, 11, 10, 9, 22, 23, 24, 28, 30, 9, 6, 9, 54, 15, 4, 15, 30, 29, 6, 30, 16, 36, 32, 6, 30, 17, 18, 33, 12, 7, 36, 18, 18, 15
Offset: 1

Views

Author

A.H.M. Smeets, Jan 15 2018

Keywords

Comments

The fundamental solution of the Pell equation x^2 - 3*(n*y)^2 = 1 is the smallest solution of x^2 - 3*y^2 = 1 satisfying y == 0 (mod n).
For primes p > 2, 2^p-1 is a Mersenne prime if and only if a(2^p-1) = 2^(p-1). For example, a(7) = 4, a(31) = 16, a(127) = 64, but a(2047) = 495 < 1024. - Jianing Song, Jun 02 2022

References

  • Michael J. Jacobson, Jr. and Hugh C. Williams, Solving the Pell Equation, Springer, 2009, pages 1-17.

Crossrefs

Programs

  • Mathematica
    With[{s = Array[ChebyshevU[-1 + #, 2] &, 75]}, Table[FirstPosition[s, k_ /; Divisible[k, n]][[1]], {n, Length@ s}]] (* Michael De Vlieger, Jan 15 2018, after Eric W. Weisstein at A001353 *)
  • Python
    xf, yf = 2, 1
    x, n = 2*xf, 0
    while n < 20000:
        n = n+1
        y1, y0, i = 0, yf, 1
        while y0%n != 0:
            y1, y0, i = y0, x*y0-y1, i+1
        print(n, i)

Formula

a(n) <= n.
a(A038754(n)) = A038754(n).
A001075(a(n)) = A002350(3*n^2).
A001353(a(n)) = A002349(3*n^2).
if n | m then a(n) | a(m).
a(3^m) = 3^m and a(2*3^m) = 2*3^m for m>=0.
In general: if p is prime and p == 3 (mod 4) then: a(n) = n iff n = p^m or n = 2*p^m, for m>=0.
a(k*A005385(n)) = a(k)*A005384(n) for n>2 and k > 0 (conjectured).
a(p) | (p-A091338(p)) for p is an odd prime. - A.H.M. Smeets, Aug 02 2018
From Jianing Song, Jun 02 2022: (Start)
a(p) | (p-A091338(p))/2 for p is an odd prime > 3.
a(p^e) = a(p)*p^(e-r) for e >= r, where r is the largest number such that a(p^r) = a(p). r can be greater than 1, for p = 2, 103, 2297860813 (Cf. A238490).
If gcd(m,n) = 1, then a(m*n) = lcm(a(m),a(n)). (End)

A379815 a(n) is the smallest integer k > n such that sqrt(1/n + 1/k) is a rational number; or 0 if no such k exists.

Original entry on oeis.org

0, 16, 9, 0, 20, 12, 441, 64, 16, 90, 1089, 36, 4212, 98, 225, 0, 272, 144, 549081, 25, 567, 2156, 13225, 48, 144, 650, 81, 98, 142100, 150, 71622369, 256, 363, 578, 1225, 64, 1332, 684, 468, 360, 41984, 252, 521345889, 198, 180, 559682, 108241, 144, 63, 400, 127449, 117, 1755572, 108, 2420, 392, 4275, 568458
Offset: 1

Views

Author

Felix Huber, Feb 07 2025

Keywords

Comments

a(1) = a(4) = a(16) = 0. Proof: See Huber link.
k > n exists for n > 16.

Examples

			a(3) = 9 because sqrt(1/3 + 1/4) = sqrt(7/12) is irrational, sqrt(1/3 + 1/5) = sqrt(8/15) is irrational, sqrt(1/3 + 1/6) = sqrt(1/2) is irrational, sqrt(1/3 + 1/7) = sqrt(10/21) is irrational, sqrt(1/3 + 1/8) = sqrt(11/24) is irrational, but sqrt(1/3 + 1/9) = sqrt(4/9) = 2/3 is rational.
		

Crossrefs

Programs

  • Maple
    A379815:=proc(n)
        local k;
        if n=1 or n=4 or n=16 then
            return 0
        else
            for k from n+1 do
                if type(sqrt(1/n+1/k),rational) then
                    return k
                fi
            od
        fi;
    end proc;
    seq(A379815(n),n=1..58);
  • PARI
    a(n) = if ((n==1) || (n==4) || (n==16), return(0)); my(k=n+1); while (!issquare(1/n + 1/k), k++); k; \\ Michel Marcus, Feb 08 2025

Formula

a(n) <= n*A002350(n)^2 - n if n is not a square; a(m^2) <= A076600(m)^2. - Jinyuan Wang, Feb 11 2025

A379816 a(n) is the smallest integer k > n such that sqrt(1/n - 1/k) is a rational number; or 0 if no such k exists.

Original entry on oeis.org

0, 4, 12, 0, 25, 18, 448, 16, 12, 100, 1100, 18, 4225, 112, 240, 18, 289, 36, 549100, 25, 588, 2178, 13248, 72, 45, 676, 108, 126, 142129, 180, 71622400, 64, 396, 612, 1260, 48, 1369, 722, 507, 400, 42025, 294, 521345932, 242, 225, 559728, 108288, 72, 112, 100, 127500, 169, 1755625, 162, 2475, 448, 4332, 568516, 16573100, 150
Offset: 1

Views

Author

Felix Huber, Feb 07 2025

Keywords

Comments

a(1) = a(4) = 0. Proof: See Huber link.
k > n exists for n > 4.
Continues a(61) <= 53872731025, a(62) = 1984, a(63) = 112, a(64) = 72, a(65) = 4225, a(66) = 2178, a(67) <= 159831244588, a(68) = 1156, a(69) = 268272, a(70) = 8820, a(71) <= 859838400, a(72) = 144, a(73) <= 83265625, a(74) = 136900, a(75) = 300, a(76) = 6498, a(77) = 13552, a(78) = 2106, a(79) = 505600, a(80) = 100, a(81) = 108, a(82) = 6724, a(83) = 558092, a(84) = 147, a(85) = 12145225, a(86) = 447458, a(87) = 68208, a(88) = 8712, a(89) = 22250089, a(90) = 100, a(91) = 225450316, a(92)=1150, a(93) = 565068, a(97) <= 3046267249, a(101) = 10201, a(103) <= 5332206050752, a(107) = 99022508. - R. J. Mathar, Feb 21 2025
For nonsquare n, solutions k (not necessarily the smallest ones) are given by k= n*A002350(n)^2 such that 1/n-1/k= (A002349(n)/A002350(n))^2. - R. J. Mathar, Feb 25 2025
For n=p^2, squared odd primes, solutions k (not necessarily the smallest) are constructed by k=p*(p+1)^2/4 such that 1/n -1/k = 1/p^2-1/k = [(p-1)/(p*(p+1))]^2 is a rational square. For other perfect squares n, start from such a solution for a prime factor p|n, n=(p*f)^2, and multiply the 3 terms of both sides of that solution with 1/f^2 to find a solution for n. - R. J. Mathar, Feb 25 2025

Examples

			a(16) = 18 because sqrt(1/16 - 1/17) = sqrt(1/272) is irrational but sqrt(1/16 - 1/18) = sqrt(1/144) = 1/12 is rational.
		

Crossrefs

Programs

  • Maple
    A379816:=proc(n)
        local k;
        if n=1 or n=4 then
            return 0
        else
            for k from n+1 do
                if type(sqrt(1/n-1/k),rational) then
                    return k
                fi
            od
        fi;
    end proc;
    seq(A379816(n),n=1..58);
  • PARI
    a(n) = if ((n==1) || (n==4), return(0)); my(k=n+1); while (!issquare(1/n - 1/k), k++); k; \\ Michel Marcus, Feb 08 2025

Extensions

Terms a(59-60) from R. J. Mathar, Feb 12 2025

A033319 Incrementally largest values of minimal y satisfying Pell equation x^2-Dy^2=1.

Original entry on oeis.org

0, 2, 4, 6, 180, 1820, 3588, 9100, 226153980, 15140424455100, 183567298683461940, 9562401173878027020, 42094239791738433660, 1238789998647218582160, 189073995951839020880499780706260
Offset: 1

Views

Author

Keywords

Comments

Records in A033317 (or A002349).

Crossrefs

Programs

  • Mathematica
    PellSolve[(m_Integer)?Positive] := Module[{cf, n, s}, cf = ContinuedFraction[Sqrt[m]]; n = Length[Last[cf]]; If[n == 0, Return[{}]]; If[OddQ[n], n = 2 n]; s = FromContinuedFraction[ ContinuedFraction[ Sqrt[m], n]]; {Numerator[s], Denominator[s]}];
    yy = DeleteCases[PellSolve /@ Range[10^5], {}][[All, 2]];
    Reap[Module[{y, record = 0}, Sow[0]; For[i = 1, i <= Length@yy, i++, y = yy[[i]]; If[y > record, record = y; Sow[y]]]]][[2, 1]] (* Jean-François Alcover, Nov 21 2020, after N. J. A. Sloane in A002350 *)

A298212 Smallest n such that A060645(a(n)) = 0 (mod n), i.e., x=A023039(a(n)) and y=A060645(a(n)) is the fundamental solution of the Pell equation x^2 - 5*(n*y)^2 = 1.

Original entry on oeis.org

1, 1, 2, 1, 5, 2, 4, 2, 2, 5, 5, 2, 7, 4, 10, 4, 3, 2, 3, 5, 4, 5, 4, 2, 25, 7, 6, 4, 7, 10, 5, 8, 10, 3, 20, 2, 19, 3, 14, 10, 10, 4, 22, 5, 10, 4, 8, 4, 28, 25, 6, 7, 9, 6, 5, 4, 6, 7, 29, 10, 5, 5, 4, 16, 35, 10, 34, 3, 4, 20, 35, 2, 37, 19, 50
Offset: 1

Views

Author

A.H.M. Smeets, Jan 15 2018

Keywords

Comments

The fundamental solution of the Pell equation x^2 - 5*(n*y)^2 = 1, is the smallest solution of x^2 - 5*y^2 = 1 satisfying y = 0 (mod n).

References

  • Michael J. Jacobson, Jr. and Hugh C. Williams, Solving the Pell Equation, Springer, 2009, pages 1-17.

Crossrefs

Programs

  • Mathematica
    b[n_] := b[n] = Switch[n, 0, 0, 1, 4, _, 18 b[n - 1] - b[n - 2]];
    a[n_] := For[k = 1, True, k++, If[Mod[b[k], n] == 0, Return[k]]];
    a /@ Range[100] (* Jean-François Alcover, Nov 16 2019 *)
  • Python
    xf, yf = 9, 4
    x, n = 2*xf, 0
    while n < 20000:
        n = n+1
        y1, y0, i = 0, yf, 1
        while y0%n != 0:
            y1, y0, i = y0, x*y0-y1, i+1
        print(n, i)

Formula

a(n) <= n.
a(A000351(n)) = A000351(n).
A023039(a(n)) = A002350(5*n^2).
A060645(a(n)) = A002349(5*n^2).
if n | m then a(n) | a(m).
a(5^m) = 5^m for m>=0.
In general: if p is prime and p = 1 (mod 4) then: a(n) = n iff n = p^m, for m>=0.

A074076 One-sixth of the area of some primitive Heronian triangles with a distance of 2n+1 between the median and altitude points on the longest side.

Original entry on oeis.org

60, 4620, 2024, 5984, 11480, 22960, 41580, 8096, 45920, 521640, 226884, 392920, 438944, 803320, 6725544, 207900, 37966500, 1544620, 6846840, 2295200, 2785484, 9009000, 4016600, 188375200, 3383500, 149240, 5738000, 875124, 12013456, 8848840
Offset: 1

Views

Author

Lekraj Beedassy, Aug 28 2002

Keywords

Comments

With N=2n+1, such a triangle has sides N*u +/- M, 2*M*u (the latter being cut into M*u +/- N by the corresponding altitude) and inradius M*(N - M)*v. The first entry, in particular, is associated with sequence A023039.

Crossrefs

Programs

  • Maple
    A033313 := proc(Dcap) local c,i,fr,nu,de ; if issqr(Dcap) then -1; else c := numtheory[cfrac](sqrt(Dcap)) ; for i from 1 do try fr := numtheory[nthconver](c,i) ; nu := numer(fr) ; de := denom(fr) ; if nu^2-Dcap*de^2=1 then RETURN(nu) ; fi; catch: RETURN(-1) ; end try; od: fi: end:
    A074076 := proc(n) local Dmin,xmin,Dcap ; Dmin := -1; xmin := -1; mmin := -1; ymin := -1; for m from 1 to n do Dcap := (2*n+1+2*m)*(2*n+1-2*m) ; x := A033313(Dcap) ; if xmin = -1 or (x >0 and xA074076(n),n=1..80) ; # R. J. Mathar, Sep 21 2009

Formula

a(n) = M(n)*D(n)*u(n)*v(n)/6, where (u, v) is the fundamental solution to x^2 - D*y^2 = 1, with M = 2*A074075(n); D = A074074(n) = N^2 - M^2.

Extensions

Removed assertion that these are the minimum areas - R. J. Mathar, Sep 21 2009

A128972 n^3 - 1 divided by its largest cube divisor.

Original entry on oeis.org

7, 26, 63, 124, 215, 342, 511, 91, 37, 1330, 1727, 2196, 2743, 3374, 4095, 614, 17, 254, 7999, 9260, 10647, 12166, 13823, 1953, 17575, 19682, 813, 24388, 26999, 29790, 32767, 4492, 39303, 42874, 46655, 1876, 54871, 59318, 63999, 8615, 74087, 79506
Offset: 2

Views

Author

Jonathan Vos Post, Apr 28 2007

Keywords

Comments

In other words, cubefree part of n^3-1, or cubefree kernel of n^3-1. Cube analog of A068310.

Examples

			a(9) = (9^3-1)/8 = (2^3 * 7 * 13)/(2^3) = 728/8 = 91.
a(10) = (10^3-1)/27 = (3^3 * 37)/(3^3) = 999/27 = 37.
a(18) = (18^3-1)/343 = (7^3 * 17)/(7^3) = 5831/343 = 17.
		

Crossrefs

Programs

  • Maple
    a:= n -> mul(f[1]^(f[2] mod 3), f = ifactors(n^3-1)[2]):
    seq(a(n),n=2..100); # Robert Israel, Sep 24 2014

Formula

a(n) = A062378(A068601(n)) = A062378(n^3-1).

Extensions

More terms from Carl R. White, Nov 09 2010

A094680 a(n+1) = 4*a(n)^3 - 3*a(n), with a(0) = 2.

Original entry on oeis.org

2, 26, 70226, 1385331749802026, 10634604778476758291777057017318241822792488226
Offset: 0

Views

Author

Jose Eduardo Blazek, Jun 07 2004

Keywords

Comments

Smallest positive integer x satisfying the Pell equation x^2 - 3^(2*n-3) * y^2 = 1. - A.H.M. Smeets, Sep 29 2017
Term a(5) has 139 decimal digits and a(6) has 417 decimal digits. - Andrew Howroyd, Feb 25 2018

Crossrefs

Programs

  • Mathematica
    NestList[4 #^3 - 3 # &, 2, 5] (* Michael De Vlieger, Oct 02 2017 *)
  • PARI
    a(n) = if (n==0, 2, 4*a(n-1)^3 - 3*a(n-1)); \\ Michel Marcus, Oct 03 2017
    
  • PARI
    a(n) = polchebyshev(3^n, 1, 2); \\ Michel Marcus, Oct 03 2017

Formula

a(n) = cosh(3^n*arccosh(2)).
a(n) = ChebyshevT(3^n, 2). - Vladeta Jovovic, Jun 11 2004
From A.H.M. Smeets, Oct 02 2017: (Start)
a(n) = A001075(3^(n-2))
a(n) = A002350(3^(2n-3)). (End)

Extensions

More terms from Vladeta Jovovic, Jun 11 2004
Offset corrected by Michel Marcus, Oct 03 2017
Previous Showing 11-20 of 29 results. Next