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!)
A018825 Numbers that are not the sum of 2 nonzero squares. 18
1, 3, 4, 6, 7, 9, 11, 12, 14, 15, 16, 19, 21, 22, 23, 24, 27, 28, 30, 31, 33, 35, 36, 38, 39, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 56, 57, 59, 60, 62, 63, 64, 66, 67, 69, 70, 71, 75, 76, 77, 78, 79, 81, 83, 84, 86, 87, 88, 91, 92, 93, 94, 95, 96, 99, 102, 103, 105, 107, 108, 110 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
A025426(a(n)) = 0; A063725(a(n)) = 0. - Reinhard Zumkeller, Aug 16 2011
MAPLE
isA000404 := proc(n)
local x, y ;
for x from 1 do
if x^2> n then
return false;
end if;
for y from 1 do
if x^2+y^2 > n then
break;
elif x^2+y^2 = n then
return true;
end if;
end do:
end do:
end proc:
A018825 := proc(n)
if n = 1 then
1;
else
for a from procname(n-1)+1 do
if not isA000404(a) then
return a;
end if;
end do:
end if;
end proc:
seq(A018825(n), n=1..30) ; # R. J. Mathar, Jul 28 2014
MATHEMATICA
q=13; q2=q^2+1; lst={}; Do[Do[z=a^2+b^2; If[z<=q2, AppendTo[lst, z]], {b, a, 1, -1}], {a, q}]; lst; u=Union@lst; Complement[Range[q^2], u] (* Vladimir Joseph Stephan Orlovsky, May 30 2010 *)
PROG
(Haskell)
import Data.List (elemIndices)
a018825 n = a018825_list !! (n-1)
a018825_list = tail $ elemIndices 0 a025426_list
-- Reinhard Zumkeller, Aug 16 2011
(PARI) is(n)=my(f=factor(n), t=prod(i=1, #f~, if(f[i, 1]%4==1, f[i, 2]+1, if(f[i, 2]%2 && f[i, 1]>2, 0, 1)))); if(t!=1, return(!t)); for(k=sqrtint((n-1)\2)+1, sqrtint(n-1), if(issquare(n-k^2), return(0))); 1 \\ Charles R Greathouse IV, Sep 02 2015
CROSSREFS
Cf. A022544, A081324, A000404 (complement), A004431.
Sequence in context: A065313 A103566 A258592 * A247779 A243989 A248521
KEYWORD
nonn
AUTHOR
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 13:02 EDT 2024. Contains 371969 sequences. (Running on oeis4.)