login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A135203
For any integer n >= 1 the sequence gives the minimum power x for which n^x+(n-1)^x+(n-2)^x+...+1^x produces a perfect square.
1
1, 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
OFFSET
1,2
COMMENTS
All 3's apart from 1's in positions given by A001108 and 2 for n=24.
LINKS
EXAMPLE
n=4 -> 4^3+3^3+2^3+1^3 = 64+27+8+1 = 100
n=5 -> 5^3+4^3+3^3+2^3+1^3 = 125+64+27+8+1 = 225
n=6 -> 6^3+5^3+4^3+3^3+2^3+1^3 = 216+125+64+27+8+1 = 441
MAPLE
P:=proc(n) local a, i, k, j, ok, x; for i from 1 by 1 to n do x:=1; ok:=1; while ok=1 do a:=0; k:=i; while k>0 do a:=a+k^x; k:=k-1; od; if (trunc(sqrt(a)))^2=a then print(x); ok:=0; else x:=x+1; fi; od; od; end: P(100);
PROG
(PARI) A135203(n) = for(x=1, oo, if(issquare(sum(k=1, n, k^x)), return(x))); \\ Antti Karttunen, Sep 27 2018
CROSSREFS
Cf. A001108.
Sequence in context: A251551 A073139 A122845 * A251552 A379054 A324497
KEYWORD
easy,nonn
AUTHOR
EXTENSIONS
Offset and a typo in the definition corrected by Antti Karttunen, Sep 27 2018
STATUS
approved