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

A133622 a(n) = 1 if n is odd, a(n) = n/2+1 if n is even.

Original entry on oeis.org

1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1, 12, 1, 13, 1, 14, 1, 15, 1, 16, 1, 17, 1, 18, 1, 19, 1, 20, 1, 21, 1, 22, 1, 23, 1, 24, 1, 25, 1, 26, 1, 27, 1, 28, 1, 29, 1, 30, 1, 31, 1, 32, 1, 33, 1, 34, 1, 35, 1, 36, 1, 37, 1, 38, 1, 39, 1, 40, 1, 41, 1, 42, 1, 43, 1, 44, 1
Offset: 1

Views

Author

Hieronymus Fischer, Sep 30 2007

Keywords

Comments

a(n) is the count of terms a(n+1) present so far in the sequence, with a(n+1) included in the count; example: a(1) = 1 "says" that there is 1 term "2" so far in the sequence; a(2) = 2 "says" that there are 2 terms "1" so far in the sequence... etc. This comment was inspired by A039617. - Eric Angelini, Mar 03 2020

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a133622 n = (1 - m) * n' + 1 where (n', m) = divMod n 2
    a133622_list = concat $ transpose [[1, 1 ..], [2 ..]]
    -- Reinhard Zumkeller, Feb 20 2015
    
  • Maple
    seq([1,n][],n=2..100); # Robert Israel, May 27 2016
  • Mathematica
    Riffle[Range[2,50],1,{1,-1,2}] (* Harvey P. Dale, Jan 19 2013 *)
  • PARI
    a(n)=if(n%2,1,n/2+1) \\ Charles R Greathouse IV, Sep 02 2015

Formula

a(n)=1+(binomial(n+1,2)mod n)=1+(binomial(n+1,n-1)mod n).
a(n)=binomial(n+2,2) mod n = binomial(n+2,n) mod n for n>2.
a(n)=1+(1+(-1)^n)*n/4.
a(n)=1+(A000217(n) mod n).
a(n)=a(n-2)+1, if n is even, a(n)=a(n-2) if n is odd.
a(n)=a(n-2)+1-(n mod 2)=a(n-2)+(1+(-1)^n)/2 for n>2.
a(n)=(a(n-3)+a(n-2))/a(n-1) for n>3.
G.f.: g(x)=x(1+2x-x^2-x^3)/(1-x^2)^2.
G.f.: (Q(0)-1-x)/x^2, where Q(k)= 1 + (k+1)*x/(1 - x/(x + (k+1)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Apr 23 2013
a(n) = 2*a(n-2)-a(n-4) for n > 4. - Chai Wah Wu, May 26 2016
E.g.f.: exp(x) - 1 + x*sinh(x)/2. - Robert Israel, May 27 2016

A104786 a(n) = least member of A047841 with n digits, or 0 if no such number exists.

Original entry on oeis.org

0, 22, 0, 0, 0, 0, 0, 10213223, 0, 1031223314, 0, 0, 0, 10413223241516, 0, 1051322314251617, 0, 106132231415261718, 1011112131415161718, 10713223141516271819, 101112213141516171819
Offset: 1

Views

Author

Lekraj Beedassy, Mar 25 2005

Keywords

Crossrefs

Extensions

Edited by David Wasserman, Apr 17 2008

A104787 a(n) = greatest member of A047841 with n digits, or 0 if no such number exists.

Original entry on oeis.org

0, 22, 0, 0, 0, 0, 0, 31331819, 0, 3122331819, 0, 0, 0, 41322324171819, 0, 5132232516171819, 0, 613223141526171819, 1111213141516171819, 10713223141516271819, 101112213141516171819
Offset: 1

Views

Author

Lekraj Beedassy, Mar 25 2005

Keywords

Crossrefs

Extensions

Edited by David Wasserman, Apr 17 2008

A039616 Solution to a "self-describing sequence" puzzle of Raphael Robinson.

Original entry on oeis.org

1, 0, 7, 1, 3, 2, 2, 3, 1, 4, 1, 5, 1, 6, 2, 7, 1, 8, 1, 9
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A039617.

Extensions

Corrected by Eric Angelini, Jul 05 2005
Showing 1-4 of 4 results.