|
|
A228564
|
|
Largest odd divisor of n^2 + 1.
|
|
3
|
|
|
1, 1, 5, 5, 17, 13, 37, 25, 65, 41, 101, 61, 145, 85, 197, 113, 257, 145, 325, 181, 401, 221, 485, 265, 577, 313, 677, 365, 785, 421, 901, 481, 1025, 545, 1157, 613, 1297, 685, 1445, 761, 1601, 841, 1765, 925, 1937, 1013, 2117, 1105, 2305, 1201, 2501, 1301, 2705
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
For n>2, a(n) = hypotenuse c of the primitive Pythagorean triple (a, b, c) such that n*a = b + c.
Terms that appear twice (1, 5, 145, 4901, ...) are the positive terms of A076218. Equivalently, the products of two consecutive terms of A001653, or one more than the squares of A001542.
These duplicated terms appear at indices i and j (i>j) such that (i^2-1)/2 = j^2 (A001541). In addition, they are hypotenuse in two primitive Pythagorean triples: (i, j^2, a(i)) and (2*j, j^2-1, a(i)). (End)
|
|
LINKS
|
|
|
FORMULA
|
a(4n) = 4*a(2n) - 3.
a(4n+1) = 2*a(2n) + 4*n - 1.
a(4n+2) = 4*a(2n) + 16*n + 1.
a(4n+3) = 2*a(2n) + 12*n + 3. (End)
G.f.: (1 + x + 2*x^2 + 2*x^3 + 5*x^4 + x^5) / (1-x^2)^3.
a(n) = 3*a(n-2) -3*a(n-4) +a(n-6).
a(n) = (n^2+1)*(3+(-1)^n)/4. (End)
a(n) = numerator((n^2 + 1)/(n + 1)).
a(n) is a quasi-polynomial in n: a(2*n) = 4*n^2 + 1; a(2*n + 1) = 2*n^2 + 2*n + 1. (End)
a(n) = numerator((n^2+1)/2).
Sum_{n>=0} 1/a(n) = (1 + coth(Pi/2)*Pi/2 + tanh(Pi/2)*Pi)/2. (End)
|
|
EXAMPLE
|
A002522(3) = 3^2+1 = 10 => a(3) = 10/2 = 5.
|
|
MAPLE
|
lod:= t -> t/2^padic:-ordp(t, 2):
|
|
MATHEMATICA
|
Table[(n^2 + 1) (3 + (-1)^n)/4, {n, 0, 60}] (* Bruno Berselli, Aug 26 2013 *)
|
|
PROG
|
(BASIC)
for n = 0 to 45 : t=n^2+1
x: if not t mod 2 then t=t/2 : goto x
print str$(t); ", "; : next n
print
end
(PARI) a(n)=if(n<2, n>0, m=n\4; [4*a(2*m)-3, 2*a(2*m)+4*m-1, 4*a(2*m)+16*m+1, 2*a(2*m)+12*m+3][(n%4)+1]) \\ Ralf Stephan, Aug 26 2013
(PARI) a(n)=(n^2+1)/2^valuation(n^2+1, 2) \\ Ralf Stephan, Aug 26 2013
(Magma) [(n^2+1)*(3+(-1)^n)/4: n in [0..60]]; // Bruno Berselli, Aug 26 2013
(Magma) [Denominator(2*n^2/(n^2+1)): n in [0..60]]; // Vincenzo Librandi, Aug 19 2014
(GAP) List([0..60], n->NumeratorRat((n^2+1)/(n+1))); # Muniru A Asiru, Feb 20 2019
(Sage) [(n^2+1)*(3+(-1)^n)/4 for n in (0..60)] # G. C. Greubel, Feb 20 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|