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

A086105 Adding, multiplying and exponentiating cycle of the previous two terms similar to A039941.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 2, 4, 6, 24, 4738381338321616896, 4738381338321616920, 22452257707354557353808363243511480320
Offset: 1

Views

Author

Anthony Peterson (civ2buf(AT)ricochet.com), Jul 09 2003

Keywords

Examples

			a(11) = a(9)^a(10)=6^24 because 11 mod 3 is 2.
		

Crossrefs

Cf. A039941.

Programs

  • Mathematica
    nxt[{n_,a_,b_}]:={n+1,b,Which[Mod[n+1,3]==0,a+b,Mod[n+1,3]==1,a*b,True,a^b]}; NestList[ nxt,{2,0,1},12][[;;,2]] (* Harvey P. Dale, Oct 04 2023 *)

Formula

a(1)=0, a(2)=1, a(n): if n mod 3 is 0: a(n)=a(n-2) + a(n-1), if n mod 3 is 1: a(n)=a(n-2) * a(n-1), if n mod 3 is 2: a(n)=a(n-2)^a(n-1).

Extensions

The next 2 terms are (6^24)^((6^24)*(6^24+24)) and (6^24)^((6^24) * (6^24 + 24)) + (6^24) * (6^24 + 24).

A104700 Duplicate of A039941.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 4, 8, 12, 96, 108, 10368, 10476, 108615168, 108625644
Offset: 0

Views

Author

Keywords

A001696 a(n) = a(n-1)*(1 + a(n-1) - a(n-2)), a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 2, 4, 12, 108, 10476, 108625644, 11798392680793836, 139202068568601568785946949658348, 19377215893777651167043206536157529523359277782016064519251404524
Offset: 0

Views

Author

Keywords

Comments

Also, numbers remaining after the following sieving process: In step 1, keep all numbers of the set N={0,1,2,...}. In step 2, keep only every second number after a(2)=2: N'={0,1,2,4,6,8,10,...}. In step 3, keep every 4th of the numbers following a(3)=4, N"={0,1,2,4,12,20,28,...}. In step 4, keep every 12th of the numbers beyond a(4)=12: {0,1,2,4,12,108,204,...}. In step 5, keep every 108th of the numbers beyond a(5)=108: {0,1,2,4,12,108,10476,...}, and so on. The next "gap" a(n+1)-a(n) is always a(n) times the former gap, i.e., a(n+1)-a(n) = a(n)*(a(n)-a(n-1)). - M. F. Hasler, Oct 28 2010
Number of plane trees where the root has fewer than n children and the i-th child of any node has fewer than i children. - David Eppstein, Dec 18 2021

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n)=A039941(2*n); first difference sequence of this sequence is A001697. - Michael Somos, May 19 2000

Programs

  • Haskell
    a001696 n = a001696_list !! n
    a001696_list = 0 : 1 : zipWith (-)
       (zipWith (+) a001696_list' $ map (^ 2) a001696_list')
       (zipWith (*) a001696_list a001696_list')
       where a001696_list' = tail a001696_list
    -- Reinhard Zumkeller, Apr 29 2013
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = a[n-1]*(1 + a[n-1] - a[n-2]); Table[a[n], {n, 0, 10}] (* Jean-François Alcover, Jul 02 2013 *)
  • PARI
    a(n)=if(n<2,n>0,a(n-1)*(1+a(n-1)-a(n-2)))
    

Formula

a(n) ~ c^(2^n), where c = 1.15552822483840350150537253088299651035583896919522349372370013726451673646... . - Vaclav Kotesovec, May 21 2015

A001697 a(n+1) = a(n)(a(0) + ... + a(n)).

Original entry on oeis.org

1, 1, 2, 8, 96, 10368, 108615168, 11798392572168192, 139202068568601556987554268864512, 19377215893777651167043206536157390321290709180447278572301746176
Offset: 0

Views

Author

Keywords

Comments

Number of binary trees of height n where for each node the left subtree is at least as high as the right subtree. - Franklin T. Adams-Watters, Feb 08 2007
The next term (a(10)) has 129 digits. - Harvey P. Dale, Jan 24 2016
Number of plane trees where the root has exactly n children and the i-th child of any node has at most i-1 children. - David Eppstein, Dec 18 2021

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) = A039941(2*n+1); first differences of A001696 give this sequence.
Cf. A064847.

