A126690 Multiplicative function defined for prime powers by a(p^k) = p + p^2 + p^3 + ... + p^(k-1) - 1 (k >= 1).
1, -1, -1, 1, -1, 1, -1, 5, 2, 1, -1, -1, -1, 1, 1, 13, -1, -2, -1, -1, 1, 1, -1, -5, 4, 1, 11, -1, -1, -1, -1, 29, 1, 1, 1, 2, -1, 1, 1, -5, -1, -1, -1, -1, -2, 1, -1, -13, 6, -4, 1, -1, -1, -11, 1, -5, 1, 1, -1, 1, -1, 1, -2, 61, 1, -1, -1, -1, 1, -1, -1, 10, -1, 1, -4, -1, 1, -1, -1, -13, 38, 1, -1, 1, 1, 1, 1, -5, -1, 2, 1, -1, 1, 1, 1, -29, -1, -6, -2, 4
Offset: 1
Examples
a(5) = -1, a(9) = 3-1 = 2, a(45) = (-1)*2 = -2.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A049060.
Programs
-
Maple
pksum := proc(L) local p,k ; p := op(1,L) ; k := op(2,L) ; (p^k-p)/(p-1)-1 ; end: A126690 := proc(n) local pe,a ; if n = 1 then RETURN(1) ; else a := 1 ; pe := ifactors(n)[2] ; for d in pe do a := a*pksum(d) ; od: RETURN(a) ; fi; end: for n from 1 to 120 do printf("%d,",A126690(n)) ; od: # R. J. Mathar, Aug 08 2008
-
Mathematica
a[1] = 1; a[n_] := a[n] = Product[{p, k} = pk; Total[p^Range[k - 1]] - 1, {pk, FactorInteger[n]}]; Array[a, 100] (* Jean-François Alcover, Mar 31 2020 *)
-
PARI
a(n) = {my(f = factor(n)); prod(i = 1, #f~, (f[i,1]^f[i,2] - 2*f[i,1] + 1)/(f[i,1]-1));} \\ Amiram Eldar, May 26 2025
Formula
Dirichlet g.f.: zeta(s-1) * zeta(s) * Product_{p prime} (1 - 1/p^(s-1) - 2/p^s + 3/p^(2*s-1)). - Amiram Eldar, May 26 2025
Extensions
Extended beyond a(30) by R. J. Mathar, Aug 08 2008
More terms from Antti Karttunen, Sep 23 2017
Comments