OFFSET
1,2
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..20000 (First 1000 terms from Harry J. Smith)
FORMULA
If n mod 4 = 0 then a(n) = a(n/4), otherwise a(n) = n.
Multiplicative with a(p^e) = 2^(e (mod 2)) if p = 2 and a(p^e) = p^e if p is an odd prime.
a(n) = n/4^A235127(n).
a(n) = A214392(n) if n mod 16 != 0. - Peter Kagey, Sep 02 2015
From Robert Israel, Dec 08 2015: (Start)
G.f.: x/(1-x)^2 - 3 Sum_{j>=1} x^(4^j)/(1-x^(4^j))^2.
G.f. satisfies G(x) = G(x^4) + x/(1-x)^2 - 4 x^4/(1-x^4)^2. (End)
Sum_{k=1..n} a(k) ~ (2/5) * n^2. - Amiram Eldar, Nov 20 2022
Dirichlet g.f.: zeta(s-1)*(4^s-4)/(4^s-1). - Amiram Eldar, Jan 04 2023
EXAMPLE
a(7)=7, a(14)=14, a(28)=a(4*7)=7, a(56)=a(4*14)=14, a(112)=a(4^2*7)=7.
MAPLE
A065883:= n -> n/4^floor(padic:-ordp(n, 2)/2):
map(A065883, [$1..1000]); # Robert Israel, Dec 08 2015
MATHEMATICA
If[Divisible[#, 4], #/4^IntegerExponent[#, 4], #]&/@Range[80] (* Harvey P. Dale, Aug 31 2013 *)
PROG
(PARI) baseA2B(x, a, b)= { local(d, e=0, f=1); while (x>0, d=x%b; x\=b; e+=d*f; f*=a); return(e) }
{ for (n=1, 1000, if (n%4, a=n, a=baseA2B(n, 10, 4); while (a%10 == 0, a\=10); a=baseA2B(a, 4, 10)); write("b065883.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 03 2009
(PARI) a(n)=n/4^valuation(n, 4); \\ Joerg Arndt, Dec 09 2015
(Python)
def A065883(n): return n>>((~n&n-1).bit_length()&-2) # Chai Wah Wu, Jul 09 2022
CROSSREFS
KEYWORD
base,easy,nonn,mult
AUTHOR
Henry Bottomley, Nov 26 2001
STATUS
approved