|
|
A016067
|
|
Consider all ways of writing a number as p+2m^2 where p is 1 or a prime and m >= 0; sequence gives numbers that are expressible in at least 2 more ways than any smaller number.
|
|
7
|
|
|
139, 181, 619, 2341, 3331, 4189, 4801, 5911, 6319, 8251, 9751, 11311, 12739, 13051, 15889, 20641, 21349, 22741, 23659, 24079, 32191, 33631, 39961, 42871, 45769, 56131, 57511, 65341, 71839, 80149, 90919, 95989, 99181, 105271, 119131, 130651, 157261, 167359
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
PROG
|
(Haskell)
import Data.List (findIndices)
a016067 n = a016067_list !! (n-1)
a016067_list = (map (+ 1) $ findIndices (> 1) $
zipWith (-) (tail rs) rs where rs = scanl max 0 a046920_list
(PARI) /* finds first 80 terms */ mx=6023671; v=vector(mx); p=vector(414391); p[1]=1; pr=1; for(j=2, 414391, pr=nextprime(pr+1); p[j]=pr); for(m=0, 1735, m2=2*m^2; for(j=1, 414391, s=m2+p[j]; if(s<=mx, v[s]++, next(2)))); c=0; n=0; for(j=1, mx, if(v[j]>c, if(v[j]>=c+2, n++; write("b016067.txt", n " " j)); c=v[j])) /* Donovan Johnson, Aug 24 2013 */
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Better description and more terms from Jud McCranie, Jun 16 2000
|
|
STATUS
|
approved
|
|
|
|