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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
Like A037213, but has 1's instead of 0's for nonsquare n > 0. - Antti Karttunen, Jul 22 2018
LINKS
FORMULA
a(n) = A007955(n)/A056925(n) = 1 + (sqrt(n)-1)*A010052(n), for all n >= 1.
a(n) = n^((d(n) mod 2)/2) for n>=1. - Wesley Ivan Hurt, Jun 07 2023
EXAMPLE
a(24) = 1 because 24 is not a square, a(25) = 5 because 25 = 5^2.
MATHEMATICA
sq1[n_]:=Module[{sn=Sqrt[n]}, If[IntegerQ[sn], sn, 1]]; Array[sq1, 110] (* Harvey P. Dale, Jul 25 2011 *)
PROG
(PARI) A056926(n) = if(issquare(n, &n), n, 1); \\ Antti Karttunen, Jul 22 2018
CROSSREFS
Sequence in context: A260089 A296240 A158464 * A137773 A175010 A107454
KEYWORD
easy,nonn
AUTHOR
Henry Bottomley, Jul 12 2000
EXTENSIONS
Term a(0) = 0 prepended by Antti Karttunen, Jul 22 2018
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 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)