login
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
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
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
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 15 2010
STATUS
approved