cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A359580 Numbers that are either (an odd squarefree number squared) or twice such a number.

This page as a plain text file.
%I A359580 #18 May 27 2025 17:37:42
%S A359580 1,2,9,18,25,49,50,98,121,169,225,242,289,338,361,441,450,529,578,722,
%T A359580 841,882,961,1058,1089,1225,1369,1521,1681,1682,1849,1922,2178,2209,
%U A359580 2450,2601,2738,2809,3025,3042,3249,3362,3481,3698,3721,4225,4418,4489,4761,5041,5202,5329,5618,5929,6050,6241
%N A359580 Numbers that are either (an odd squarefree number squared) or twice such a number.
%C A359580 Numbers in whose prime factorization the exponent of 2 can be only 0 or 1, and the exponent of any odd prime can be only 0 or 2.
%F A359580 Sum_{n>=1} 1/a(n) = 18/Pi^2. - _Amiram Eldar_, Jan 07 2023
%t A359580 Select[Range[6000], (e = IntegerExponent[#, 2]) < 2 && SquareFreeQ[Sqrt[#/2^e]] &] (* _Amiram Eldar_, Jan 07 2023 *)
%t A359580 {#,2#}&/@(Select[Range[1,101,2],SquareFreeQ]^2)//Flatten//Sort (* _Harvey P. Dale_, May 27 2025 *)
%o A359580 (PARI) isA359580(n) = A359549(n);
%o A359580 (Python)
%o A359580 from itertools import count, islice
%o A359580 from sympy import factorint
%o A359580 def A359580_gen(startvalue=1): # generator of terms >= startvalue
%o A359580     return filter(lambda n:(m:=(~n & n-1).bit_length())<=1 and all(e==2 for e in factorint(n>>m).values()),count(max(startvalue,1)))
%o A359580 A359580_list = list(islice(A359580_gen(),20)) # _Chai Wah Wu_, Jan 11 2023
%Y A359580 Cf. A359549 (characteristic function).
%Y A359580 Positions of odd terms in A046692, A327276, A327278, A359548.
%Y A359580 Cf. also A056911, A062503.
%K A359580 nonn
%O A359580 1,2
%A A359580 _Antti Karttunen_, Jan 07 2023