login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

Table of n, a(n) for n=0..89.

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).

a(n) = (1/75)*(74*(n mod 10) - 61*((n+1) mod 10) + 14*((n+2) mod 10) + 29*((n+3) mod 10) - 16*((n+4) mod 10) + 29*((n+5) mod 10) - 16*((n+6) mod 10) - ((n+7) mod 10) + 74*((n+8) mod 10) - 61*((n+9) mod 10)). - Paolo P. Lava, Mar 08 2017

MAPLE

P:=proc(q) gcd(q^2-1, q^2+9); end: seq(P(i), i=0..200); # Paolo P. Lava, Mar 08 2017

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 xrange(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

Cf. A000034, A010685, A010689, A129197, A129203.

Sequence in context: A240962 A085764 A090555 * A010179 A174209 A010181

Adjacent sequences:  A283390 A283391 A283392 * A283394 A283395 A283396

KEYWORD

nonn,easy

AUTHOR

Bruno Berselli, Mar 07 2017

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified February 18 23:26 EST 2018. Contains 299330 sequences. (Running on oeis4.)