OFFSET
1,1
COMMENTS
The asymptotic density of this sequence is 1/2. - Amiram Eldar, Nov 14 2023
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
From David A. Corneth, Nov 11 2023: (Start)
28 = 2^2 * 7 = 2^2 * 3^0 * (12*0 + 7) is in the sequence as it meets the first form.
76 = 2^2 * 19 = 2^2 * 3^0 * (12*1 + 7) is in the sequence as it meets the first form.
15 = 3 * 5 = 2^0 * 3^1 * (12*0 + 5) is not in the sequence as it does not match any of the desired forms. (End)
MATHEMATICA
Select[Range[140], Mod[#/Times @@ ({2, 3}^IntegerExponent[#, {2, 3}]), 4] == 3 &] (* Amiram Eldar, Nov 14 2023 *)
PROG
(PARI) for(n=1, 200, t=n/(2^valuation(n, 2)*3^valuation(n, 3)); if((t%4==3), print1(n, ", ")))
(Magma) [n: n in [1..200] | d mod 4 eq 3 where d is n div (2^Valuation(n, 2)*3^Valuation(n, 3))]; // Bruno Berselli, May 16 2013
(Python)
from itertools import count
from sympy import integer_log
def A225858(n):
def f(x):
c = n
for i in range(integer_log(x, 3)[0]+1):
i2 = 3**i
for j in count(0):
k = i2<<j
if k>x:
break
m = x//k
c += (m-1)//12+(m-5)//12+2
return c
m, k = n, f(n)
while m != k: m, k = k, f(k)
return m # Chai Wah Wu, Feb 24 2025
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Ralf Stephan, May 18 2013
EXTENSIONS
Name clarified by Peter Munn, Nov 11 2023
STATUS
approved