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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A268428 a(n) = (3*(n^2+n+99)+cos(Pi*n/2)-sin(Pi*n/2))/2. 2
149, 151, 157, 167, 179, 193, 211, 233, 257, 283, 313, 347, 383, 421, 463, 509, 557, 607, 661, 719, 779, 841, 907, 977, 1049, 1123, 1201, 1283, 1367, 1453, 1543, 1637, 1733, 1831, 1933, 2039, 2147, 2257, 2371, 2489, 2609, 2731, 2857, 2987, 3119 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

First 20 terms are primes with periodic second order differences (4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4) which continue onwards.

The number of prime and nonprime terms is equal at a(1809): 905, a(1811): 906,  a(1817): 909, a(1819): 910, a(1821): 911, a(1823): 912, a(1825): 913, a(1827): 914, a(1829): 915, and at a(1837): 919 (i.e. 919 prime and 919 nonprime terms among the total 1838 terms).

Single longer blocks containing only primes include 20, 14, 12, and 11 terms (in range n=0...10^8) while the longest block of nonprime terms in this range has length 78.

LINKS

Colin Barker, Table of n, a(n) for n = 0..1000

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

FORMULA

G.f.: (-149x^4 + 296x^3 - 300x^2 + 296x - 149)/((x-1)^3*(x^2+1)).

a(n) = 2*floor(3*n*(n + 1)/4) + 149.

a(n) = A007310(n(n + 1)/2 + 50).

a(n) = (3*(n^2+n+99)+(-1)^binomial(n+1,2))/2. (Suggested by Michel Marcus)

a(n) - a(-n-1) = 0. - Altug Alkan, Feb 04 2016

a(n) = ((1/4+i/4)*((297-297*i)-i*(-i)^n+i^n)+(3*n)/2+(3*n^2)/2) where i is the imaginary unit. - Colin Barker, Feb 09 2016

MATHEMATICA

Table[2*Floor[3*n*(n+1)/4] + 149, {n, 0, 10000}] (* Efficient. *)

Table[(3*(n^2+n+99)+Cos[Pi*n/2]-Sin[Pi*n/2])/2, {n, 0, 1000}](* or *)

LinearRecurrence[{3, -4, 4, -3, 1}, {149, 151, 157, 167, 179}, 1000]

CoefficientList[Series[(-149 x^4 + 296 x^3 - 300 x^2 + 296 x - 149) / ((x - 1)^3 (x^2 + 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Feb 05 2016 *)

PROG

(PARI) Vec((-149*x^4 + 296*x^3 - 300*x^2 + 296*x - 149)/((x-1)^3*(x^2+1)) + O(x^60)) \\ Michel Marcus, Feb 04 2016

(PARI) a(n) = ((1/4+I/4)*((297-297*I)-I*(-I)^n+I^n)+(3*n)/2+(3*n^2)/2) \\ Colin Barker, Feb 09 2016

CROSSREFS

Cf. A007310 (subsequence), A087960.

Sequence in context: A263554 A248412 A182874 * A190654 A308895 A100723

Adjacent sequences:  A268425 A268426 A268427 * A268429 A268430 A268431

KEYWORD

nonn,easy

AUTHOR

Mikk Heidemaa, Feb 04 2016

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 December 8 07:52 EST 2021. Contains 349593 sequences. (Running on oeis4.)