login
a(n) = 30*n + 1.
16

%I #68 Sep 08 2022 08:45:30

%S 1,31,61,91,121,151,181,211,241,271,301,331,361,391,421,451,481,511,

%T 541,571,601,631,661,691,721,751,781,811,841,871,901,931,961,991,1021,

%U 1051,1081,1111,1141,1171,1201,1231,1261,1291,1321,1351,1381,1411,1441,1471

%N a(n) = 30*n + 1.

%C Possible upper bounds of twin primes pairs ending in 1: For a 30k + r "wheel", k > 0, r = 1, 13, 19 are the only possible values that can form an upper bound of a twin prime pair. The 30k+r wheel gives the sequence 1, 7, 11, 13, 17, 19, 23, 29 31, 37, 41, 43, 47, 49, 53, 59, ... which is frequently used in prime number sieves to skip multiples of 2, 3, 5. The fact that subtracting 2 from 30k+7, 11, 17, 23 will give us a multiple of 3 or 5 precludes these numbers from being an upper bound of a twin prime pair. This leaves us with r = 1, 13, 19 for k > 0 as the only possible cases to form an upper bound of a twin prime pair. 1, 13, 19 concludes the 6 numbers of the 8 number wheel that can form part of a twin prime pair.

%H Vincenzo Librandi, <a href="/A128470/b128470.txt">Table of n, a(n) for n = 0..2000</a>

%H Albert van der Horst, <a href="http://home.hccnet.nl/a.w.m.van.der.horst/hcc96.txt">Counting Twin Primes</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1).

%F a(n) = 2*a(n-1) - a(n-2) for n > 1. - _Vincenzo Librandi_, Dec 30 2014

%F G.f.: (1 + 29*x)/(1 - x)^2. - _Vincenzo Librandi_, Dec 30 2014

%F E.g.f.: (1 + 30*x)*exp(x). - _G. C. Greubel_, Apr 04 2016

%e 61 = 30 * 2 + 1, the upper part of the twin prime pair 59, 61.

%t Range[1, 3001, 30] (* _Vladimir Joseph Stephan Orlovsky_, Jun 15 2011 *)

%t CoefficientList[Series[(1 + 29 x) / (1 - x)^2, {x, 0, 40}], x] (* _Vincenzo Librandi_, Dec 30 2014 *)

%t LinearRecurrence[{2, -1}, {1, 31}, 100] (* _G. C. Greubel_, Apr 04 2016 *)

%o (Magma) [30*n+1: n in [0..50]]; // _Vincenzo Librandi_, Jun 16 2011

%o (PARI) a(n)=30*n+1 \\ _Charles R Greathouse IV_, Oct 07 2015

%o (Scala) (0 to 49).map(30 * _ + 1) // _Alonso del Arte_, Jun 02 2019

%Y Cf. A161700, A005408, A016813, A016921, A017281, A017533, A158057, A161705, A161709, A161714.

%K nonn,easy

%O 0,2

%A _Cino Hilliard_, May 06 2007