|
|
A283393
|
|
a(n) = gcd(n^2-1, n^2+9).
|
|
5
|
|
|
1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Periodic with period 10.
Similar sequences with formula gcd(n^2-1, n^2+k):
k= 1: 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, ... (A000034)
k= 3: 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, ... (A010685)
k= 5: 1, 6, 3, 2, 3, 6, 1, 6, 3, 2, 3, 6, 1, ... (A129203, start 6)
k= 7: 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, ... (A010689)
k= 9: 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, ... (this sequence)
k=11: 1, 12, 3, 4, 3, 12, 1, 12, 3, 4, 3, 12, 1, ... (A129197, start 12)
Connection between the values of a(n) and the last digit of n:
. if n ends with 0, 2 or 8, then a(n) = 1;
. if n ends with 1 or 9, then a(n) = 10;
. if n ends with 3, 5 or 7, then a(n) = 2;
. if n ends with 4 or 6, then a(n) = 5.
Also, continued fraction expansion of (57 + sqrt(4579))/114.
|
|
LINKS
|
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,1).
|
|
FORMULA
|
G.f.: (1 + 10*x + x^2 + 2*x^3 + 5*x^4 + 2*x^5 + 5*x^6 + 2*x^7 + x^8 + 10*x^9)/(1 - x^10).
|
|
MATHEMATICA
|
Table[PolynomialGCD[n^2 - 1, n^2 + 9], {n, 0, 100}]
LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {1, 10, 1, 2, 5, 2, 5, 2, 1, 10}, 100]
|
|
PROG
|
(Python) [1, 10, 1, 2, 5, 2, 5, 2, 1, 10]*10
(Sage) [gcd(n^2-1, n^2+9) for n in range(100)]
(Magma) &cat [[1, 10, 1, 2, 5, 2, 5, 2, 1, 10]^^10];
(Maxima) makelist(gcd(n^2-1, n^2+9), n, 0, 100);
(PARI) Vec((1 + 10*x + x^2 + 2*x^3 + 5*x^4 + 2*x^5 + 5*x^6 + 2*x^7 + x^8 + 10*x^9)/(1 - x^10) + O(x^100)) \\ Colin Barker, Mar 08 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|