A252895 Numbers with an odd number of square divisors.
1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 26, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 46, 47, 48, 51, 53, 55, 57, 58, 59, 61, 62, 65, 66, 67, 69, 70, 71, 73, 74, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 96, 97
Offset: 1
Keywords
Examples
The set of divisors of 6 is {1,2,3,6}, which contains only one perfect square: 1; therefore 6 is a term. The set of divisors of 16 is {1,2,4,8,16}, which contains three perfect squares: 1, 4, and 16; therefore 16 is a term. The set of divisors of 4 is {1,2,4}, which contains two perfect squares: 1 and 4; therefore 4 is not a term.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Ernest Cesàro, Le plus grand diviseur carré, Annali di Matematica Pura ed Applicata, Vol. 13, No. 1 (1885), pp. 251-268, entire volume.
- K. A. P. Dagal, Generalized Locker Problem, arXiv:1307.6455 [math.NT], 2013.
- B. Torrence and S. Wagon, The Locker Problem, Crux Mathematicorum, 2007, 33(4), 232-236.
Crossrefs
Programs
-
Haskell
a252895 n = a252895_list !! (n-1) a252895_list = filter (odd . a046951) [1..] -- Reinhard Zumkeller, Apr 06 2015
-
Maple
N:= 1000: # to get all terms <= N S:= select(numtheory:-issqrfree, {$1..N}): map(s -> seq(s*i^4, i = 1 .. floor((N/s)^(1/4))), S); # if using Maple 11 or earlier, uncomment the next line # sort(convert(%,list)); # Robert Israel, Apr 07 2015
-
Mathematica
Position[Length@ Select[Divisors@ #, IntegerQ@ Sqrt@ # &] & /@ Range@ 70, Integer?OddQ] // Flatten (* _Michael De Vlieger, Mar 23 2015 *) a[n_] := DivisorSigma[0, Total[EulerPhi/@Select[Sqrt[Divisors[n]], IntegerQ]]]; Flatten[Position[a/@Range@100,?OddQ]] (* _Ivan N. Ianakiev, Apr 07 2015 *) Select[Range@ 100, OddQ@ Length@ DeleteCases[Divisors@ #, k_ /; ! IntegerQ@ Sqrt@ k] &] (* Michael De Vlieger, Oct 10 2016 *)
-
PARI
isok(n) = sumdiv(n, d, issquare(d)) % 2; \\ Michel Marcus, Mar 22 2015
-
Sage
[n for n in [1..200] if len([x for x in divisors(n) if is_square(x)])%2==1] # Tom Edgar, Mar 22 2015
Comments