cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • 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
    -- Reinhard Zumkeller, Aug 26 2013, Apr 03 2013
    
  • 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 */

Formula

Max{A046920(k): k <= a(n)} + 1 < A046920(a(n)). - Reinhard Zumkeller, Aug 26 2013, Apr 03 2013

Extensions

Better description and more terms from Jud McCranie, Jun 16 2000
Invalid first term removed by Donovan Johnson, Aug 24 2013