A230462 Numbers congruent to {1, 11, 13, 17, 19, or 29} mod 30.
1, 11, 13, 17, 19, 29, 31, 41, 43, 47, 49, 59, 61, 71, 73, 77, 79, 89, 91, 101, 103, 107, 109, 119, 121, 131, 133, 137, 139, 149, 151, 161, 163, 167, 169, 179, 181, 191, 193, 197, 199, 209, 211, 221, 223, 227, 229, 239, 241, 251, 253, 257, 259, 269
Offset: 1
Links
- Iain Fox, Table of n, a(n) for n = 1..10000
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,1,-1).
Programs
-
Magma
[n : n in [0..400] | n mod 30 in [1, 11, 13, 17, 19, 29]]; // Wesley Ivan Hurt, Jul 22 2016
-
Maple
A230462:=n->30*floor(n/6)+[1, 11, 13, 17, 19, 29][(n mod 6)+1]: seq(A230462(n), n=0..100); # Wesley Ivan Hurt, Jul 22 2016
-
Mathematica
LinearRecurrence[{1,0,0,0,0,1,-1},{1,11,13,17,19,29,31},60] (* Harvey P. Dale, Dec 01 2015 *) ParallelCombine[Select[#, MemberQ[{1, 11, 13, 17, 19, 29}, Mod[#, 30]] &] &, Range[10^4]] (* Mikk Heidemaa, Dec 12 2017 *) CoefficientList[ Series[(1 + 10x + 2x^2 + 4x^3 + 2x^4 + 10x^5 + x^6)/((-1 + x)^2 (1 + x + x^2 + x^3 + x^4 + x^5)), {x, 0, 60}], x] (* Robert G. Wilson v, Jan 09 2018 *)
-
PARI
a(n)=n\6*30+[-1,1,11,13,17,19][n%6+1] \\ Charles R Greathouse IV, Oct 29 2013
-
PARI
first(n) = Vec(x*(1 + 10*x + 2*x^2 + 4*x^3 + 2*x^4 + 10*x^5 + x^6)/((1 + x)*(1 + x + x^2)*(x^2 - x + 1)*(x - 1)^2) + O(x^(n+1))) \\ Iain Fox, Dec 29 2017
Formula
G.f.: x*(1+10*x+2*x^2+4*x^3+2*x^4+10*x^5+x^6) / ( (1+x)*(1+x+x^2)*(x^2-x+1)*(x-1)^2 ). - R. J. Mathar, Jul 07 2015
From Wesley Ivan Hurt, Jul 22 2016: (Start)
a(n) = a(n-1) + a(n-6) - a(n-7) for n>7; a(n) = a(n-6) + 30 for n>6.
a(n) = (30*n - 15 - 6*cos(n*Pi/3) + 6*cos(2*n*Pi/3) + 9*cos(n*Pi) + 6*sqrt(3)*sin(n*Pi/3) - 2*sqrt(3)*sin(2*n*Pi/3))/6.
a(6k) = 30k-1, a(6k-1) = 30k-11, a(6k-2) = 30k-13, a(6k-3) = 30k-17, a(6k-4) = 30k-19, a(6k-5) = 30k-29. (End)
a(n) = 5*n + ceiling(7/79 - ((((14654/4883)^n mod 6) mod 5) + n mod 3 + 1) mod 7). - Mikk Heidemaa, Dec 13 2017
a(n + 6) = a(n) + 30. - David A. Corneth, Jan 15 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = (cot(Pi/30) - sec(2*Pi/15) * tan(Pi/15)) * Pi/30. - Amiram Eldar, Jul 29 2024
Extensions
New name and initial term from Omar E. Pol, Oct 27 2013
Comments