A376614 a(n) is the least n-gonal number that is an interprime, i.e. the average of two consecutive primes.
6, 4, 12, 6, 18, 21, 9, 370, 30, 12, 405, 39, 15, 45, 231, 18, 2619, 2772, 21, 205, 596, 69, 72, 26, 154, 81, 574, 30, 441, 93, 315, 34, 102, 105, 108, 111, 39, 1377, 120, 42, 1485, 129, 45, 1990, 138, 465, 144, 50, 150, 4564, 515, 19684, 1120, 56, 334, 846, 861, 60, 180, 5474, 186, 64, 192, 195
Offset: 3
Keywords
Examples
a(5) = 12 because 12 = A000326(3) is a pentagonal number and is the average of consecutive primes 11 and 13, and neither of the previous pentagonal numbers (1 and 5) are averages of consecutive primes.
Links
- Robert Israel, Table of n, a(n) for n = 3..10000
Programs
-
Maple
f:= proc(s) local n,x; for n from 1 do x:= ((s-2)*n^2 - (s-4)*n)/2; if x >= 4 and not isprime(x) and prevprime(x) + nextprime(x) = 2*x then return x fi od end proc: map(f, [$3..100]);
Comments