The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A065371 a(1) = 1, a(prime(i)) = prime(i) - i for i > 0 and a(u * v) = a(u) * a(v) for u, v > 0. 4
1, 1, 1, 1, 2, 1, 3, 1, 1, 2, 6, 1, 7, 3, 2, 1, 10, 1, 11, 2, 3, 6, 14, 1, 4, 7, 1, 3, 19, 2, 20, 1, 6, 10, 6, 1, 25, 11, 7, 2, 28, 3, 29, 6, 2, 14, 32, 1, 9, 4, 10, 7, 37, 1, 12, 3, 11, 19, 42, 2, 43, 20, 3, 1, 14, 6, 48, 10, 14, 6, 51, 1, 52, 25, 4, 11, 18, 7, 57, 2, 1, 28, 60, 3, 20, 29 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
a(n) > 0 and a(n) < n for all n > 1.
LINKS
FORMULA
a(1) = 1; for n > 1, a(n) = (A020639(n)-A055396(n)) * a(A032742(n)). - Antti Karttunen, Jan 12 2017
EXAMPLE
a(210) = a(2*3*5*7) = a(2)*a(3)*a(5)*a(7) = (prime(1)-1)*(prime(2)-2)*(prime(3)-3)*(prime(4)-4) = (2-1)*(3-2)*(5-3)*(7-4) = 1*1*2*3 = 6.
MATHEMATICA
a[n_] := a[n] =
If[n == 1, 1,
If[PrimeQ[n], n - PrimePi[n],
Product[{p, e} = pe; a[p]^e, {pe, FactorInteger[n]}]]];
Array[a, 100] (* Jean-François Alcover, Nov 20 2021 *)
PROG
(Haskell)
a065371 1 = 1
a065371 n = product $ map (a014689 . a049084) $ a027746_row n
-- Reinhard Zumkeller, Apr 09 2012
(Scheme, with memoization-macro definec)
(definec (A065371 n) (cond ((= 1 n) 1) (else (* (- (A020639 n) (A055396 n)) (A065371 (A032742 n))))))
;; Antti Karttunen, Jan 12 2017
(PARI) a(n) = my(f=factor(n)); for (k=1, #f~, f[k, 1]-=primepi(f[k, 1])); factorback(f); \\ Michel Marcus, Nov 20 2021
CROSSREFS
Sequence in context: A349431 A297381 A051793 * A300982 A354203 A186007
KEYWORD
mult,nonn
AUTHOR
Reinhard Zumkeller, Nov 01 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 May 13 02:41 EDT 2024. Contains 372497 sequences. (Running on oeis4.)