[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
A073852
a(1) = 1, then smallest square not included earlier such that every partial sum is a prime.
3
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,2
LINKS
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
PROG
(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
CROSSREFS
Cf. A073854.
Sequence in context: A132687 A364152 A238844 * A139033 A370753 A001044
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Aug 15 2002
EXTENSIONS
Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 24 2003
STATUS
approved