Programs

  • Haskell
    a001697 n = a001697_list !! n
    a001697_list = 1 : 1 : f [1,1] where
       f xs@(x:_) = y : f (y : xs) where y = x * sum xs
    -- Reinhard Zumkeller, Apr 29 2013
    
  • Magma
    [n le 2 select 1 else Self(n-1)^2*(1+1/Self(n-2)): n in [1..12]]; // Vincenzo Librandi, Nov 25 2015
  • Mathematica
    a[0] = 1; a[1] = 1; a[n_] := a[n] = a[n - 1]^2*(1 + 1/a[n - 2]); Table[a[n], {n, 0, 9}]  (* Jean-François Alcover, Jul 02 2013 *)
    nxt[{t_,a_}]:={t+t*a,t*a}; Transpose[NestList[nxt,{1,1},10]][[2]] (* Harvey P. Dale, Jan 24 2016 *)
  • PARI
    a(n)=if(n<2,n >= 0,a(n-1)^2*(1+1/a(n-2)))
    

Formula

a(n) ~ c^(2^n), where c = 1.3352454783981919948826893254756974184778316104856161827213437094446034867599... . - Vaclav Kotesovec, May 21 2015

Extensions

Additional comments from Michael Somos, May 19 2000

A045761 Define polynomials Pn by P0 = 0, P1 = x, P2 = P1 + P0, P3 = P2 * P1, P4 = P3 + P2, etc. alternately adding or multiplying. For even n > 2k, then first k coefficients of Pn remain unchanged and their values are the first k terms of the sequence.

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 6, 12, 24, 50, 107, 232, 508, 1124, 2513, 5665, 12858, 29356, 67371, 155345, 359733, 836261, 1950829, 4565305, 10714501, 25212843, 59474318, 140609809, 333126672, 790764280, 1880489541, 4479494059, 10687448937, 25536624382, 61102431113
Offset: 0

Views

Author

James Boudinot (jboudinot(AT)yahoo.com)

Keywords

Examples

			The sequence of polynomials is 0, x, x, x^2, x^2 + x, x^4 + x^3, x^4 + x^3 + x^2 + x, ..., and after this all the even polynomials end with x^3 + x^2 + x (+ 0), so the first 4 terms of the sequence are these coefficients (in ascending order): 0, 1, 1, 1. - _Michael B. Porter_, Aug 09 2016
		

Crossrefs

Programs

  • Mathematica
    k = 32; P[0] = 0; P[1] = x;
    P[n_] := P[n] = If[EvenQ[n], P[n-1] + P[n-2], P[n-1]*P[n-2]] + O[x]^(2k+1) // Normal;
    CoefficientList[P[2k], x][[1 ;; k+1]] (* Jean-François Alcover, Aug 07 2016 *)

Formula

a(n) ~ c * d^n / n^(3/2), where d = 2.50297436517909273228379630... and c = 0.34042564735836570861482... . - Vaclav Kotesovec, Aug 08 2016, updated Aug 27 2016
Conjecture: 1/d = 0.39952466709679946... = A268107. - Jean-François Alcover, Aug 08 2016

Extensions

More terms from Michael Somos, May 19 2000

A077753 a(1) = 1, a(2) = 2, a(2n) = a(2n-1)*a(2n-2), a(2n+1)= a(2n-1) + a(2n).

Original entry on oeis.org

1, 2, 3, 6, 9, 54, 63, 3402, 3465, 11787930, 11791395, 138996138862350, 138996150653745, 19319928257600060753067000750, 19319928257600199749217654495, 373259627878816004843210480238884928715510929499405871250
Offset: 1

Views

Author

Amarnath Murthy, Nov 20 2002

Keywords

Crossrefs

Extensions

More terms from Sascha Kurz, Jan 04 2003
Edited by N. J. A. Sloane, May 21 2008 at the suggestion of R. J. Mathar
Offset corrected from 0 to 1 by Antti Karttunen, Oct 26 2014

A248479 a(1) = 1, a(2) = 3, and from then on alternatively subtract and multiply two previous terms.

Original entry on oeis.org

1, 3, 2, 6, 4, 24, 20, 480, 460, 220800, 220340, 48651072000, 48650851660, 2366916086971979520000, 2366916086923328668340, 5602291762651594835806920193095352396800000, 5602291762651594835804553277008429068131660, 31385672993873913406017018916292673201543291913142263413575757282059524278962688000000
Offset: 1

Views

Author

Stuart E Anderson, Oct 07 2014

Keywords

Crossrefs

