OFFSET
1,1
COMMENTS
Closed 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.
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 closed lockers after all of the students have gone.
From Amiram Eldar, Jul 07 2020: (Start)
Numbers k such that the largest square dividing k (A008833) is not a fourth power.
The asymptotic density of this sequence is 1 - Pi^2/15 = 1 - A182448 = 0.342026... (Cesàro, 1885). (End)
Closed under application of A331590: for n, k >= 1, A331590(a(n), k) is in the sequence. - Peter Munn, Sep 18 2020
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.
FORMULA
From Peter Munn, Sep 18 2020: (Start)
Numbers k such that A046951(k) mod 2 = 0.
Numbers k such that A335324(k) > 1.
(End)
MATHEMATICA
Position[Length@ Select[Divisors@ #, IntegerQ@ Sqrt@ # &] & /@ Range@ 150, _Integer?EvenQ] // Flatten (* Michael De Vlieger, Mar 23 2015 *)
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+1) * (B+1)) <= one_k) {
int C = ((B+1) * (B+1));
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 == 0; \\ Michel Marcus, Mar 22 2015
(Haskell)
a252849 n = a252849_list !! (n-1)
a252849_list = filter (even . a046951) [1..]
-- Reinhard Zumkeller, Apr 06 2015
KEYWORD
nonn
AUTHOR
Walker Dewey Anderson, Mar 22 2015
STATUS
approved