login

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

Period 6: repeat [3, 1, 1, 3, 2, 1].
1

%I #28 Dec 12 2023 07:40:15

%S 3,1,1,3,2,1,3,1,1,3,2,1,3,1,1,3,2,1,3,1,1,3,2,1,3,1,1,3,2,1,3,1,1,3,

%T 2,1,3,1,1,3,2,1,3,1,1,3,2,1,3,1,1,3,2,1,3,1,1,3,2,1,3,1,1,3,2,1,3,1,

%U 1,3,2,1,3,1,1,3,2,1,3,1,1,3,2,1,3,1,1,3,2,1,3,1,1,3,2,1

%N Period 6: repeat [3, 1, 1, 3, 2, 1].

%C 3/n expressed as Egyptian fractions with 3 unit fractions: 3/n = 1/x + 1/y + 1/z, all integers, n > 0 and x < y < z.

%C I have introduced a variable t, an integer that varies with n in accordance with a periodic sequence of 6 terms: [3, 1, 1, 3, 2, 1] starting at n = 0, although 0 is outside the defined interval.

%C x, the denominator of the first unit fraction, varies with n in accordance with the sequence:

%C [(1), 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5,..]; x_0 = x_1 = x_2 = 1. Then x_3 = x_4 = x_5 = 2 and so on, increasing the value by 1 for every 3 terms.

%C y is calculated by:

%C y = (nx + t)/2 for n = 1, 4, 7, 10,.. etc.

%C y = (nx + t)/1 = nx + t for n = 2, 5, 8, 11,.. etc.

%C y = (nx + t)/t for n = 3, 6, 9, 12,.. etc.

%C z is calculated by: z = nxy/t for all n > 0

%C This algorithm produces the "first" Egyptian fraction of each type that has 3 unit fractions.

%C By "first" I indicate the Egyptian fraction that otherwise would be arrived at by employing Fibonacci's greedy algorithm.

%H Vincenzo Librandi, <a href="/A176514/b176514.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,1).

%F G.f.: ( 3+x+x^2+3*x^3+2*x^4+x^5 ) / ( (1-x)*(1+x)*(1+x+x^2)*(x^2-x+1) ). - _R. J. Mathar_, Oct 08 2011

%F a(n) = 11/6 -cos(Pi*n/3)/6 -sqrt(3)*sin(Pi*n/3)/6 +7*cos(2*Pi*n/3)/6 +sqrt(3)*sin(2*Pi*n/3)/6 +(-1)^n/6. - _R. J. Mathar_, Oct 08 2011

%F a(n) = a(n-6) for n>6. - _Wesley Ivan Hurt_, Jun 18 2016

%p A176514:=n->[3, 1, 1, 3, 2, 1][(n mod 6)+1]: seq(A176514(n), n=0..100); # _Wesley Ivan Hurt_, Jun 18 2016

%t LinearRecurrence[{0, 0, 0, 0, 0, 1},{3, 1, 1, 3, 2, 1},96] (* _Ray Chandler_, Aug 26 2015 *)

%t PadRight[{}, 100, {3, 1, 1, 3, 2, 1}] (* _Vincenzo Librandi_, Jun 19 2016 *)

%o (Magma) &cat[[3, 1, 1, 3, 2, 1]^^20]; // _Wesley Ivan Hurt_, Jun 18 2016

%o (PARI) a(n)=[1, 3, 1, 1, 3, 2][n%6+1] \\ _Charles R Greathouse IV_, Jul 17 2016

%K nonn,easy

%O 1,1

%A Egil Edborg (egil.edborg(AT)ebnett.no), Apr 19 2010