OFFSET
1,2
COMMENTS
a(n) = n iff n is prime.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
a(4) = 1 = (0, -1, 0, 1) dot (1, 3, 4, 4), where (0, -1, 0, 1) = row 4 of triangle A054525.
MAPLE
read("transforms") : A014683 := proc(n) if isprime(n) then 1+n; else n; fi; end: a014683 := [seq(A014683(n), n=1..150)] ; a140706 := MOBIUS(a014683) ; for i from 1 to nops(a140706) do printf("%d, ", op(i, a140706)) ; od: # R. J. Mathar, Jan 19 2009
MATHEMATICA
Table[Sum[MoebiusMu[d] (# + Boole@ PrimeQ@ #) &[n/d], {d, Divisors@ n}], {n, 75}] (* Michael De Vlieger, Jul 29 2017 *)
PROG
(PARI)
A014683(n) = (n+isprime(n));
(Python)
from sympy import isprime, mobius, divisors
def a014683(n): return n + isprime(n)
def a140706(n): return sum(mobius(d)*a014683(n//d) for d in divisors(n))
print([a140706(n) for n in range(1, 51)]) # Indranil Ghosh, Jul 29 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, May 24 2008
EXTENSIONS
More terms from R. J. Mathar, Jan 19 2009
Second part added to the name by Antti Karttunen, Jul 28 2017
STATUS
approved