OFFSET
1,1
COMMENTS
This sequence is not multiplicative. What is multiplicative is the sequence b = 1,0,2,0,12,0,30, ... such that a(n) = b(2n+1) and b(2n)=0. - Robert Israel, Jan 29 2017
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Masao Arai and Jiyu Gakuen, Problem E 1460, American Mathematical Monthly, Vol. 68, No. 3 (1961), p. 295 and A Number-Theoretic Function, solution by Leonard Carlitz, American Mathematical Monthly, Vol. 68, No. 9 (1961), pp. 932-933.
László Tóth, Another generalization of Euler's arithmetic function and Menon's identity, The Ramanujan Journal (2021).
FORMULA
If 2n+1 = p^k is a prime power with p an odd prime then a(n) = p^(2k-2) * (p^2 - 3p + 2).
a(n) = (2n+1)^2 * Product_{primes p | 2n+1} (1 - 3/p + 2/p^2). - Robert Israel, Jan 29 2017
Sum_{k=1..n} a(k) ~ c * (2*n)^3/3 + O(n^2*log(n)^3), where c = A065473 (Tóth, 2021). - Amiram Eldar, Jan 03 2022
EXAMPLE
The only solutions modulo 3 in units are 1+1+1 = 0 mod 3, 2+2+2 = 0 mod 3 so the first element of the sequence is 2.
MAPLE
f:= n -> n^2*mul((1-1/p)*(1-2/p), p=numtheory:-factorset(n)):
seq(f(2*n+1), n=1..100); # Robert Israel, Jan 29 2017
MATHEMATICA
a[n_] := (2*n+1)^2 * Product[(1-1/p)*(1-2/p), {p, FactorInteger[2*n+1][[;; , 1]]}]; Array[a, 50] (* Amiram Eldar, Jan 03 2022 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Ahmed Fares (ahmedfares(AT)my-deja.com), Jun 22 2001
EXTENSIONS
More terms from Vladeta Jovovic, Jun 23 2001
Corrected by Robert Israel, Jan 29 2017
STATUS
approved