A047225 Numbers that are congruent to {0, 1} mod 6.
0, 1, 6, 7, 12, 13, 18, 19, 24, 25, 30, 31, 36, 37, 42, 43, 48, 49, 54, 55, 60, 61, 66, 67, 72, 73, 78, 79, 84, 85, 90, 91, 96, 97, 102, 103, 108, 109, 114, 115, 120, 121, 126, 127, 132, 133, 138, 139, 144, 145, 150
Offset: 1
Links
- David Lovler, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
Programs
-
Maple
a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=a[n-2]+6 od: seq(a[n], n=0..50); # Zerinvary Lajos, Mar 16 2008
-
Mathematica
{#,#+1}&/@(6Range[0,30])//Flatten (* or *) LinearRecurrence[{1,1,-1},{0,1,6},60] (* Harvey P. Dale, Aug 24 2019 *)
-
PARI
forstep(n=0,200,[1,5],print1(n", ")) \\ Charles R Greathouse IV, Oct 17 2011
Formula
From R. J. Mathar, Feb 23 2008: (Start)
O.g.f.: 1/(1+x) + 3/(-1+x)^2 + 4/(-1+x).
a(n) = a(n-2) + 6, n >= 2. (End)
a(n) = 6*n - a(n-1) - 11 for n>1, a(1)=0. - Vincenzo Librandi, Aug 05 2010
Sum_{n>=2} (-1)^n/a(n) = sqrt(3)*Pi/12 + log(2)/3 + log(3)/4. - Amiram Eldar, Dec 13 2021
E.g.f.: 5 + (3*x - 4)*exp(x) - exp(-x). - David Lovler, Aug 25 2022
Extensions
Formula corrected by Paolo P. Lava, Oct 12 2010
Comments