A160053 Duplicate of A140612.
0, 1, 4, 8, 9, 16, 17, 25, 36, 40, 49, 52, 64, 72, 73, 80, 81, 89, 97, 100, 116, 121, 136
Offset: 1
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.
E.g. 51^2 - 1 = 10^2 + 50^2 = 22^2 + 46^2 = 34^2 + 38^2.
t={}; Do[i=c=1; While[iJayanta Basu, Jun 01 2013 *) Select[Range@ 1000, Length[PowersRepresentations[#^2 - 1, 2, 2] /. {0, } -> Nothing] > 0 &] (* _Michael De Vlieger, Apr 13 2016 *)
select( {is_A050795(n)=#qfbsolve(Qfb(1,0,1),n^2-1,2)}, [1..999]) \\ M. F. Hasler, Mar 07 2022
from itertools import islice, count from sympy import factorint def A050795_gen(startvalue=2): # generator of terms >= startvalue for k in count(max(startvalue,2)): if all(map(lambda d: d[0] % 4 != 3 or d[1] % 2 == 0, factorint(k**2-1).items())): yield k A050795_list = list(islice(A050795_gen(),20)) # Chai Wah Wu, Mar 07 2022
isA001481(n)=my(f=factor(n)); for(i=1, #f[, 1], if(f[i, 2]%2 && f[i, 1]%4==3, return(0))); 1 is(n)=isA001481(n) && isA001481(8*n+1) && isA001481(8*n+2) \\ Charles R Greathouse IV, May 17 2018
[k:k in [0..33000]| forall{k+a: a in [0,1,2,4]|NormEquation(1, k+a) eq true}]; // Marius A. Burtea, Oct 08 2019
ss:= proc(n) option remember; andmap(t -> t[2]::even or t[1] mod 4 <> 3, ifactors(n)[2]) end proc: select(k -> ss(k) and ss(k+1) and ss(k+2) and ss(k+4), 16*[$0..10^4]); # Robert Israel, Oct 10 2019
ok[n_] := AllTrue[{0,1,2,4}, SquaresR[2, #+n] > 0 &]; Select[ Range[0, 32400], ok] (* Giovanni Resta, Oct 08 2019 *)
List([1..60], n -> (10*n*(n-1)+(2*n-1)*(-1)^n+9)/8);
[(10*n*(n-1)+(2*n-1)*(-1)^n+9)/8: n in [1..60]];
Table[(10 n (n - 1) + (2 n - 1) (-1)^n + 9)/8, {n, 1, 60}] LinearRecurrence[{1,2,-2,-1,1},{1,4,8,17,25},60] (* Harvey P. Dale, Sep 16 2022 *)
makelist((10*n*(n-1)+(2*n-1)*(-1)^n+9)/8, n, 1, 60);
Vec((1+x^2)*(1+3*x+x^2)/((1-x)^3*(1+x)^2)+O(x^60))
vector(60, n, nn; (10*n*(n-1)+(2*n-1)*(-1)^n+9)/8)
[(10*n*(n-1)+(2*n-1)*(-1)**n+9)/8 for n in range(1, 60)]
[(10*n*(n-1)+(2*n-1)*(-1)^n+9)/8 for n in (1..60)]
[k: k in [0..400] | NormEquation(1, k) eq true and NormEquation(1, k+4) eq true]; // Marius A. Burtea, Oct 08 2019
ok[n_] := AllTrue[{0, 4}, SquaresR[2, # + n] > 0 &]; Select[Range[0, 400], ok] (* Giovanni Resta, Oct 08 2019 *)
985 is a term since 12^2 + 29^2 = 16^2 + 27^2 = 985 and 5^2 + 31^2 = 19^2 + 25^2 = 986. 625 is not a term because 626 cannot be written as the sum of two positive squares in more than one way.
ok[n_] := Length@ IntegerPartitions[n, {2}, Range[Sqrt@ n]^2] >= 2; Select[ Range@ 10000, ok[#] && ok[#+1] &] (* Giovanni Resta, Mar 24 2020 *)
n=100 t=[] prev=0 A333443=[] for i in range(1,n+1): t.append(i*i) for j in range(n**2): n=0 for k in t[:j+1]: if j-k in t and k<=j-k: n=n+1 if n>1: if j-prev==1: A333443.append(j-1) prev=j
If n = 4, then the only way is {1}, {2, 3, 4}. If n = 8, then the only way is { }, {1, 2, 3, 4, 5, 6, 7, 8}. If n = 9, there are 8 ways, which are shown below: {9}, {1, 2, 3, 4, 5, 6, 7, 8} {1, 8}, {2, 3, 4, 5, 6, 7, 9} {2, 7}, {1, 3, 4, 5, 6, 8, 9} {3, 6}, {1, 2, 4, 5, 7, 8, 9} {4, 5}, {1, 2, 3, 6, 7, 8, 9} {1, 2, 6}, {3, 4, 5, 7, 8, 9} {1, 3, 5}, {2, 4, 6, 7, 8, 9} {2, 3, 4}, {1, 5, 6, 7, 8, 9} In each of the 8 cases, the sum of the elements of the subsets are 9 and 36, respectively. If n = 25, there are 91514 ways. Some examples with sums different from each other: {1}, {2, 3, ..., 25}, where the sums are 1^2 and 18^2, respectively. {1, 2, 3, 4, 5, 6, 7, 8}, {9, 10, 11, ..., 25}, where the sums are 6^2 and 17^2. X = {6, 22, 23, 24, 25}, Y = {1, 2, ..., 25} - X, whose sums are 10^2 and 15^2.
Comments