OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
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
(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