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!)
A169695 a(n) = 1 if n is a square, otherwise a(n) = 2. 8
1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Also number of central divisors of n, if n >= 1. - Omar E. Pol, Feb 10 2011.
Length of n-th row in the array of A207375, if n >= 1. - Omar E. Pol, Feb 27 2012
LINKS
FORMULA
From Omar E. Pol, Feb 10 2011: (Start)
a(n) = 2 - A010052(n).
a(n) = 1 + A049240(n), n >=1.
a(n) = A000005(n)-A161840(n), n >= 1. (End)
MATHEMATICA
Array[2 - Boole[IntegerQ@ Sqrt@ #] &, 105, 0] (* Michael De Vlieger, Nov 03 2017 *)
PROG
(PARI) a(n) = 2 - issquare(n); \\ Amiram Eldar, Apr 17 2024
CROSSREFS
Sequence in context: A339717 A106054 A275437 * A173642 A234305 A339701
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 15 2010
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 August 18 01:44 EDT 2024. Contains 375255 sequences. (Running on oeis4.)