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

A009947 Sequence of nonnegative integers, but insert n/2 after every even number n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Coefficients in expansion of e/3 = Sum_{n>=1} a(n)/n!, using greedy algorithm.
Numerators of Peirce sequence of order 2.

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, Reading, MA, 2nd ed. 1998, p. 151.

Crossrefs

Cf. A071281, A214090 (parity), A001477.
Cf. A166711 (signed).

Programs

  • Haskell
    a009947 n = a009947_list !! n
    a009947_list = concatMap (\x -> [2 * x, x, 2 * x + 1]) [0..]
    -- Reinhard Zumkeller, Jul 06 2012
    
  • Maple
    A009947 := proc(a,n) local i,b,c; b := a; c := [ floor(b) ]; for i from 1 to n-1 do b := b-c[ i ]/i!; c := [ op(c), floor(b*(i+1)!) ]; od; c; end:
  • Mathematica
    Flatten[Table[If[EvenQ[n],{n,n/2},n],{n,0,40}]] (* Harvey P. Dale, Feb 17 2016 *)
  • PARI
    a(n)=if(n%3==1, n\3, n\3*2+!!(n%3)) \\ Charles R Greathouse IV, Sep 02 2015
    
  • PARI
    concat(vector(2), Vec(x^2*(x^3+x^2+2*x+1) / ((x-1)^2*(x^2+x+1)^2) + O(x^100))) \\ Colin Barker, Mar 29 2017

Formula

G.f.: x^2*(x^3+x^2+2*x+1) / ((x-1)^2*(x^2+x+1)^2). - Colin Barker, Aug 31 2013
a(n) = (n^2-n+floor(n/3)*(18*floor(n/3)^2-3*(4*n-7)*floor(n/3)+2*n^2-10*n+7))/2. - Luce ETIENNE, Mar 29 2017
Sum_{n>=2} (-1)^n/a(n) = Pi/4 + log(2)/2. - Amiram Eldar, Jan 11 2023

A071288 Denominators of Peirce sequence of order 6.

Original entry on oeis.org

2, 4, 6, 5, 3, 1, 6, 5, 4, 6, 3, 5, 4, 6, 2, 5, 6, 3, 4, 5, 6, 2, 4, 6, 5, 3, 1, 6, 5, 4, 6, 3, 5, 4, 6, 2, 5, 6, 3, 4, 5, 6, 2, 4, 6, 5, 3, 1, 6, 5, 4, 6, 3, 5, 4, 6, 2, 5, 6, 3, 4, 5, 6, 2, 4, 6, 5, 3, 1, 6, 5, 4, 6, 3, 5, 4, 6, 2, 5, 6
Offset: 0

Views

Author

N. J. A. Sloane, Jun 11 2002

Keywords

Examples

			The Peirce sequences of orders 1, 2, 3, 4, 5 begin:
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 ...
0/2 0/1 1/2 2/2 1/1 3/2 4/2 2/1 ... (numerators are A009947)
0/2 0/3 0/1 1/3 1/2 2/3 2/2 3/3 ...
0/2 0/4 0/3 0/1 1/4 1/3 2/4 1/2 ...
0/2 0/4 0/5 0/3 0/1 1/5 1/4 1/3 ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, Reading, MA, 2nd ed. 1998, p. 151.

Crossrefs

Formula

Conjectures from Colin Barker, Mar 29 2017: (Start)
G.f.: (6*x^20 + 5*x^19 + 4*x^18 + 3*x^17 + 6*x^16 + 5*x^15 + 2*x^14 + 6*x^13 + 4*x^12 + 5*x^11 + 3*x^10 + 6*x^9 + 4*x^8 + 5*x^7 + 6*x^6 + x^5 + 3*x^4 + 5*x^3 + 6*x^2 + 4*x + 2)/(1 - x^21).
a(n) = a(n-21) for n>20.
(End)

Extensions

More terms from Reiner Martin, Oct 15 2002

A071282 Denominators of Peirce sequence of order 3.

Original entry on oeis.org

2, 3, 1, 3, 2, 3, 2, 3, 1, 3, 2, 3, 2, 3, 1, 3, 2, 3, 2, 3, 1, 3, 2, 3, 2, 3, 1, 3, 2, 3, 2, 3, 1, 3, 2, 3, 2, 3, 1, 3, 2, 3, 2, 3, 1, 3, 2, 3, 2, 3, 1, 3, 2, 3, 2, 3, 1, 3, 2, 3, 2, 3, 1, 3, 2, 3, 2, 3, 1, 3, 2, 3, 2, 3, 1, 3, 2, 3, 2, 3
Offset: 0

Views

Author

N. J. A. Sloane, Jun 11 2002

Keywords

Examples

			The Peirce sequences of orders 1, 2, 3, 4, 5 begin:
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 ...
0/2 0/1 1/2 2/2 1/1 3/2 4/2 2/1 ... (numerators are A009947)
0/2 0/3 0/1 1/3 1/2 2/3 2/2 3/3 ...
0/2 0/4 0/3 0/1 1/4 1/3 2/4 1/2 ...
0/2 0/4 0/5 0/3 0/1 1/5 1/4 1/3 ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, Reading, MA, 2nd ed. 1998, p. 151.