Programs

  • Haskell
    a248479 n = a248479_list !! (n-1)
    a248479_list = 1 : 3 : zipWith ($) (map uncurry $ cycle [(-), (*)])
                                       (zip (tail a248479_list) a248479_list)
    -- Reinhard Zumkeller, Oct 28 2014
  • Maple
    a:= proc(n) option remember;
    piecewise(n::odd, a(n-1)-a(n-2), a(n-1)*a(n-2))
    end proc:
    a(1):= 1: a(2):= 3:
    seq(a(n),n=1..20); # Robert Israel, Oct 27 2014
  • Mathematica
    nxt[{n_,a_,b_}]:={n+1,b,If[EvenQ[n],b-a,b*a]}; NestList[nxt,{2,1,3},20][[All,2]] (* Harvey P. Dale, Jul 31 2018 *)
  • PARI
    v=[1,3];for(n=1,20,if(n%2,v=concat(v,v[#v]-v[#v-1]));if(!(n%2),v=concat(v,v[#v]*v[#v-1])));v \\ Derek Orr, Oct 26 2014
    
  • Scheme
    (definec (A248479 n) (cond ((= 1 n) 1) ((= 2 n) 3) ((odd? n) (- (A248479 (- n 1)) (A248479 (- n 2)))) (else (* (A248479 (- n 1)) (A248479 (- n 2))))))
    ;; A memoizing definec-macro can be found from http://oeis.org/wiki/Memoization - Antti Karttunen, Oct 26 2014
    

Formula

a(1) = 1, a(2) = 3, after which, when n is odd, a(n) = a(n-1) - a(n-2), and when n is even, a(n) = a(n-1) * a(n-2). - Antti Karttunen, Oct 26 2014, after the comment of original author.
a(n) = (a(n-1)*a(n-2) + a(n-1) - a(n-2) + (-1)^n * (a(n-1)*a(n-2) - a(n-1) + a(n-2)))/2. - Robert Israel, Oct 27 2014

Extensions

One term corrected and additional terms added by Colin Barker, Oct 07 2014
Term a(18) added by Antti Karttunen, Oct 26 2014

A122961 Alternately form product and sum of all previous terms.

Original entry on oeis.org

1, 1, 1, 3, 3, 9, 81, 99, 649539, 649737, 274124633198656977, 274124633199956451, 20598907656583661830059012023854018733151994905840579, 20598907656583661830059012023854019281401261305753481
Offset: 1

Views

Author

Keywords

Comments

Note that definition does not make a(1) a special case; it is the empty product, which is 1. If we started with addition, the sequence would be all zeros.

Crossrefs

Programs

  • PARI
    first(n) = my(res = vector(n, i, 1)); for(x=4, n, res[x]=if(x%2, prod(i=1, x-1, res[i]), sum(i=1, x-1, res[i]))); res \\ Iain Fox, Oct 29 2018
    
  • PARI
    first(n) = my(res = vector(n, i, 1)); for(x=4, n, res[x]=if(x%2, res[x-1]*res[x-2]^2, res[x-1]+2*res[x-2])); res \\ Iain Fox, Oct 29 2018

Formula

a(1) = a(2) = 1. For n > 1, a(2n-1) = a(2n-3)^2 * a(2n-2), a(2n) = 2 * a(2n-2) + a(2n-1).

A320603 a(0) = 1; if n is odd, a(n) = Product_{i=0..n-1} a(i); if n is even, a(n) = Sum_{i=0..n-1} a(i).

Original entry on oeis.org

1, 1, 2, 2, 6, 24, 36, 20736, 20808, 8947059130368, 8947059171984, 716210897494804754044764041567551881216, 716210897494804754044764059461670225184
Offset: 0

Views

Author

Iain Fox, Oct 17 2018

Keywords

Comments

Next term is too large to include.
Odd terms are the product of previous terms and even terms are the sum of previous terms.

Examples

			5 is odd, so a(5) = 1 * 1 * 2 * 2 * 6 = 24.
6 is even, so a(6) = 1 + 1 + 2 + 2 + 6 + 24 = 36.
		

Crossrefs

Sum of previous terms: A011782.
Product of previous terms: A165420.

Programs

  • Mathematica
    a[0]:= 1; a[n_]:= If[OddQ[n], Product[a[j], {j,0,n-1}], Sum[a[j], {j,0,n -1}]]; Table[a[n], {n, 0, 15}] (* G. C. Greubel, Oct 19 2018 *)
  • PARI
    first(n) = my(res = vector(n, i, 1)); for(x=3, n, res[x]=if(x%2, sum(i=1, x-1, res[i]), prod(i=1, x-1, res[i]))); res
    
  • PARI
    first(n) = my(res = vector(n, i, 1)); res[3]++; for(x=4, n, res[x]=if(x%2, res[x-1]+2*res[x-2], res[x-1]*res[x-2]^2)); res

Formula

a(n) = a(n-1) + 2*a(n-2), for even n > 2.
a(n) = a(n-1) * a(n-2)^2, for odd n > 1.
Showing 1-9 of 9 results.