[go: up one dir, main page]

login
Numbers with an even number of square divisors.
8

%I #58 Nov 18 2020 10:26:38

%S 4,8,9,12,18,20,24,25,27,28,36,40,44,45,49,50,52,54,56,60,63,64,68,72,

%T 75,76,84,88,90,92,98,99,100,104,108,116,117,120,121,124,125,126,128,

%U 132,135,136,140,144,147,148

%N Numbers with an even number of square divisors.

%C Closed lockers in the locker problem where the student numbers are the set of perfect squares.

%C 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.

%C 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.

%C From _Amiram Eldar_, Jul 07 2020: (Start)

%C Numbers k such that the largest square dividing k (A008833) is not a fourth power.

%C The asymptotic density of this sequence is 1 - Pi^2/15 = 1 - A182448 = 0.342026... (Cesàro, 1885). (End)

%C Closed under application of A331590: for n, k >= 1, A331590(a(n), k) is in the sequence. - _Peter Munn_, Sep 18 2020

%H Reinhard Zumkeller, <a href="/A252849/b252849.txt">Table of n, a(n) for n = 1..10000</a>

%H Ernest Cesàro, <a href="https://doi.org/10.1007/BF02420801">Le plus grand diviseur carré</a>, Annali di Matematica Pura ed Applicata, Vol. 13, No. 1 (1885), pp. 251-268, <a href="https://iris.univ-lille.fr/handle/1908/1932">entire volume</a>.

%H K. A. P. Dagal, <a href="http://arxiv.org/abs/1307.6455">Generalized Locker Problem</a>, arXiv:1307.6455 [math.NT], 2013.

%H B. Torrence and S. Wagon, <a href="https://cms.math.ca/crux/v33/n4/page232-236.pdf">The Locker Problem</a>, Crux Mathematicorum, 2007, 33(4), 232-236.

%F From _Peter Munn_, Sep 18 2020: (Start)

%F Numbers k such that A046951(k) mod 2 = 0.

%F Numbers k such that A335324(k) > 1.

%F (End)

%t Position[Length@ Select[Divisors@ #, IntegerQ@ Sqrt@ # &] & /@ Range@ 150, _Integer?EvenQ] // Flatten (* _Michael De Vlieger_, Mar 23 2015 *)

%o (C++)

%o #include <iostream>

%o using namespace std;

%o int main()

%o {

%o const int one_k = 1000;

%o //all numbers in sequence up to one_k are given

%o int lockers [one_k] = {};

%o int A = 0;

%o while (A < one_k) {

%o lockers [A] = A+1;

%o A = A + 1;

%o }

%o int B = 1;

%o while ( ((B+1) * (B+1)) <= one_k) {

%o int C = ((B+1) * (B+1));

%o int D = one_k/C;

%o int E = 1;

%o while (E <= D) {

%o lockers [(C*E)-1] = -1 * lockers [(C*E)-1];

%o E = E + 1;

%o }

%o B = B + 1;

%o }

%o int F = 0;

%o while (F < one_k) {

%o if (lockers [F] < 0) {

%o cout << (-1 * lockers [F]) << endl;

%o }

%o F = F + 1;

%o }

%o return 0;

%o } /* _Walker Dewey Anderson_, Mar 22 2015 */

%o (PARI) isok(n) = sumdiv(n, d, issquare(d)) % 2 == 0; \\ _Michel Marcus_, Mar 22 2015

%o (Haskell)

%o a252849 n = a252849_list !! (n-1)

%o a252849_list = filter (even . a046951) [1..]

%o -- _Reinhard Zumkeller_, Apr 06 2015

%Y Complement of A252895.

%Y A046951, A335324 are used in a formula defining this sequence.

%Y Disjoint union of A336593 and A336594.

%Y A030140, A038109, A082293, A217319 are subsequences.

%Y Cf. A000290, A008833, A182448, A331590.

%Y Ordered 3rd trisection of A225546.

%K nonn

%O 1,1

%A _Walker Dewey Anderson_, Mar 22 2015