A087445 Numbers that are congruent to 1 or 5 mod 12.
1, 5, 13, 17, 25, 29, 37, 41, 49, 53, 61, 65, 73, 77, 85, 89, 97, 101, 109, 113, 121, 125, 133, 137, 145, 149, 157, 161, 169, 173, 181, 185, 193, 197, 205, 209, 217, 221, 229, 233, 241, 245, 253, 257, 265, 269, 277, 281, 289, 293, 301, 305, 313, 317, 325, 329
Offset: 1
Links
- Jeffrey C. Lagarias, Erdős, Klarner and the 3x+ 1 Problem, Amer. Math. Monthly, Vol. 123, No. 8 (2016), pp. 753-776.
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
Programs
-
Magma
[k:k in [1..330]| k mod 12 in [1,5]]; // Marius A. Burtea, Feb 08 2020
-
Maple
seq(6*(n-1)-(-1)^n,n=1..100); # Robert Israel, Jun 10 2015
-
Mathematica
LinearRecurrence[{1,1,-1},{1,5,13},70] (* or *) Rest[CoefficientList[ Series[x (1+4x+7x^2)/((1+x)(1-x)^2),{x,0,70}],x]] (* Harvey P. Dale, Jun 13 2011 *)
-
PARI
a(n)=(n-1)\2*12 + [5,1][n%2+1] \\ Charles R Greathouse IV, Jun 03 2015
Formula
G.f.: x*(1+4*x+7*x^2)/((1+x)*(1-x)^2).
E.g.f.: 6*(x-1)*exp(x) + 7 - exp(-x). - corrected by Robert Israel, Jun 10 2015
a(n) = 6*(n-1) - (-1)^n. - Rolf Pleisch, Aug 04 2009
a(n) = 12*n - a(n-1) - 18 (with a(1)=1). - Vincenzo Librandi, Aug 08 2010
a(n) = a(n-1) + a(n-2) - a(n-3), with a(0)=1, a(1)=5, a(2)=13. - Harvey P. Dale, Jun 13 2011
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(3)*Pi/12 + log(2 + sqrt(3))/(2*sqrt(3)). - Amiram Eldar, Dec 28 2021
Comments