Crossrefs

Formula

Conjectures from Colin Barker, Mar 29 2017: (Start)
G.f.: (3*x^5 + 2*x^4 + 3*x^3 + x^2 + 3*x + 2)/(1 - x^6).
a(n) = a(n-6) for n>5.
(End)

Extensions

More terms from Reiner Martin, Oct 15 2002

A071287 Numerators of Peirce sequence of order 6.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 1, 2, 2, 3, 1, 3, 4, 2, 3, 4, 5, 2, 4, 6, 5, 3, 1, 7, 6, 5, 8, 4, 7, 6, 9, 3, 8, 10, 5, 7, 9, 11, 4, 8, 12, 10, 6, 2, 13, 11, 9, 14, 7, 12, 10, 15, 5, 13, 16, 8, 11, 14, 17, 6, 12, 18, 15, 9, 3, 19, 16, 13, 20, 10, 17, 14, 21, 7, 18, 22
Offset: 0

Views

Author

N. J. A. Sloane, Jun 11 2002

Keywords

Examples

			The Peirce sequences of orders 1, 2, 3, 4, 5 begin:
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 ...
0/2 0/1 1/2 2/2 1/1 3/2 4/2 2/1 ... (numerators are A009947)
0/2 0/3 0/1 1/3 1/2 2/3 2/2 3/3 ...
0/2 0/4 0/3 0/1 1/4 1/3 2/4 1/2 ...
0/2 0/4 0/5 0/3 0/1 1/5 1/4 1/3 ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, Reading, MA, 2nd ed. 1998, p. 151.

Crossrefs

Formula

Conjectures from Colin Barker, Mar 29 2017: (Start)
G.f.: x^6*(x^41 + x^40 + x^39 + x^38 + 2*x^37 + 2*x^36 + x^35 + 3*x^34 + 2*x^33 + 3*x^32 + 2*x^31 + 4*x^30 + 3*x^29 + 4*x^28 + 5*x^27 + x^26 + 3*x^25 + 5*x^24 + 6*x^23 + 4*x^22 + 2*x^21 + 5*x^20 + 4*x^19 + 3*x^18 + 2*x^17 + 4*x^16 + 3*x^15 + x^14 + 3*x^13 + 2*x^12 + 2*x^11 + x^10 + 2*x^9 + x^8 + x^7 + x^6)/(x^42 - 2*x^21 + 1).
a(n) = 2*a(n-21) - a(n-42) for n>41.
(End)

Extensions

More terms from Reiner Martin, Oct 15 2002

A071283 Numerators of Peirce sequence of order 4.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 1, 2, 3, 2, 4, 3, 1, 5, 4, 6, 3, 5, 7, 4, 8, 6, 2, 9, 7, 10, 5, 8, 11, 6, 12, 9, 3, 13, 10, 14, 7, 11, 15, 8, 16, 12, 4, 17, 13, 18, 9, 14, 19, 10, 20, 15, 5, 21, 16, 22, 11, 17, 23, 12, 24, 18, 6, 25, 19, 26, 13, 20, 27, 14, 28, 21, 7, 29, 22, 30, 15, 23, 31
Offset: 0

Views

Author

N. J. A. Sloane, Jun 11 2002

Keywords

Examples

			The Peirce sequences of orders 1, 2, 3, 4, 5 begin:
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 ...
0/2 0/1 1/2 2/2 1/1 3/2 4/2 2/1 ... (numerators are A009947)
0/2 0/3 0/1 1/3 1/2 2/3 2/2 3/3 ...
0/2 0/4 0/3 0/1 1/4 1/3 2/4 1/2 ...
0/2 0/4 0/5 0/3 0/1 1/5 1/4 1/3 ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, Reading, MA, 2nd ed. 1998, p. 151.

Crossrefs

Formula

Conjectures from Colin Barker, Mar 29 2017: (Start)
G.f.: x^4*(x^19 + x^18 + x^17 + 2*x^16 + 2*x^15 + 3*x^14 + x^13 + 3*x^12 + 4*x^11 + 2*x^10 + 3*x^9 + 2*x^8 + x^7 + 2*x^6 + x^5 + x^4)/(x^20 - 2*x^10 + 1).
a(n) = 2*a(n-10) - a(n-20) for n>19.
(End)

Extensions

More terms from Reiner Martin, Oct 15 2002

A071284 Denominators of Peirce sequence of order 4.

Original entry on oeis.org

2, 4, 3, 1, 4, 3, 4, 2, 3, 4, 2, 4, 3, 1, 4, 3, 4, 2, 3, 4, 2, 4, 3, 1, 4, 3, 4, 2, 3, 4, 2, 4, 3, 1, 4, 3, 4, 2, 3, 4, 2, 4, 3, 1, 4, 3, 4, 2, 3, 4, 2, 4, 3, 1, 4, 3, 4, 2, 3, 4, 2, 4, 3, 1, 4, 3, 4, 2, 3, 4, 2, 4, 3, 1, 4, 3, 4, 2, 3, 4
Offset: 0

