A129699 Least nonnegative m such that P(n+3,n) + P(n+3,m) is prime where P(k,n) is n-th k-gonal number, or -1 if no such value exists.
2, 1, 0, 4, 2, 2, 4, 4, 2, 4, 3, 6, 73, 4, 3, 16, 9, 6, 7, 2, 17, 10, 3, 2, 10, 2, 36, 58, 9, 2, 7, 4, 6, 82, 3, 2, 25, 4, 11, 10, 2, 6, 43, 2, 14, 46, 11, 38, 37, 2, 32, 130, 14, 2, 28, 2, 5, 28, 4, 14, 37, 16, 24, 16, 2, 2, 40, 4, 2, 10, 8, 6, 46, 22, 3, 28, 5, 18, 16, 2, 26, 10, 19, 12, 10, 8
Offset: 0
Links
- Eric Weisstein's World of Mathematics, Polygonal Number.
Programs
-
Maple
P := proc(k,n) n/2*((k-2)*n-k+4) ; end: A129699 := proc(n) for m from 0 to 100000 do if isprime(P(n+3,n)+P(n+3,m)) then RETURN(m) ; fi ; od: RETURN(-1) ; end: for n from 0 to 200 do printf("%d,",A129699(n)) ; od: # R. J. Mathar, Jun 12 2008
Formula
a(n) = min{m: m-th (n+3)-gonal number + n-th (n+3)-gonal number is prime}.
Extensions
Corrected and extended by R. J. Mathar, Jun 12 2008
Comments