The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A270835 a(n) = smallest k such that A004431(n) +/- k are both positive squares. 1
4, 6, 12, 8, 16, 24, 10, 20, 30, 12, 24, 40, 36, 14, 48, 28, 42, 60, 16, 32, 48, 70, 64, 18, 36, 80, 54, 72, 96, 20, 40, 90, 60, 112, 80, 108, 22, 44, 66, 120, 88, 24, 110, 48, 140, 72, 132, 96, 160, 120, 26, 52, 78, 144, 180 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
There can be more than one value k such that A004431(n) +/- k are both positive squares; i.e., when there are multiple ways to express A004431(n) as the sum of positive squares. These are the terms which appear more than once in A055096. For example A004431(19) = 65 = {(1^2 + 8^2), (4^2 + 7^2)}: 65 +/- 16 = {7^2, 9^2} and 65 +/- 56 = {3^2, 11^2}. So a(19) = 16 rather than 56.
Sequence contains every even number >=4 and no odd numbers.
LINKS
EXAMPLE
a(11)=24 because A004431(11) = 40; 40+24 = 8^2 and 40-24 = 4^2.
MATHEMATICA
nn = 80; s = Select[Range[4 nn], Length[PowersRepresentations[#, 2,
2] /. {{0, _} -> Nothing, {a_, b_} /; a == b -> Nothing}] > 0 &]; Table[SelectFirst[Range[10 nn], And[IntegerQ@ Sqrt[s[[n]] + #], IntegerQ@ Sqrt[s[[n]] - #]] &], {n, nn}] (* Michael De Vlieger, Mar 24 2016, Version 10 *)
PROG
(PARI) issum(n)=if(n<5, return(0)); my(f=factor(n)%4); if(vecmin(f[, 1])>1, return(0)); for(i=1, #f[, 1], if(f[i, 1]==3 && f[i, 2]%2, return(0))); 1; \\ after A004431
findk(n) = {for (k=1, n, if (issquare(n+k) && issquare(n-k), return (k)); ); }
lista(nn) = {for (n=1, nn, if (issum(n), print1(findk(n), ", "); ); ); } \\ Michel Marcus, Mar 31 2016
CROSSREFS
Sequence in context: A293836 A278252 A274298 * A272063 A152678 A110758
KEYWORD
nonn
AUTHOR
Bob Selcoe, Mar 23 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 20 02:39 EDT 2024. Contains 372703 sequences. (Running on oeis4.)