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!)
A351318 a(n) is the least prime prime(k), k > n, such that A036689(k) or A036690(k) is s(n) + s(n+1) + ... + s(j), j < k, where each s(i) is either A036689(i) or A036690(i) 1
3, 7, 13, 31, 47, 47, 53, 53, 73, 137, 103, 131, 109, 137, 239, 257, 229, 349, 257, 269, 331, 347, 389, 409, 257, 389, 251, 229, 499, 487, 509, 491, 541, 487, 353, 739, 571, 743, 727, 307, 883, 743, 929, 827, 971, 911, 887, 569, 1063, 751, 1013, 883, 1451, 977, 1259, 853, 983, 947, 967, 1049 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) is the least prime p such that p*(p-1) or p*(p+1) is the sum of a sequence where each term is either prime(i)*(prime(i)-1) or prime(i)*(prime(i)+1), for i from n to some j.
LINKS
EXAMPLE
a(3) = 13 because prime(3) = 5, the next two primes are 7 and 11, and 5*6 + 7*6 + 11*10 = 182 = 13*14.
MAPLE
P:= select(isprime, [2, seq(i, i=3..10^6, 2)]):
R:= convert(map(p -> (p*(p-1), p*(p+1)), P), set):
f:= proc(n) local S, T, SR, i, s;
S:= {P[n]*(P[n]-1), P[n]*(P[n]+1)};
for i from n+1 do
T:= [P[i]*(P[i]-1), P[i]*(P[i]+1)];
S:= map(s -> (s+T[1], s+T[2]), S);
SR:= S intersect R;
if SR <> {} then
s:= (sqrt(1+4*min(SR))-1)/2;
if isprime(s) then return s else return s+1 fi
fi
od
end proc:
map(f, [$1..100]);
CROSSREFS
Sequence in context: A163418 A309738 A161218 * A068679 A006978 A060424
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Mar 18 2022
STATUS
approved

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 03:08 EDT 2024. Contains 371918 sequences. (Running on oeis4.)