Views

Author

N. J. A. Sloane, Jun 11 2002

Keywords

Examples

			The Peirce sequences of orders 1, 2, 3, 4, 5 begin:
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 ...
0/2 0/1 1/2 2/2 1/1 3/2 4/2 2/1 ... (numerators are A009947)
0/2 0/3 0/1 1/3 1/2 2/3 2/2 3/3 ...
0/2 0/4 0/3 0/1 1/4 1/3 2/4 1/2 ...
0/2 0/4 0/5 0/3 0/1 1/5 1/4 1/3 ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, Reading, MA, 2nd ed. 1998, p. 151.

Crossrefs

Formula

Conjectures from Colin Barker, Mar 29 2017: (Start)
G.f.: (4*x^9 + 3*x^8 + 2*x^7 + 4*x^6 + 3*x^5 + 4*x^4 + x^3 + 3*x^2 + 4*x + 2)/(1 - x^10).
a(n) = a(n-10) for n>9.
(End)

Extensions

More terms from Reiner Martin, Oct 15 2002

A071285 Numerators of Peirce sequence of order 5.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 1, 3, 2, 3, 4, 2, 4, 5, 3, 1, 6, 5, 4, 7, 6, 3, 8, 5, 7, 9, 4, 8, 10, 6, 2, 11, 9, 7, 12, 10, 5, 13, 8, 11, 14, 6, 12, 15, 9, 3, 16, 13, 10, 17, 14, 7, 18, 11, 15, 19, 8, 16, 20, 12, 4, 21, 17, 13, 22, 18, 9, 23, 14, 19, 24, 10, 20, 25, 15, 5
Offset: 0

Views

Author

N. J. A. Sloane, Jun 11 2002

Keywords

Examples

			The Peirce sequences of orders 1, 2, 3, 4, 5 begin:
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 ...
0/2 0/1 1/2 2/2 1/1 3/2 4/2 2/1 ... (numerators are A009947)
0/2 0/3 0/1 1/3 1/2 2/3 2/2 3/3 ...
0/2 0/4 0/3 0/1 1/4 1/3 2/4 1/2 ...
0/2 0/4 0/5 0/3 0/1 1/5 1/4 1/3 ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, Reading, MA, 2nd ed. 1998, p. 151.

Crossrefs

Formula

Conjectures from Colin Barker, Mar 29 2017: (Start)
G.f.: x^5*(x^29 + x^28 + x^27 + 2*x^26 + x^25 + 2*x^24 + 3*x^23 + 2*x^22 + 3*x^21 + 4*x^20 + x^19 + 3*x^18 + 5*x^17 + 4*x^16 + 2*x^15 + 4*x^14 + 3*x^13 + 2*x^12 + 3*x^11 + x^10 + 2*x^9 + 2*x^8 + x^7 + x^6 + x^5)/(x^30 - 2*x^15 + 1).
a(n) = 2*a(n-15) - a(n-30) for n>29.
(End)

Extensions

Corrected and extended by Reiner Martin, Oct 15 2002

A071286 Denominators of Peirce sequence of order 5.

Original entry on oeis.org

2, 4, 5, 3, 1, 5, 4, 3, 5, 4, 2, 5, 3, 4, 5, 2, 4, 5, 3, 1, 5, 4, 3, 5, 4, 2, 5, 3, 4, 5, 2, 4, 5, 3, 1, 5, 4, 3, 5, 4, 2, 5, 3, 4, 5, 2, 4, 5, 3, 1, 5, 4, 3, 5, 4, 2, 5, 3, 4, 5, 2, 4, 5, 3, 1, 5, 4, 3, 5, 4, 2, 5, 3, 4, 5, 2, 4, 5, 3, 1
Offset: 0

Views

Author

N. J. A. Sloane, Jun 11 2002

Keywords

Examples

			The Peirce sequences of orders 1, 2, 3, 4, 5 begin:
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 ...
0/2 0/1 1/2 2/2 1/1 3/2 4/2 2/1 ... (numerators are A009947)
0/2 0/3 0/1 1/3 1/2 2/3 2/2 3/3 ...
0/2 0/4 0/3 0/1 1/4 1/3 2/4 1/2 ...
0/2 0/4 0/5 0/3 0/1 1/5 1/4 1/3 ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, Reading, MA, 2nd ed. 1998, p. 151.

Crossrefs

Formula

Conjectures from Colin Barker, Mar 29 2017: (Start)
G.f.: (5*x^14 + 4*x^13 + 3*x^12 + 5*x^11 + 2*x^10 + 4*x^9 + 5*x^8 + 3*x^7 + 4*x^6 + 5*x^5 + x^4 + 3*x^3 + 5*x^2 + 4*x + 2)/(1 - x^15).
a(n) = a(n-15) for n>14.
(End)

Extensions

More terms from Reiner Martin, Oct 15 2002
Showing 1-8 of 8 results.