A252462 Shift one instance of the largest prime one step towards smaller primes: a(1) = 1, a(2^n) = 2^(n-1), and for other numbers: a(n) = (n / prime(g)) * prime(g-1), where g = A061395(n), index of the greatest prime dividing n.
1, 1, 2, 2, 3, 4, 5, 4, 6, 6, 7, 8, 11, 10, 9, 8, 13, 12, 17, 12, 15, 14, 19, 16, 15, 22, 18, 20, 23, 18, 29, 16, 21, 26, 25, 24, 31, 34, 33, 24, 37, 30, 41, 28, 27, 38, 43, 32, 35, 30, 39, 44, 47, 36, 35, 40, 51, 46, 53, 36, 59, 58, 45, 32, 55, 42, 61, 52, 57, 50, 67, 48, 71, 62, 45, 68, 49, 66, 73, 48, 54, 74, 79, 60
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
a252462[n_Integer] := Block[{a008578, a052126, a061395, a}, a008578[x_] := If[x == 1, 1, Prime[x - 1]]; a052126[x_] := If[x == 1, 1, x/FactorInteger[x][[-1]][[1]]]; a061395[x_] := PrimePi[FactorInteger[x][[-1]][[1]]]; a[1] = 1; a[x_] := a008578[a061395[x]]*a052126[x]; Array[a, n]]; a252462[84] (* Michael De Vlieger, Dec 21 2014 *)
-
Scheme
(define (A252462 n) (if (= 1 n) n (* (A008578 (A061395 n)) (A052126 n))))
Comments