cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A064552 a(0) = 1, a(n) = a(n-1) + 2*q(n) - n for n > 0, where q(n) = A064657(n) = q(|n-q(n-3)|) + q(|n-q(n-4)|) for n > 3, q(n) = 1 for n = 0, 1, 2, 3.

Original entry on oeis.org

1, 2, 2, 1, 1, 4, 14, 31, 43, 44, 38, 31, 45, 56, 94, 105, 95, 96, 106, 109, 111, 140, 142, 171, 173, 174, 202, 229, 253, 232, 206, 187, 223, 210, 296, 271, 291, 360, 366, 451, 461, 468, 470, 477, 477, 534, 564, 567, 575, 532, 534, 589, 569, 622, 622, 693, 689, 640, 602, 567, 679
Offset: 0

Views

Author

Roger L. Bagula, Oct 08 2001

Keywords

Comments

Ill defined beyond n=866. - M. F. Hasler, Aug 28 2012

Crossrefs

Programs

  • ARIBAS
    : function qfunc(n: integer): integer; var r: integer; begin if n < 4 then r := 1; else r := qfunc(abs(n - qfunc(n - 3))) + qfunc(abs(n - qfunc( n - 4))); end; return r; end; function a064552(n: integer); var k,r: integer; begin if n = 0 then r := 1; else r := a064552(n - 1) + round(2*(qfunc(n) - n/2)); end; return r; end; for n := 1 to 60 do write(a064552(n)," "); end;.
  • Mathematica
    a[0] = q[0] = q[1] = q[2] = q[3] = 1;
    q[n_] := q[n] = q[Abs[n - q[n - 3]]] + q[Abs[n - q[n - 4]]];
    a[n_] := a[n] = a[n - 1] + 2*(q[n] - n/2);
    Table[a[n], {n, 0, 70} ]

Extensions

Corrected and extended by Vladeta Jovovic, Matthew Conroy and Klaus Brockhaus, Oct 09 2001
Sequence A064657, and thus the present one, is ill defined beyond n=866. Keyword 'fini' added by M. F. Hasler, Aug 28 2012

A309494 a(1) = a(2) = a(3) = a(5) = 1, a(4) = 2; a(n) = a(n-a(n-3)) + a(n-a(n-4)) for n > 5.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 5, 8, 8, 7, 5, 2, 5, 13, 12, 18, 3, 5, 6, 4, 23, 21, 9, 5, 2, 5, 26, 14, 31, 3, 5, 6, 4, 36, 34, 9, 5, 2, 5, 39, 14, 44, 3, 5, 6, 4, 49, 47, 9, 5, 2, 5, 52, 14, 57, 3, 5, 6, 4, 62, 60, 9, 5, 2, 5, 65, 14, 70, 3, 5, 6, 4, 75, 73, 9, 5, 2, 5, 78, 14, 83, 3, 5, 6, 4, 88, 86, 9, 5, 2, 5, 91
Offset: 1

Views

Author

Altug Alkan, Aug 04 2019

Keywords

Comments

A well-defined solution sequence for recurrence a(n) = a(n-a(n-3)) + a(n-a(n-4)).

Crossrefs

Programs

  • Maple
    for n from 1 to 5 do a[n]:= `if`(n=4,2,1) od:
    for n from 6 to 100 do a[n]:= a[n-a[n-3]] + a[n-a[n-4]] od:
    seq(a[n],n=1..100); # Robert Israel, Aug 07 2019
  • Mathematica
    a[1]=a[2]=a[3]=a[5]=1; a[4]=2; a[n_] := a[n] = a[n - a[n-3]] + a[n - a[n-4]]; Array[a, 93] (* Giovanni Resta, Aug 07 2019 *)
  • PARI
    q=vector(100); q[1]=q[2]=q[3]=q[5]=1; q[4]=2; for(n=6, #q, q[n]=q[n-q[n-3]]+q[n-q[n-4]]); q
    
  • PARI
    Vec(x*(1 + x + x^2 + 2*x^3 + x^4 + 2*x^5 + 3*x^6 + 5*x^7 + 8*x^8 + 8*x^9 + 7*x^10 + 5*x^11 + 2*x^12 + 3*x^13 + 11*x^14 + 10*x^15 + 14*x^16 + x^17 + x^18 - 6*x^20 + 7*x^21 + 5*x^22 - 5*x^23 - 5*x^24 - 2*x^25 - 4*x^26 + x^27 - 9*x^28 - 3*x^29 - 2*x^30 - 3*x^31 - 3*x^32 + x^33 - 2*x^34 - 2*x^36 - 2*x^41) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + x^10 + x^11 + x^12)^2) + O(x^80)) \\ Colin Barker, Aug 08 2019

Formula

For k > 1,
a(13*k-9) = 13*k-8,
a(13*k-8) = 3,
a(13*k-7) = 5,
a(13*k-6) = 6,
a(13*k-5) = 4,
a(13*k-4) = 13*k-3,
a(13*k-3) = 13*k-5,
a(13*k-2) = 9,
a(13*k-1) = 5,
a(13*k) = 2,
a(13*k+1) = 5,
a(13*k+2) = 13*k,
a(13*k+3) = 14.
From Colin Barker, Aug 05 2019: (Start)
G.f.: x*(1 + x + x^2 + 2*x^3 + x^4 + 2*x^5 + 3*x^6 + 5*x^7 + 8*x^8 + 8*x^9 + 7*x^10 + 5*x^11 + 2*x^12 + 3*x^13 + 11*x^14 + 10*x^15 + 14*x^16 + x^17 + x^18 - 6*x^20 + 7*x^21 + 5*x^22 - 5*x^23 - 5*x^24 - 2*x^25 - 4*x^26 + x^27 - 9*x^28 - 3*x^29 - 2*x^30 - 3*x^31 - 3*x^32 + x^33 - 2*x^34 - 2*x^36 - 2*x^41) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + x^10 + x^11 + x^12)^2).
a(n) = 2*a(n-13) - a(n-26) for n > 42.
(End)
Showing 1-2 of 2 results.