A352274 Numbers whose squarefree part is congruent to 1 modulo 6 or 3 modulo 18.
1, 3, 4, 7, 9, 12, 13, 16, 19, 21, 25, 27, 28, 31, 36, 37, 39, 43, 48, 49, 52, 55, 57, 61, 63, 64, 67, 73, 75, 76, 79, 81, 84, 85, 91, 93, 97, 100, 103, 108, 109, 111, 112, 115, 117, 121, 124, 127, 129, 133, 139, 144, 145, 147, 148, 151, 156, 157, 163, 165, 169, 171, 172
Offset: 1
Examples
4 = 2^2 has square part 2^2, therefore squarefree part 4/2^2 = 1, which is congruent to 1 mod 6, so 4 is in the sequence. 63 = 3^2 * 7 has square part 3^2, therefore squarefree part 63/3^2 = 7, which is congruent to 1 mod 6, so 63 is in the sequence. 21 = 3*7 has square part 1^2 and squarefree part 21, which is congruent to 3 mod 18, so 21 is in the sequence. 72 = 2^3 * 3^2 has square part 2^2 * 3^2 = 6^2, therefore squarefree part 72/6^2 = 2, which is congruent to 2 mod 6 and to 2 mod 18, so 72 is not in the sequence.
Links
- Eric Weisstein's World of Mathematics, Squarefree Part.
Crossrefs
Programs
-
PARI
isok(m) = core(m) % 6 == 1 || core(m) % 18 == 3;
-
Python
from itertools import count def A352274(n): def bisection(f,kmin=0,kmax=1): while f(kmax) > kmax: kmax <<= 1 kmin = kmax >> 1 while kmax-kmin > 1: kmid = kmax+kmin>>1 if f(kmid) <= kmid: kmax = kmid else: kmin = kmid return kmax def f(x): c = n+x for i in count(0,2): i2 = 1<x: break for j in count(0): k = i2*3**j if k>x: break c -= (x//k-1)//6+1 return c return bisection(f,n,n) # Chai Wah Wu, Feb 14 2025
Comments