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!)
A056926 a(n) = sqrt(n) if n is a square, otherwise 1. 1

%I #12 Jun 07 2023 20:32:09

%S 0,1,1,1,2,1,1,1,1,3,1,1,1,1,1,1,4,1,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,

%T 1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,7,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,1,1,1,

%U 1,1,1,1,1,1,1,1,1,1,1,1,1,9,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,10,1,1,1,1

%N a(n) = sqrt(n) if n is a square, otherwise 1.

%C Like A037213, but has 1's instead of 0's for nonsquare n > 0. - _Antti Karttunen_, Jul 22 2018

%H Antti Karttunen, <a href="/A056926/b056926.txt">Table of n, a(n) for n = 0..65537</a>

%F a(n) = A007955(n)/A056925(n) = 1 + (sqrt(n)-1)*A010052(n), for all n >= 1.

%F a(n) = n^((d(n) mod 2)/2) for n>=1. - _Wesley Ivan Hurt_, Jun 07 2023

%e a(24) = 1 because 24 is not a square, a(25) = 5 because 25 = 5^2.

%t sq1[n_]:=Module[{sn=Sqrt[n]},If[IntegerQ[sn],sn,1]]; Array[sq1,110] (* _Harvey P. Dale_, Jul 25 2011 *)

%o (PARI) A056926(n) = if(issquare(n,&n),n,1); \\ _Antti Karttunen_, Jul 22 2018

%Y Cf. A000196, A037213.

%K easy,nonn

%O 0,5

%A _Henry Bottomley_, Jul 12 2000

%E Term a(0) = 0 prepended by _Antti Karttunen_, Jul 22 2018

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 August 13 02:28 EDT 2024. Contains 375113 sequences. (Running on oeis4.)