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-3 of 3 results.

A080782 a(1)=1, a(n)=a(n-1)-1 if n is already in the sequence, a(n)=a(n-1)+2 otherwise.

Original entry on oeis.org

1, 3, 2, 4, 6, 5, 7, 9, 8, 10, 12, 11, 13, 15, 14, 16, 18, 17, 19, 21, 20, 22, 24, 23, 25, 27, 26, 28, 30, 29, 31, 33, 32, 34, 36, 35, 37, 39, 38, 40, 42, 41, 43, 45, 44, 46, 48, 47, 49, 51, 50, 52, 54, 53, 55, 57, 56, 58, 60, 59, 61, 63, 62, 64, 66, 65, 67, 69, 68
Offset: 1

Views

Author

Benoit Cloitre, Mar 07 2003

Keywords

Comments

Permutation of the integers: exchange trisections starting with 2 and 3.
a(a(n)) = n. - Reinhard Zumkeller, Oct 29 2004

Crossrefs

Programs

  • Mathematica
    Array[#+Mod[#+1,3]&,70,0] (* or *) LinearRecurrence[{1,0,1,-1},{1,3,2,4},70] (* Harvey P. Dale, Mar 29 2013 *)
    {#,#+1,#-1}[[Mod[#,3,1]]]&/@Range[99] (* Federico Provvedi, May 15 2021 *)

Formula

a(n) = A064429(n-1) + 1.
a(n) - n is periodic with period 3.
G.f.: x*(1+2*x-x^2+x^3)/(1-x-x^3+x^4). - Jaume Oliver Lafont, Mar 24 2009
a(0)=1, a(1)=3, a(2)=2, a(3)=4, a(n)=a(n-1)+0*a(n-2)+a(n-3)-a(n-4). - Harvey P. Dale, Mar 29 2013
a(n) = n + (2/sqrt(3))*sin(2*(n+2)*Pi/3). - Wesley Ivan Hurt, Sep 26 2017
From Guenther Schrack, Oct 23 2019: (Start)
a(n) = a(n-3) + 3 with a(1) = 1, a(2) = 3, a(3) = 2 for n > 3.
a(n) = n - (w^(2*n)*(2 + w) + w^n*(1 - w))/3 where w = (-1 + sqrt(-3))/2. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = 2*Pi/(3*sqrt(3)) - log(2)/3. - Amiram Eldar, Jan 31 2023
From Charles L. Hohn, Sep 03 2024: (Start)
a(n) = n-1+n%3.
a(n) = A375336(n-2, 1) for n >= 6. (End)

A079357 a(1)=1; a(n)=a(n-1)-1 if n is already in the sequence, a(n)=a(n-1)+4 otherwise.

Original entry on oeis.org

1, 5, 9, 13, 12, 16, 20, 24, 23, 27, 31, 30, 29, 33, 37, 36, 40, 44, 48, 47, 51, 55, 54, 53, 57, 61, 60, 64, 63, 62, 61, 65, 64, 68, 72, 71, 70, 74, 78, 77, 81, 85, 89, 88, 92, 96, 95, 94, 98, 102, 101, 105, 104, 103, 102, 106, 105, 109, 113, 112, 111, 110, 109, 108, 107
Offset: 1

Views

Author

Benoit Cloitre, Feb 14 2003

Keywords

Comments

If, in the defining recurrence, the rule a(n)=a(n-1)+4 when n is not already in the sequence is generalized to a(n)=a(n-1)+k, then the resulting sequence ultimately becomes periodic with period 1,3,10,35 for k=1,2,3,4, respectively. - John W. Layman, Apr 15 2003

Crossrefs

Formula

It appears that, for n >= 219, a(n)=n+b(n) where b(n) is the period-35 sequence (-1, 2, 5, 3, 6, 9, 7, 5, 8, 11, 9, 12, 10, 8, 6, 9, 7, 10, 13, 11, 9, 7, 5, 3, 1, -1, -3, -5, -7, -9, -11, -13, -10, -7, -4).

Extensions

More terms from John W. Layman, Apr 15 2003

A080783 a(1)=1, a(n)=a(n-1)-1 if n is already in the sequence, a(n)=a(n-1)+5 otherwise.

Original entry on oeis.org

1, 6, 11, 16, 21, 20, 25, 30, 35, 40, 39, 44, 49, 54, 59, 58, 63, 68, 73, 72, 71, 76, 81, 86, 85, 90, 95, 100, 105, 104, 109, 114, 119, 124, 123, 128, 133, 138, 137, 136, 141, 146, 151, 150, 155, 160, 165, 170, 169, 174, 179, 184, 189, 188, 193, 198
Offset: 1

Views

Author

Benoit Cloitre, Mar 07 2003

Keywords

Crossrefs

Programs

  • Mathematica
    lst={1};i=2;Do[If[MemberQ[lst,i],AppendTo[lst,Last[lst]-1], AppendTo[ lst,Last[lst]+5]];i++,{60}];lst (* Harvey P. Dale, Aug 20 2011 *)

Formula

Conjectured to be asymptotic to 3n as n -> infinity.
Showing 1-3 of 3 results.