[go: up one dir, main page]

login
A047216
Numbers that are congruent to {1, 2} mod 5.
24
1, 2, 6, 7, 11, 12, 16, 17, 21, 22, 26, 27, 31, 32, 36, 37, 41, 42, 46, 47, 51, 52, 56, 57, 61, 62, 66, 67, 71, 72, 76, 77, 81, 82, 86, 87, 91, 92, 96, 97, 101, 102, 106, 107, 111, 112, 116, 117, 121, 122, 126, 127, 131, 132, 136, 137, 141, 142, 146, 147
OFFSET
1,2
COMMENTS
Equivalently, numbers ending in 1, 2, 6 and 7. - Bruno Berselli, Sep 04 2018
FORMULA
a(n) = 5*n-a(n-1)-7 for n>1, with a(1)=1. - Vincenzo Librandi, Aug 05 2010
G.f.: x*(1+x+3*x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
From Bruno Berselli, Mar 10 2012: (Start)
a(n) = (10*n-3*(-1)^n-9)/4.
a(n) = - A176059(n) + Sum_{i=0..n-1} A176059(i). (End)
From Wesley Ivan Hurt, Dec 29 2016: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 3.
a(2*k) = 5*k-3, a(2*k-1) = 5*k-4. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(2-2*sqrt(5)/5)*Pi/10 + log(phi)/sqrt(5), where phi is the golden ratio (A001622). - Amiram Eldar, Dec 07 2021
E.g.f.: 3 + ((5*x - 9/2)*exp(x) - (3/2)*exp(-x))/2. - David Lovler, Aug 23 2022
MAPLE
A047216:=n->(10*n-3*(-1)^n-9)/4: seq(A047216(n), n=1..100); # Wesley Ivan Hurt, Dec 29 2016
MATHEMATICA
Select[Range[0, 200], MemberQ[{1, 2}, Mod[#, 5]] &] (* Vladimir Joseph Stephan Orlovsky, Feb 12 2012 *)
PROG
(PARI) a(n)=(n-1)\2*5+2-n%2 \\ Charles R Greathouse IV, Dec 22 2011
(Magma) [(10*n-3*(-1)^n-9)/4 : n in [1..100]]; // Wesley Ivan Hurt, Dec 29 2016
CROSSREFS
KEYWORD
nonn,easy
STATUS
approved