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!)
A252895 Numbers with an odd number of square divisors. 11
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Open lockers in the locker problem where the student numbers are the set of perfect squares.
The locker problem is a classic mathematical problem. Imagine a row containing an infinite number of lockers numbered from one to infinity. Also imagine an infinite number of students numbered from one to infinity. All of the lockers begin closed. The first student opens every locker that is a multiple of one, which is every locker. The second student closes every locker that is a multiple of two, so all of the even-numbered lockers are closed. The third student opens or closes every locker that is a multiple of three. This process continues for all of the students. [This is sometimes called the light switch problem - see A360845.]
A variant on the locker problem is when not all student numbers are considered; in the case of this sequence, only the square-numbered students open and close lockers. The sequence here is a list of the open lockers after all of the students have gone.
n is in the sequence if and only if it is the product of a squarefree number (A005117) and a fourth power (A000583). - Robert Israel, Apr 07 2015
Let D be the multiset containing d0(k), the divisor counting function, for each divisor k of n. n is in the sequence if and only if D admits a partition into two parts A and B such that the sum of the elements of A is exactly one more or less than the sum of the elements of B. For example, if n = 80, we have D = {1, 2, 2, 3, 4, 4, 5, 6, 8, 10}, and A = {1, 2, 3, 4, 4, 8} and B = {2, 5, 6, 10}. The sum of A is 22, and the sum of B is 23. - Griffin N. Macris, Oct 10 2016
From Amiram Eldar, Jul 07 2020: (Start)
Numbers k such that the largest square dividing k (A008833) is a fourth power.
The asymptotic density of this sequence is Pi^2/15 = A182448 = 0.657973... (Cesàro, 1885). (End)
Closed under the binary operation A059897(.,.), forming a subgroup of the positive integers under A059897. - Peter Munn, Aug 01 2020
LINKS
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.
EXAMPLE
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.
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 *)
PROG
(C++)
#include <iostream>
using namespace std;
int main()
{
const int one_k = 1000;
//all numbers in sequence up to one_k are given
int lockers [one_k] = {};
int A = 0;
while (A < one_k) {
lockers [A] = A+1;
A = A + 1;
}
int B = 1;
while ( ((B) * (B)) <= one_k) {
int C = ((B) * (B));
int D = one_k/C;
int E = 1;
while (E <= D) {
lockers [(C*E)-1] = -1 * lockers [(C*E)-1];
E = E + 1;
}
B = B + 1;
}
int F = 0;
while (F < one_k) {
if (lockers [F] < 0) {
cout << (-1 * lockers [F]) << endl;
}
F = F + 1;
}
return 0;
} // Walker Dewey Anderson, Mar 22 2015
(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
(Haskell)
a252895 n = a252895_list !! (n-1)
a252895_list = filter (odd . a046951) [1..]
-- Reinhard Zumkeller, Apr 06 2015
CROSSREFS
Positions of ones in A335324.
Sequence in context: A318239 A059266 A336222 * A366242 A336224 A274034
KEYWORD
nonn
AUTHOR
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 March 28 22:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)