login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A139324 Difference between two sequences of primes which indicate two different kinds of places in the prime sequence with some vanishing third-order difference. 1

%I #11 Jan 30 2021 01:51:06

%S 4,4,4,4,6,4,6,4,4,6,6,6,8,6,4,4,6,8,8,6,6,4,4,4,4,6,4,6,4,6,4,8,6,4,

%T 4,6,4,10,4,6,4,6,18,12,4,4,6,6,4,6,6,8,10,12,8,6,4,6,6,8,4,12,4,4,6,

%U 6,8,4,4,4,4,6,12

%N Difference between two sequences of primes which indicate two different kinds of places in the prime sequence with some vanishing third-order difference.

%C There are two sequences of primes at which two third-order differences vanish:

%C one is b(n) = 23, 41, 47, 71, 89, 233, ... which contains all primes prime(n) such that prime(n-2) - 3*prime(n-1) + 3*prime(n) - prime(n+1) = 0;

%C the other is A139313(n) = 19, 37, 43, ... such that -prime(n-1) + 3*prime(n) - 3*prime(n+1) - prime(n+2) = 0.

%C Then by definition a(n) = b(n) - A139313(n).

%e 23 - 19 = 4 = a(1). 41 - 37 = 4 = a(2). 47 - 43 = 4 = a(3).

%p A139324a := proc(n) if n = 1 then 23; else a := nextprime(procname(n-1)) ; while (true ) do if prevprime(prevprime(a))-3*prevprime(a)+3*a-nextprime(a) =0 then return a; end if; a := nextprime(a) ; end do: end if; end proc:

%p A139313 := proc(n) if n = 1 then 19; else a := nextprime(procname(n-1)) ; while (true ) do if -prevprime(a)+3*a-3*nextprime(a)+nextprime(nextprime(a)) = 0 then return a; end if; a := nextprime(a) ; end do: end if; end proc:

%p A139324 := proc(n) A139324a(n)-A139313(n) ; end proc:

%p seq(A139324(n),n=1..80) ; # _R. J. Mathar_, Jun 15 2011

%t Flatten[Table[If[ Prime[ -2 +n] - 3 Prime[ -1 + n] + 3 Prime[n] - 1 Prime[1 + n] == 0, Prime[n], {}], {n, 3, 500}]] - Flatten[ Table[If[ -Prime[ -1 + n] + 3*Prime[n] - 3*Prime[1 + n] + Prime[n + 2] == 0, Prime[n], {}], {n, 2, 500}]]

%K nonn,less

%O 1,1

%A _Roger L. Bagula_, Jun 07 2008

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)