login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A342253 a(n) = (n-6)*sqrt((n-5)^2) + 2*n + 31. 0
13, 23, 31, 37, 41, 43, 47, 53, 61, 71, 83, 97, 113, 131, 151, 173, 197, 223, 251, 281, 313, 347, 383, 421, 461, 503, 547, 593, 641, 691, 743, 797, 853, 911, 971, 1033, 1097, 1163, 1231, 1301, 1373, 1447, 1523, 1601 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Euler's expression f(n) = n^2 - n + 41 generates 40 consecutive terms that are prime, but this sequence contains 44 consecutive terms that are prime.

The first differences of Euler's polynomial are the even numbers 2 and up. This sequence extends backwards for four further terms in a similar way:

    terms:       13  23  31  37  41  43  47  53  61  71 ...

1st differences:   10   8   6   4   2   4   6   8  10   ...

2nd differences:     -2  -2  -2  -2   2   2   2   2     ...

So this sequence consists of two quadratic pieces: one with 2nd differences -2, the other with second differences +2.

The terms that are primes from Euler's expression are 41, 43, 47, 53, 61, ...; each of these can be obtained by adding to 41 the product of 2 and the sum of the first k nonnegative integers:

  41 + 2*(0)                 = 41 (prime)

  41 + 2*(0 + 1)             = 43 (prime)

  41 + 2*(0 + 1 + 2)         = 47 (prime)

  41 + 2*(0 + 1 + 2 + 3)     = 53 (prime)

  41 + 2*(0 + 1 + 2 + 3 + 4) = 61 (prime)

etc. The sum of the first k nonnegative integers is (k-1)*k/2, and adding 41 to twice that sum gives 2*(k-1)*k/2 + 41 = k^2 - k + 41.

Also, for k = 1..5, subtracting 2 times the sum of the first k positive integers from 43 gives 5 primes in a row:

  43 - 2*(1)                 = 41 (prime)

  43 - 2*(1 + 2)             = 37 (prime)

  43 - 2*(1 + 2 + 3)         = 31 (prime)

  43 - 2*(1 + 2 + 3 + 4)     = 23 (prime)

  43 - 2*(1 + 2 + 3 + 4 + 5) = 13 (prime)

(The next term in the above sequence, 43 - 2*(1 + 2 + 3 + 4 + 5 + 6) = 1, is not a prime number.)

So this sequence is piecewise quadratic and consists of two overlapping quadratic subsequences: one contains the 5 terms 13, 23, 31, 37, 41, while the other contains the 40 terms from Euler's expression, i.e., 41, 43, 47, ..., 1601, and there is one overlapping term (41), for a total of 5 + 40 - 1 = 44 terms, all of which are prime.

LINKS

Table of n, a(n) for n=1..44.

Index entries for linear recurrences with constant coefficients, signature (3,-3,1).

FORMULA

a(n) = (n-6)*sqrt((n-5)^2) + 2*n + 31.

From Jon E. Schoenfield, Mar 18 2021: (Start)

a(n) = -n^2 + 13*n +  1 for n <= 5,

        n^2 -  9*n + 61 for n >= 5.

(Note that the formulas for both pieces of this piecewise quadratic formula hold at n = 5.) (End)

G.f.: x*(13 - 16*x + x^2 + 4*x^6)/(1 - x)^3. - Stefano Spezia, Mar 09 2021

MAPLE

seq((n-6)*abs(n-5) + 2*n + 31, n = 1..44); # Peter Luschny, Mar 19 2021

MATHEMATICA

Rest@ CoefficientList[Series[x (13 - 16 x + x^2 + 4 x^6)/(1 - x)^3, {x, 0, 44}], x] (* or *)

Block[{$MaxExtraPrecision = 1000}, Array[(# - 6) Sqrt[(# - 5)^2] + 2 # + 31 &, 44]] (* Michael De Vlieger, Mar 17 2021 *)

CROSSREFS

Cf. A005846.

Sequence in context: A303576 A228324 A171122 * A296806 A143788 A165459

Adjacent sequences:  A342250 A342251 A342252 * A342254 A342255 A342256

KEYWORD

nonn,easy

AUTHOR

Youichiro Murakami, Mar 07 2021

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 16 21:15 EDT 2021. Contains 345080 sequences. (Running on oeis4.)