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!)
A097448 If n is square, replace with sqrt(n). 3

%I #13 Jul 09 2017 12:41:14

%S 0,1,2,3,2,5,6,7,8,3,10,11,12,13,14,15,4,17,18,19,20,21,22,23,24,5,26,

%T 27,28,29,30,31,32,33,34,35,6,37,38,39,40,41,42,43,44,45,46,47,48,7,

%U 50,51,52,53,54,55,56,57,58,59,60,61,62,63,8,65,66,67,68,69,70,71,72,73,74

%N If n is square, replace with sqrt(n).

%e The first five integers 0,1,2,3,4 have squares 0,1,4 thus the first five integers in the seq is 0,1,2,3,2.

%t Table[If[IntegerQ[Sqrt[n]],Sqrt[n],n],{n,0,100}] (* _Harvey P. Dale_, Jul 09 2017 *)

%o (PARI) g(n) = for(x=0,n,if(issquare(x),y=sqrt(x),y=x);print1(floor(y)",")

%o (PARI) for(n=0,74,print1(if(issquare(n,&m),m,n)", ")) \\ _Zak Seidov_, Feb 21 2013

%K nonn

%O 0,3

%A _Cino Hilliard_, Aug 23 2004

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 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)