OFFSET
0,2
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
R. Kemp, On the number of words in the language {w in Sigma* | w = w^R }^2, Discrete Math., 40 (1982), 225-234.
FORMULA
a(n) = A187275(n) - Sum_{d|n,d<n} phi(n/d)*a(d). - Sean A. Irvine, Sep 27 2017
MAPLE
See A007055.
PROG
(Python)
from functools import lru_cache
from sympy import totient, proper_divisors
@lru_cache(maxsize=None)
def A007058(n): return (n*5**(1+(n>>1)) if n&1 else 3*n*5**(n>>1))-sum(totient(n//d)*A007058(d) for d in proper_divisors(n, generator=True)) if n else 1 # Chai Wah Wu, Feb 19 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mira Bernstein, R. Kemp
EXTENSIONS
Entry revised by N. J. A. Sloane, Mar 07 2011
STATUS
approved