|
|
A112132
|
|
Period 4: repeat [1, 3, 1, 7].
|
|
3
|
|
|
1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1, 7, 1, 3, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n+1) = 3-2*sin(Pi*n/2)-2*(-1)^n. - R. J. Mathar, Oct 08 2011
Multiplicative with a(2) = 3, a(2^e) = 7 if e >= 2, a(p^e) = 1 otherwise. - Antti Karttunen, Mar 31 2013, typo corrected May 02 2020
G.f.: x*(1+3*x+x^2+7*x^3)/(1-x^4).
a(n) = a(n-4) for n>4.
a(2n) = 5+2*(-1)^n, a(2n-1) = 1. (End)
Dirichlet g.f.: zeta(s)*(1+2^(1-s)+4^(1-s)). - Amiram Eldar, Jan 03 2023
|
|
MAPLE
|
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) a(n)=[1, 3, 1, 7][1+(n-1)%4]; \\ Joerg Arndt, Apr 02 2013
(PARI) A112132(n) = { my(f=factor(n)); prod(i=1, #f~, if(2==f[i, 1], if(1==f[i, 2], 3, 7), 1)); }; \\ (implements the multiplicative formula) - Antti Karttunen, May 10 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,mult,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|