login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065338 a(1) = 1, a(p) = p mod 4 for p prime and a(u * v) = a(u) * a(v) for u, v > 0. 20
1, 2, 3, 4, 1, 6, 3, 8, 9, 2, 3, 12, 1, 6, 3, 16, 1, 18, 3, 4, 9, 6, 3, 24, 1, 2, 27, 12, 1, 6, 3, 32, 9, 2, 3, 36, 1, 6, 3, 8, 1, 18, 3, 12, 9, 6, 3, 48, 9, 2, 3, 4, 1, 54, 3, 24, 9, 2, 3, 12, 1, 6, 27, 64, 1, 18, 3, 4, 9, 6, 3, 72, 1, 2, 3, 12, 9, 6, 3, 16, 81, 2, 3, 36, 1, 6, 3, 24, 1, 18, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = 1 if n = 1, otherwise (A020639(n) mod 4) * n / A020639(n).
a(n) = (2^A007814(n)) * (3^A065339(n)).
a(n) <= n.
a(a(n)) = a(n).
a(x) = x iff x = 2^i * 3^j for i, j >= 0.
a(A003586(n)) = A003586(n).
a(A065331(n)) = A065331(n).
a(A004613(n)) = 1; A065333(a(n)) = 1. - Reinhard Zumkeller, Jul 10 2010
Dirichlet g.f.: (1/(1-2^(-s+1))) * Product_{prime p=4k+1} (1/(1-p^(-s))) * Product_{prime p=4k+3} 1/(1-3*p^(-s)). - Ralf Stephan, Mar 28 2015
EXAMPLE
a(120) = a(2*2*2*3*5) = a(2)*a(2)*a(2)*a(3)*a(5) = 2*2*2*3*1 = 24.
a(150) = a(2*3*5*5) = a(2)*a(3)*a(5)*a(5) = 2*3*1*1 = 6.
a(210) = a(2*3*5*7) = a(2)*a(3)*a(5)*a(7) = 2*3*1*3 = 18.
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Mod[p = FactorInteger[n][[1, 1]], 4]*a[n/p]; Table[ a[n], {n, 1, 100} ] (* Jean-François Alcover, Jan 20 2012 *)
PROG
(Haskell)
a065338 1 = 1
a065338 n = (spf `mod` 4) * a065338 (n `div` spf) where spf = a020639 n
-- Reinhard Zumkeller, Nov 18 2011
(PARI) a(n)=my(f=factor(n)); prod(i=1, #f~, (f[i, 1]%4)^f[i, 2]) \\ Charles R Greathouse IV, Feb 07 2017
CROSSREFS
Sequence in context: A129708 A071518 A330342 * A316272 A294649 A350778
KEYWORD
mult,nice,nonn
AUTHOR
Reinhard Zumkeller, Oct 29 2001
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)