OFFSET
0,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
PlanetMath, Example of GCD
FORMULA
a(n) = gcd(f(n), f(n+1)) for all n. a(n) = n^2 + n + 1, except when n congruent to 3 modulo 7 when a(n) = 7(n^2 + n + 1).
Conjectures from Colin Barker, Oct 06 2015: (Start)
a(n) = 3*a(n-7) - 3*a(n-14) + a(n-21) for n>20.
G.f.: -(x^20 +3*x^19 +7*x^18 +91*x^17 +21*x^16 +31*x^15 +43*x^14 +54*x^13 +64*x^12 +70*x^11 +504*x^10 +70*x^9 +64*x^8 +54*x^7 +43*x^6 +31*x^5 +21*x^4 +91*x^3 +7*x^2 +3*x +1) / ((x -1)^3*(x^6 +x^5 +x^4 +x^3 +x^2 +x +1)^3).
(End)
EXAMPLE
a(10) = 7(10^2 + 10 + 1) = 777 because 10 is congruent to 3 modulo 7.
MATHEMATICA
f[n_] := n^4 + n^2 + 1; Table[ GCD[f[n], f[n + 1]], {n, 0, 49}] (* Robert G. Wilson v, Oct 02 2005 *)
GCD[#[[1]], #[[2]]]&/@Partition[Table[n^4+n^2+1, {n, 0, 50}], 2, 1] (* Harvey P. Dale, Mar 07 2015 *)
PROG
(PARI) m=50; a=3; for(k=2, m, b=k^4+k^2+1; print1(gcd(a, b), ", "); a=b) \\ Klaus Brockhaus, Oct 02 2005
(Magma) [Gcd(n^4+n^2+1, n^4+4*n^3+7*n^2+6*n+3): n in [0..50]]; // Vincenzo Librandi, Oct 07 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Pahikkala Jussi, Sep 30 2005
EXTENSIONS
More terms from Robert G. Wilson v and Klaus Brockhaus, Oct 02 2005
STATUS
approved