Problem about squares

Jeffrey Shallit elvis at graceland.math.uwaterloo.ca
Fri Jan 11 17:46:36 CET 2008


see http://www.research.att.com/~njas/sequences/A052531 which has got a quite
meaningless description :(
(I've got no Maple running under Linux. Assuming there is a function even() in
Maple:
an:=n->if even(n) then 2^n+1 else 2^n fi; seems a bit less complicated than
the function in the OEIS-entry.
Mma: 2^# + (1 - Mod[#, 2]) & /@ Range[0, 31]

Peter Pein schrieb:
> oops... I messed it up (n, n+1, even, odd...)
> 
> for odd n, 2^n does it.
> 
> sorry,
> Peter
> 
> Peter Pein schrieb:
>> Well, then take 2^(n+1) for even n and 2^(n+1)+1 for odd n if this is not a
>> square, else for odd n try 4^k*2^(n+1)+1 for k from 1 to somewhere until the
>> result is not a square.
>> .
> 






More information about the SeqFan mailing list