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.

A079000 a(n) is taken to be the smallest positive integer greater than a(n-1) which is consistent with the condition "n is a member of the sequence if and only if a(n) is odd".

Original entry on oeis.org

1, 4, 6, 7, 8, 9, 11, 13, 15, 16, 17, 18, 19, 20, 21, 23, 25, 27, 29, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 95, 97
Offset: 1

Views

Author

Matthew Vandermast, Feb 01 2003

Keywords

Comments

a(a(n)) = 2n + 3 for n>1.

Examples

			a(2) cannot be 2 because 2 is even; it cannot be 3 because that would require 2 to be a member of the sequence. Hence a(2)=4 and the next odd member of the sequence is the fourth member.
		

References

  • Hsien-Kuei Hwang, S Janson, TH Tsai, Exact and asymptotic solutions of the recurrence f(n) = f(floor(n/2)) + f(ceiling(n/2)) + g(n): theory and applications, Preprint, 2016; http://140.109.74.92/hk/wp-content/files/2016/12/aat-hhrr-1.pdf. Also Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications, ACM Transactions on Algorithms, 13:4 (2017), #47; DOI: 10.1145/3127585
  • N. J. A. Sloane, Seven Staggering Sequences, in Homage to a Pied Puzzler, E. Pegg Jr., A. H. Schoen and T. Rodgers (editors), A. K. Peters, Wellesley, MA, 2009, pp. 93-110.

Crossrefs

Partial sums give A080566. Differences give A079948.

Programs

  • Maple
    Digits := 50; A079000 := proc(n) local k,j; if n<=2 then n^2; else k := floor(evalf(log( (n+3)/6 )/log(2)) ); j := n-(9*2^k-3); 12*2^k-3+3*j/2 +abs(j)/2; fi; end;
    A002264 := n->floor(n/3): A079944 := n->floor(log[2](4*(n+2)/3))-floor(log[2](n+2)): A000523 := n->floor(log[2](n)): f := n->A079944(A002264(n-4)): g := n->A000523(A002264(n+2)/2): A079000 := proc(n) if n>3 then RETURN(simplify(3*n+3-3*2^g(n)+(-1)^f(n)*(9*2^g(n)-n-3))/2) else if n>0 then RETURN([1,4,6][n]) else RETURN(0) fi fi: end;
  • Mathematica
    a[1] = 1; a[n_] := (k = Floor[Log[2, (n+3)/6]]; j = n-(9*2^k - 3); 12*2^k-3 + 3*j/2 + Abs[j]/2); Table[a[n], {n, 1, 71}] (* Jean-François Alcover, May 21 2012, after Maple *)

Formula

a(1) = 1, a(2) = 4, then a(9*2^k-3+j) = 12*2^k-3+3*j/2+|j|/2 for k>=0, -3*2^k <= j <= 3*2^k. Also a(3n) = 3*b(n/3), a(3n+1) = 2*b(n)+b(n+1), a(3n+2) = b(n)+2*b(n+1) for n>=2, where b = A079905. - N. J. A. Sloane and Benoit Cloitre, Feb 20 2003
a(n+1) - 2*a(n) + a(n-1) = 1 for n = 9*2^k - 3, k>=0, = -1 for n = 2 and 3*2^k-3, k>=1 and = 0 otherwise.
a(n) = (3*n + 3 - 3*2^g(n) + (-1)^f(n)*(9*2^g(n) - n - 3))/2 for n>3, f(n) = A079944(A002264(n-4)) and g(n) = A000523(A002264(n+2)/2). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 23 2003
Also a(n) = n + 3*2^A000523(A002264(n+2)/2)*(1 - 3*A080584(n-4)) + A080584(n-4)*(n+3) for n>3, where A080584(n)=A079944(A002264(n)). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 24 2003

A079313 a(n) is taken to be the smallest positive integer not already present which is consistent with the condition "n is a member of the sequence if and only if a(n) is odd".

Original entry on oeis.org

