cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A140706 A054525 * A014683; a(n) = Sum_{d|n} mu(d)*A014683(n/d).

Original entry on oeis.org

1, 2, 3, 1, 5, 0, 7, 4, 5, 2, 11, 5, 13, 4, 6, 8, 17, 7, 19, 9, 10, 8, 23, 8, 19, 10, 18, 13, 29, 11, 31, 16, 18, 14, 22, 12, 37, 16, 22, 16, 41, 15, 43, 21, 25, 20, 47, 16, 41, 21, 30, 25, 53, 18, 38, 24, 34, 26, 59, 15, 61, 28, 37, 32, 46, 23, 67, 33, 42, 27, 71, 24, 73, 34, 41
Offset: 1

Views

Author

Gary W. Adamson, May 24 2008

Keywords

Comments

a(n) = n iff n is prime.

Examples

			a(4) = 1 = (0, -1, 0, 1) dot (1, 3, 4, 4), where (0, -1, 0, 1) = row 4 of triangle A054525.
		

Crossrefs

Programs

  • 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 *)
  • PARI
    A014683(n) = (n+isprime(n));
    A140706(n) = sumdiv(n,d,moebius(d)*A014683(n/d)); \\ Antti Karttunen, Jul 28 2017
    
  • 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

Formula

Möbius transform of A014683: (1, 3, 4, 4, 6, 6, 8, 8, 9, 10, ...); where A014683(n) = n if n is not prime; but (n+1) if n is prime.
a(n) = Sum_{d|n} A008683(d)*A014683(n/d), where A008683 is Moebius mu function. - Antti Karttunen, Jul 28 2017

Extensions

More terms from R. J. Mathar, Jan 19 2009
Second part added to the name by Antti Karttunen, Jul 28 2017