login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = a(n-1) + a(n-2) - a(n-3) + gcd(a(n-1), a(n-3)), with a(1) = a(2) = a(3) = 1.
2

%I #58 Feb 26 2023 20:09:54

%S 1,1,1,2,3,5,7,10,17,21,29,34,43,49,59,66,77,85,97,106,119,129,143,

%T 154,169,193,209,234,251,277,295,322,341,369,389,418,439,469,491,522,

%U 545,577,601,634,659,693,719,754,781,817,845,882,911,949,979,1018,1049

%N a(n) = a(n-1) + a(n-2) - a(n-3) + gcd(a(n-1), a(n-3)), with a(1) = a(2) = a(3) = 1.

%C All terms beyond a(458) are divisible by 5. - _Jack Braxton_, Feb 14 2023

%C From _Robert Israel_, Feb 15 2023: (Start)

%C a(n) is divisible by 25 for n >= 8857.

%C a(n) is divisible by 125 for n >= 8861.

%C a(n) is divisible by 625 for n >= 8945.

%C a(n) is divisible by 1875 for n >= 9060.

%C a(n) is divisible by 5625 for n >= 9064.

%C Do there exist N > 9064 and m > 5625 such that a(n) is divisible by m for n >= N? If so, N >= 2*10^7. (End)

%C From _Pontus von Brömssen_, Feb 17 2023: (Start)

%C (Answer to the question above.) Yes:

%C a(n) has an additional factor 5 for n >= 64423404 (so a(n) is divisible by 28125);

%C a(n) has an additional factor 5 for n >= 64423410;

%C a(n) has an additional factor 3 for n >= 64424073;

%C a(n) has an additional factor 21 for n >= 64424144;

%C a(n) has an additional factor 3 for n >= 64428745;

%C a(n) has an additional factor 7 for n >= 64428748;

%C a(n) has an additional factor 3 for n >= 64428756;

%C a(n) has an additional factor 3 for n >= 64428821;

%C a(n) has an additional factor 3 for n >= 64514757;

%C a(n) has an additional factor 5 for n >= 64514783;

%C a(n) has an additional factor 3 for n >= 797299454;

%C a(n) has an additional factor 3 for n >= 797299480;

%C a(n) has an additional factor 5 for n >= 797299487;

%C a(n) has an additional factor 3 for n >= 797299490;

%C a(n) has an additional factor 5 for n >= 797299652;

%C a(n) has an additional factor 3 for n >= 797299667;

%C a(n) has an additional factor 7 for n >= 797299846;

%C a(n) has an additional factor 3 for n >= 797299933.

%C The index for which the next additional factor occurs (if it exists) is larger than 2*10^10.

%C (End)

%H Robert Israel, <a href="/A360464/b360464.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = a(n-1) + a(n-2) - a(n-3) + gcd(a(n-1), a(n-3)).

%e a(5) = 2 + 1 - 1 + gcd(2, 1) = 3.

%p A:= Vector(200):

%p A[1]:= 1: A[2]:= 1: A[3]:= 1:

%p for n from 4 to 200 do

%p A[n]:= A[n-1] + A[n-2] - A[n-3] + igcd(A[n-1],A[n-3])

%p od:

%p convert(A,list); # _Robert Israel_, Feb 15 2023

%t a[1] = a[2] = a[3] = 1; a[n_] := a[n] = a[n-1] + a[n-2] - a[n-3] + GCD[a[n-1], a[n-3]]; Array[a, 100] (* _Amiram Eldar_, Feb 08 2023 *)

%o (Python)

%o from math import gcd

%o a = [0, 1, 1, 1]

%o [a.append(a[n-1]+a[n-2]-a[n-3]+gcd(a[n-1], a[n-3])) for n in range(4, 58)]

%o print(a[1:]) # _Michael S. Branicky_, Feb 09 2023

%Y Cf. A083658, A248098.

%K nonn,easy

%O 1,4

%A _Jack Braxton_, Feb 08 2023