login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A302551 a(n) = a(a(n-1)) + a(n-a(n-2)) with a(1) = a(2) = a(5) = 1, a(3) = a(6) = 2, a(4) = 6. 1
1, 1, 2, 6, 1, 2, 3, 4, 8, 6, 4, 8, 12, 10, 8, 6, 10, 14, 18, 16, 8, 6, 10, 20, 24, 22, 8, 6, 10, 26, 30, 28, 8, 6, 10, 32, 36, 34, 8, 6, 10, 38, 42, 40, 8, 6, 10, 44, 48, 46, 8, 6, 10, 50, 54, 52, 8, 6, 10, 56, 60, 58, 8, 6, 10, 62, 66, 64, 8, 6, 10, 68, 72, 70, 8, 6, 10, 74, 78, 76, 8, 6, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(6*k-3) = 8, a(6*k-2) = 6, a(6*k-1) = 10, a(6*k) = 6*k - 4, a(6*k+1) = 6*k, a(6*k + 2) = 6*k - 2 for k > 2.
From Colin Barker, Jun 20 2018: (Start)
G.f.: x*(1 + x^2 + 5*x^3 - 5*x^4 + 2*x^5 + 4*x^6 - 4*x^7 + 4*x^8 - 6*x^9 + 4*x^10 + 6*x^11 - 3*x^12 - 3*x^14 + 3*x^15 + 3*x^16 - 6*x^17 + 6*x^19 - 6*x^20) / ((1 - x)^2*(1 + x)^2*(1 - x + x^2)^2*(1 + x + x^2)).
a(n) = a(n-1) - a(n-3) + a(n-4) + a(n-6) - a(n-7) + a(n-9) - a(n-10) for n>13.
(End)
PROG
(PARI) a=vector(99); a[1]=1; a[2]=1; a[3]=2; a[4]=6; a[5]=1; a[6]=2; for(n=7, #a, a[n] = a[a[n-1]]+a[n-a[n-2]]); a
(PARI) Vec(x*(1 + x^2 + 5*x^3 - 5*x^4 + 2*x^5 + 4*x^6 - 4*x^7 + 4*x^8 - 6*x^9 + 4*x^10 + 6*x^11 - 3*x^12 - 3*x^14 + 3*x^15 + 3*x^16 - 6*x^17 + 6*x^19 - 6*x^20) / ((1 - x)^2*(1 + x)^2*(1 - x + x^2)^2*(1 + x + x^2)) + O(x^80)) \\ Colin Barker, Jun 20 2018
(GAP) a:=[1, 1, 2, 6, 1, 2];; for n in [7..100] do a[n]:=a[a[n-1]]+a[n-a[n-2]]; od; a; # Muniru A Asiru, Jun 26 2018
CROSSREFS
Cf. A244477.
Sequence in context: A339766 A289203 A246505 * A078434 A021892 A269224
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Jun 20 2018
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:21 EDT 2024. Contains 371794 sequences. (Running on oeis4.)