login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
From Wesley Ivan Hurt, Jul 09 2016: (Start)
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
seq(op([1, 3, 1, 7]), n=1..50); # Wesley Ivan Hurt, Jul 09 2016
MATHEMATICA
PadRight[{}, 100, {1, 3, 1, 7}] (* Wesley Ivan Hurt, Jul 09 2016 *)
PROG
(PARI) a(n)=1+2*((n-1)%2)*((n-1)%4); \\ Jaume Oliver Lafont, Aug 28 2009; corrected by Antti Karttunen, Mar 31 2013
(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
(Magma) &cat [[1, 3, 1, 7]^^30]; // Wesley Ivan Hurt, Jul 09 2016
CROSSREFS
First differences of A112062.
Also half of the first differences of A112072. Cf. A112086.
Sequence in context: A136011 A227984 A021991 * A053381 A038712 A354587
KEYWORD
nonn,mult,easy
AUTHOR
Antti Karttunen, Aug 28 2005
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 09:44 EDT 2024. Contains 371268 sequences. (Running on oeis4.)