login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A230239 Values of N for which the equation x^2 - 4*y^2 = N has integer solutions. 5
0, 1, 4, 5, 9, 12, 13, 16, 17, 20, 21, 25, 28, 29, 32, 33, 36, 37, 41, 44, 45, 48, 49, 52, 53, 57, 60, 61, 64, 65, 68, 69, 73, 76, 77, 80, 81, 84, 85, 89, 92, 93, 96, 97, 100, 101, 105, 108, 109, 112, 113, 116, 117, 121, 124, 125, 128, 129, 132, 133, 137 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
This equation is a Pellian equation of the form x^2 - D^2*y^2 = N. A042965 covers the case D=1.
This sequence is also numbers that are congruent to {0,1,4,5,9,12,13} mod 16.
LINKS
FORMULA
G.f.: x^2*(x+1)*(3*x+1)*(x^2-x+1)*(x^2+1) / ((x-1)^2*(x^6+x^5+x^4+x^3+x^2+x+1)).
a(n) ~ 16*n/7. - Stefano Spezia, Apr 08 2024
EXAMPLE
For N=33, the equation x^2 - 4*y^2 = 33 has solutions (X,Y) = (7,2) and (17,8).
PROG
(PARI)
\\ Values of n for which the equation x^2 - d^2*y^2 = n has integer solutions.
\\ e.g. allpellsq(2, 20) gives [0, 1, 4, 5, 9, 12, 13, 16, 17, 20]
allpellsq(d, nmax) = {
local(v=[0], n, w);
for(n=1, nmax,
w=pellsq(d, n);
if(#w>0, v=concat(v, n))
);
v
}
\\ All integer solutions to x^2-d^2*y^2=n.
\\ e.g. pellsq(5, 5200) gives [265, 51; 140, 24; 85, 9]
pellsq(d, n) = {
local(m=Mat(), f, x, y);
fordiv(n, f,
if(f*f>n, break);
if((n-f^2)%(2*f*d)==0,
y=(n-f^2)\(2*f*d);
x=d*y+f;
m=concat(m, [x, y]~)
)
);
m~
}
CROSSREFS
Sequence in context: A059610 A341783 A319606 * A194154 A297291 A269741
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Oct 13 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)