A131229 Numbers congruent to {1,7} mod 10.
1, 7, 11, 17, 21, 27, 31, 37, 41, 47, 51, 57, 61, 67, 71, 77, 81, 87, 91, 97, 101, 107, 111, 117, 121, 127, 131, 137, 141, 147, 151, 157, 161, 167, 171, 177, 181, 187, 191, 197, 201, 207, 211, 217, 221, 227, 231, 237, 241, 247, 251, 257, 261, 267, 271, 277, 281
Offset: 1
Examples
11 = a(3) = 1 mod 10. 11 = a(3) = row 4 sums, triangle A131228: (1 + 3 + 7).
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
-
Mathematica
Select[Range[300],MemberQ[{1,7},Mod[#,10]]&] (* or *) LinearRecurrence[ {1,1,-1},{1,7,11},60] (* Harvey P. Dale, May 20 2012 *)
-
PARI
is(n)=n%10==1 || n%10==7 \\ Charles R Greathouse IV, Jul 16 2013
Formula
From R. J. Mathar, Apr 17 2008: (Start)
a(n) = a(n-2) + 10 = 5*n + ((-1)^n - 7)/2.
G.f.: x*(1 + 6*x + 3*x^2)/((-1+x)^2*(1+x)). (End)
a(n) = 10*n - a(n-1) - 12 with n > 1, a(1)=1. - Vincenzo Librandi, Nov 23 2010
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 3; a(1)=1, a(2)=7, a(3)=11. - Harvey P. Dale, May 20 2012
a(n) = A063097(n) for n >= 2. - Georg Fischer, Nov 02 2018
E.g.f.: 3 + ((10*x - 7)*exp(x) + exp(-x))/2. - David Lovler, Sep 07 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt((5+sqrt(5))/2)*Pi/10 + 3*log(phi)/(2*sqrt(5)), where phi is the golden ratio (A001622). - Amiram Eldar, Apr 15 2023
Extensions
More terms from R. J. Mathar, Apr 17 2008
Comments