login
A286474
Compound filter: a(n) = 4*A032742(n) + (n mod 4), a(1) = 1.
7
1, 6, 7, 8, 5, 14, 7, 16, 13, 22, 7, 24, 5, 30, 23, 32, 5, 38, 7, 40, 29, 46, 7, 48, 21, 54, 39, 56, 5, 62, 7, 64, 45, 70, 31, 72, 5, 78, 55, 80, 5, 86, 7, 88, 61, 94, 7, 96, 29, 102, 71, 104, 5, 110, 47, 112, 77, 118, 7, 120, 5, 126, 87, 128, 53, 134, 7, 136, 93, 142, 7, 144, 5, 150, 103, 152, 45, 158, 7, 160, 109, 166, 7, 168, 69, 174, 119, 176, 5, 182, 55
OFFSET
1,2
LINKS
FORMULA
a(1) = 1, for n > 1, a(n) = 4*A032742(n) + (n mod 4).
MATHEMATICA
Table[If[n == 1, 1, 4 (Divisors[n][[-2]]) + Mod[n, 4]], {n, 91}] (* Michael De Vlieger, May 12 2017 *)
PROG
(Scheme) (define (A286474 n) (if (= 1 n) n (+ (* 4 (A032742 n)) (modulo n 4))))
(Python)
from sympy import divisors, primefactors
def a(n): return 1 if n==1 else 4*divisors(n)[-2] + n%4 # Indranil Ghosh, May 12 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 11 2017
STATUS
approved