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.

A073852 a(1) = 1, then smallest square not included earlier such that every partial sum is a prime.

Original entry on oeis.org

1, 4, 36, 576, 144, 2916, 324, 1296, 900, 2304, 3600, 7056, 1764, 8100, 4356, 5184, 9216, 6084, 14400, 15876, 10404, 22500, 20736, 11664, 24336, 12996, 19044, 17424, 32400, 41616, 44100, 28224, 34596, 36864, 54756, 30276, 26244, 46656, 39204
Offset: 1

Views

Author

Amarnath Murthy, Aug 15 2002

Keywords

Crossrefs

Cf. A073854.

Programs

  • Maple
    R:= 1: cands:= [seq(i^2,i=2..10^6)]: nc:= 10^6-1: s:= 1: found:= true:
    for n from 2 to 100 while found do
      found:= false;
      for j from 1 to nc do
        if isprime(s+cands[j]) then
          found:= true; R:= R, cands[j];
          s:= s+cands[j];
          cands:= subsop(j=NULL,cands);
          break
        fi
    od od:
    R; # Robert Israel, Apr 09 2023
  • PARI
    v=[1]; n=1; while(n<10^3, if(isprime(n^2+vecsum(v))&&!vecsearch(vecsort(v), n^2), v=concat(v, n^2); n=1); n++); v \\ Derek Orr, Jun 06 2015

Extensions

Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 24 2003