login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A359580
Numbers that are either an odd squarefree number squared or twice such a number.
1
1, 2, 9, 18, 25, 49, 50, 98, 121, 169, 225, 242, 289, 338, 361, 441, 450, 529, 578, 722, 841, 882, 961, 1058, 1089, 1225, 1369, 1521, 1681, 1682, 1849, 1922, 2178, 2209, 2450, 2601, 2738, 2809, 3025, 3042, 3249, 3362, 3481, 3698, 3721, 4225, 4418, 4489, 4761, 5041, 5202, 5329, 5618, 5929, 6050, 6241
OFFSET
1,2
COMMENTS
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.
FORMULA
Sum_{n>=1} 1/a(n) = 18/Pi^2. - Amiram Eldar, Jan 07 2023
MATHEMATICA
Select[Range[6000], (e = IntegerExponent[#, 2]) < 2 && SquareFreeQ[Sqrt[#/2^e]] &] (* Amiram Eldar, Jan 07 2023 *)
PROG
(PARI) isA359580(n) = A359549(n);
(Python)
from itertools import count, islice
from sympy import factorint
def A359580_gen(startvalue=1): # generator of terms >= startvalue
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)))
A359580_list = list(islice(A359580_gen(), 20)) # Chai Wah Wu, Jan 11 2023
CROSSREFS
Cf. A359549 (characteristic function).
Positions of odd terms in A046692, A327276, A327278, A359548.
Cf. also A056911, A062503.
Sequence in context: A346233 A358946 A282519 * A103256 A028881 A294535
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 07 2023
STATUS
approved