A295973
Primes introducing new second differences in A036263.
Original entry on oeis.org
3, 5, 7, 11, 29, 31, 113, 127, 139, 149, 509, 523, 541, 907, 1069, 1087, 1151, 1327, 1361, 1543, 1669, 1933, 1951, 2971, 2999, 3163, 5381, 5749, 6421, 7963, 9551, 10007, 14143, 15683, 15727, 15823, 16183, 19373, 19609, 20809, 25471, 28277, 28351, 31397, 31469, 31957, 34061, 34123, 35671
Offset: 1
The new values in A036263 are 1, 0, 2, -2, -4, 4, 10, -10, 8, -8, ... at indices 1, 2, 3, 4, 9, 10, 29, 30, ... and the middle primes of the prime triple starting at these indices are 3, 5, 7, 11, 29, ...
-
A036263s := proc(maxn)
s := {} ;
for n from 1 to maxn do
s := s union {A036263(n)} ;
end do:
s ;
end proc:
A295973a := proc(n)
if n = 1 then
return 2;
end if;
p := nextprime(procname(n-1)) ;
pidx := numtheory[pi](p) ;
while true do
candD := A036263(pidx) ;
if not candD in A036263s(pidx-1) then
return ithprime(pidx) ;
end if ;
pidx := pidx+1 ;
end do:
end proc:
A295973 := proc(n)
nextprime(A295973a(n)) ;
end proc:
seq(A295973(n),n=1..40) ; # R. J. Mathar, Jan 06 2018
A316791
a(n) is the least prime p such that the second forward difference of three consecutive primes p, q and r is n = (p - 2q + r)/2.
Original entry on oeis.org
3, 5, 29, 503, 137, 109, 1063, 1931, 521, 7951, 1949, 1667, 5743, 2969, 1321, 15817, 9547, 28349, 45433, 20807, 15679, 113837, 43793, 19603, 40283, 25469, 40637, 156151, 79697, 34057, 282487, 134507, 552401, 770663, 31393, 188021, 480203, 461707, 281429, 1078241, 265619, 637937
Offset: 0
a(0) = 3 since the three consecutive primes {3, 5, 7} have an sfd of 0;
a(1) = 5 since the three consecutive primes {5, 7, 11} have an sfd of 2;
a(2) = 29 since the three consecutive primes {29, 31, 37} have an sfd of 4;
a(3) = 503 since the three consecutive primes {503, 509, 521} have an sfd of 6;
a(4) = 137 since the three consecutive primes {137, 139, 149} have an sfd of 8; etc.
-
p = 2; q = 3; r = 5; t[_] := 0; While[p < 1100000, d = p - 2q + r; If[ t[d] == 0, t[d] = p]; p = q; q = r; r = NextPrime@ r]; Array[ t[2#] &, 42, 0]
-
a(n) = my(p=2, q=3); while ((p - 2*q + nextprime(q+1))/2 != n, p=q; q=nextprime(q+1)); p; \\ Michel Marcus, Mar 08 2023
A316792
a(n) is the least prime p such that the second forward difference of three consecutive primes p, q and r is n = -(p - 2q + r)/2.
Original entry on oeis.org
3, 7, 23, 1531, 139, 113, 523, 1069, 887, 6397, 1129, 3137, 5351, 2971, 1327, 14107, 9973, 19333, 84871, 16141, 15683, 73189, 31907, 28229, 35617, 35677, 44293, 43331, 107377, 34061, 221327, 134513, 31397, 480209, 173359, 332317, 933073, 736279, 265621, 843911, 404851, 155921
Offset: 0
a(0) = 3 since the three consecutive primes {3, 5, 7} have an sfd of 0;
a(1) = 7 since the three consecutive primes {7, 11, 13} have a sfd of -2;
a(2) = 23 since the three consecutive primes {23, 29, 31} have a sfd of -4;
a(3) = 1531 since the three consecutive primes {1531, 1543, 1549} have an sfd of -6;
a(4) = since the three consecutive primes {} have an sfd of -8; etc.
-
p = 2; q = 3; r = 5; t[_] := 0; While[p < 1000000, d = p - 2q + r; If[ t[d] == 0, t[d] = p]; p = q; q = r; r = NextPrime@ r]; Array[ t[-2#] &, 42, 0]
-
a(n) = my(p=2, q=3); while ((p - 2*q + nextprime(q+1))/2 != -n, p=q; q=nextprime(q+1)); p; \\ Michel Marcus, Mar 08 2023
Showing 1-3 of 3 results.
Comments