1, 3, 5, 2, 7, 8, 9, 11, 13, 12, 15, 17, 19, 16, 21, 23, 25, 20, 27, 29, 31, 24, 33, 35, 37, 28, 39, 41, 43, 32, 45, 47, 49, 36, 51, 53, 55, 40, 57, 59, 61, 44, 63, 65, 67, 48, 69, 71, 73, 52, 75, 77, 79, 56, 81, 83, 85, 60, 87, 89, 91, 64, 93, 95, 97, 68, 99, 101, 103, 72, 105
Offset: 1

Views

Author

J. C. Lagarias and N. J. A. Sloane, Feb 11 2003

Keywords

Comments

The sequence obeys the rule: "The concatenation of a(n) and a(a(n)) is odd". Example: "1" and the 1st term, concatenated, is 11; "3" and the 3rd term, concatenated, is 35; "5" and the 5th term, concatenated, is 57; "2" and the 2nd term, concatenated, is 23; etc.

Crossrefs

Programs

  • Mathematica
    Rest@ CoefficientList[Series[x*(-3*x^11 + 2*x^10 - x^9 + 7*x^7 - x^6 + 2*x^5 + 5*x^4 + 2*x^3 + 5*x^2 + 3*x + 1)/(x^8 - 2*x^4 + 1), {x, 0, 120}], x] (* Michael De Vlieger, Dec 17 2024 *)

Formula

For n >= 5 a(n) is given by: a(4t-2) = 4t, a(4t-1) = 6t-3, a(4t) = 6t-1, a(4t+1) = 6t+1.
All odd numbers occur; the only even numbers which occur are 2 and the multiples of 4 excluding 4 itself.
From Chai Wah Wu, Apr 13 2024: (Start)
a(n) = 2*a(n-4) - a(n-8) for n > 12.
G.f.: x*(-3*x^11 + 2*x^10 - x^9 + 7*x^7 - x^6 + 2*x^5 + 5*x^4 + 2*x^3 + 5*x^2 + 3*x + 1)/(x^8 - 2*x^4 + 1). (End)

Extensions

More terms from Matthew Vandermast, Mar 20 2003

A079255 a(n) is taken to be the smallest positive integer greater than a(n-1) such that the condition "n is in the sequence if and only if a(n) is odd and a(n+1) is even" can be satisfied.

Original entry on oeis.org

1, 4, 6, 9, 12, 15, 18, 20, 23, 26, 28, 31, 34, 36, 39, 42, 44, 47, 50, 53, 56, 58, 61, 64, 66, 69, 72, 75, 78, 80, 83, 86, 88, 91, 94, 97, 100, 102, 105, 108, 110, 113, 116, 119, 122, 124, 127, 130, 132, 135, 138, 140, 143, 146, 148, 151, 154, 157, 160, 162, 165, 168
Offset: 1

Views

Author

Keywords

Comments

No two terms in the sequence are consecutive integers (see example for a(3)).

Examples

			a(2) cannot be odd; it also cannot be 2, since that would imply that a(2) was odd. 4 is the smallest value for a(2) that creates no contradiction. a(3) cannot be 5, which would imply that a(5) was odd because it is known from 4's being in the sequence that a(4) is odd and a(5) even. 6 is the smallest value for a(3) that creates no contradiction.
		

Crossrefs

Cf. A079000, A079259. First differences give A080428.

Formula

With the convention A026363(0)=0 (offset is 1 for this sequence) we have a(n)=A026363(2n)+1; a(n)=(1+sqrt(3))*n+O(1). The sequence satisfies the meta-system for n>=2: a(a(n))=2*a(n)+2*n+2 ; a(a(n)-1)=2*a(n)+2*n-1 ; a(a(n)-2)=2*a(n)+2*n-4 which allows us to have all terms since first differences =2 or 3 only. a(n)=a(n-1)+3 if n is in A026363, a(n)=a(n-1)+2 otherwise (if n is in A026364). - Benoit Cloitre, Apr 23 2008
Showing 1-3 of 3 results.