This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A112132 #54 Feb 24 2024 01:13:12 %S A112132 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, %T A112132 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, %U A112132 1,3,1,7,1,3,1,7,1,3,1,7,1,3,1,7,1,3,1 %N A112132 Period 4: repeat [1, 3, 1, 7]. %H A112132 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,1). %F A112132 a(n+1) = 3-2*sin(Pi*n/2)-2*(-1)^n. - _R. J. Mathar_, Oct 08 2011 %F A112132 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 %F A112132 From _Wesley Ivan Hurt_, Jul 09 2016: (Start) %F A112132 G.f.: x*(1+3*x+x^2+7*x^3)/(1-x^4). %F A112132 a(n) = a(n-4) for n>4. %F A112132 a(2n) = 5+2*(-1)^n, a(2n-1) = 1. (End) %F A112132 Dirichlet g.f.: zeta(s)*(1+2^(1-s)+4^(1-s)). - _Amiram Eldar_, Jan 03 2023 %p A112132 seq(op([1, 3, 1, 7]), n=1..50); # _Wesley Ivan Hurt_, Jul 09 2016 %t A112132 PadRight[{}, 100, {1, 3, 1, 7}] (* _Wesley Ivan Hurt_, Jul 09 2016 *) %o A112132 (PARI) a(n)=1+2*((n-1)%2)*((n-1)%4); \\ _Jaume Oliver Lafont_, Aug 28 2009; corrected by _Antti Karttunen_, Mar 31 2013 %o A112132 (PARI) a(n)=[1,3,1,7][1+(n-1)%4]; \\ _Joerg Arndt_, Apr 02 2013 %o A112132 (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 %o A112132 (Magma) &cat [[1, 3, 1, 7]^^30]; // _Wesley Ivan Hurt_, Jul 09 2016 %Y A112132 First differences of A112062. %Y A112132 Also half of the first differences of A112072. Cf. A112086. %K A112132 nonn,mult,easy %O A112132 1,2 %A A112132 _Antti Karttunen_, Aug 28 2005