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.

Previous Showing 11-16 of 16 results.

A059417 Start with 1; square; add 2; subtract 1; repeat.

Original entry on oeis.org

1, 1, 3, 2, 4, 6, 5, 25, 27, 26, 676, 678, 677, 458329, 458331, 458330, 210066388900, 210066388902, 210066388901, 44127887745906175987801, 44127887745906175987803, 44127887745906175987802
Offset: 0

Views

Author

Jonathan Scharff (jonscharff(AT)home.com), Jan 30 2001

Keywords

Comments

a(22) has 46 digits.

References

  • Seen on a quiz.

Crossrefs

Cf. A004019.

Programs

  • Mathematica
    Flatten@ NestList[# + {0, 2, 1} &[Last[#]^2] &, {1}, 7] (* Michael De Vlieger, Sep 06 2016 *)
  • PARI
    { for (n = 0, 36, if (n==0, a=1, if (n%3 == 1, a*=a, if (n%3==2, a+=2, if (n%3==0, a-=1)))); write("b059417.txt", n, " ", a); ) } \\ Harry J. Smith, Jun 26 2009

Formula

a(1+3k) = A004019(k+1), a(2+3k) = A004019(k+1)+2, a(3+3k) = A004019(k+1)+1, k>=0. - Yuriy Sibirmovsky, Sep 04 2016

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jan 31 2001

A060137 Square array read by antidiagonals with T(n,k)=T(n,k-1)^2-n*T(n,k-1)+1 and T(n,0)=0.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 5, 1, 1, 0, 26, 1, 0, 1, 0, 677, 1, 1, -1, 1, 0, 458330, 1, 0, 5, -2, 1, 0, 210066388901, 1, 1, 11, 13, -3, 1, 0, 44127887745906175987802, 1, 0, 89, 118, 25, -4, 1, 0, 1947270476915296449559703445493848930452791205, 1, 1, 7655, 13453, 501, 41, -5, 1, 0
Offset: 0

Views

Author

Henry Bottomley, Mar 05 2001

Keywords

Crossrefs

Rows include A003095, A057427, A000035. Columns include A000004, A000012, A022958, A001844 (offset). Cf. A060136.

Formula

T(0,k)=A004019(k-1)+1=A056207(k-2)+2. - R. J. Mathar, Apr 24 2007

A067691 a(n) = (a(n-1) + 1)^(n-1) for n > 0, a(0) = 0.

Original entry on oeis.org

0, 1, 2, 9, 1000, 1004006004001, 1020191144865623440455270145683555422808365843606721760320032
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 04 2002

Keywords

Comments

a(7) has 361 digits.

Examples

			Given a(3) = 9: a(4) = (a(4-1)+1)^(4-1) = (9+1)^3 = 1000.
		

Crossrefs

Cf. A004019.

Programs

  • PARI
    a(n) = if (n==0, 0, (a(n-1) + 1)^(n-1)); \\ Michel Marcus, Feb 05 2021

A100523 a(n) = a(n-1)^2 + 2*a(n-1) - 1 with a(0) = 1.

Original entry on oeis.org

1, 2, 7, 62, 3967, 15745022, 247905749270527, 61457260521381894004129398782, 3776994870793005510047522464634252677140721938309041881087
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 24 2004

Keywords

Crossrefs

Cf. A004019.

Programs

  • Magma
    [n le 1 select 1 else Self(n-1)^2 +2*Self(n-1) -1: n in [1..13]]; // G. C. Greubel, Jun 26 2022
    
  • Mathematica
    RecurrenceTable[{a[n] == a[n-1]^2 + a[n-1]*2 - 1, a[0] == 1}, a, {n, 0, 10}] (* Vaclav Kotesovec, Dec 18 2014 *)
    NestList[#^2+2#-1&,1,10] (* Harvey P. Dale, Aug 17 2025 *)
  • SageMath
    def a(n): return 1 if (n==0) else a(n-1)^2 + 2*a(n-1) - 1 # a=A100523
    [a(n) for n in (0..12)] # G. C. Greubel, Jun 26 2022

Formula

a(n) ~ c^(2^n), where c = 1.6784589651254290832096890907802189718037513767396728769965837700954845976... . - Vaclav Kotesovec, Dec 18 2014

A157679 Number of subtrees of a complete binary tree.

Original entry on oeis.org

0, 1, 2, 4, 6, 9, 15, 25, 35, 49, 70, 100, 160, 256, 416, 676, 936, 1296, 1800, 2500, 3550, 5041, 7171, 10201, 16261, 25921, 41377, 66049, 107169, 173889, 282309, 458329, 634349, 877969, 1215289, 1682209, 2335897, 3243601, 4504301, 6255001, 8881051, 12609601
Offset: 0

Views

Author

Paolo Bonzini, Mar 04 2009

Keywords

Comments

Take the complete binary tree with n labeled nodes. Here is a poor picture of the tree with 6 nodes:
R
/ \
/ \
/ \
o o
/ \ /
o o o
Then the number of rooted subtrees of the graph is a(n).

Examples

			For n = 3, the a(3) = 4 subtrees are:
  R   R   R      R
     /     \    / \
    o       o  o   o
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
         (h-> (1+a(h))*(1+a(n-1-h)))(iquo(n, 2)))
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Jan 02 2022
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_?EvenQ] := a[n] = (1 + a[n/2 - 1])*(1 + a[n/2]); a[n_?OddQ] := a[n] = (1 + a[(n-1)/2])^2; Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Oct 19 2011 *)

Formula

a(0) = 0, a(1) = 1.
a(n) = 1 + a(floor((n-1)/2)) + a(ceiling((n-1)/2)) + a(floor((n-1)/2)) * a(ceiling((n-1)/2)) = (1+a(floor((n-1)/2))) * (1+a(ceiling((n-1)/2))).
If b(n) is sequence A005468, then a(n)=b(n+1)-1. From the definition of A005468, a(n) = b(floor((n+1)/2))*b(ceiling((n+1)/2)). So for every odd n a(n) is a square: a(2*n-1)=b(n)^2.
If c(n) is sequence A004019, then c(n)=a(2^n-1).
A004019 (and Aho and Sloane) give a closed formula for c(n) that translates to a(n) = nearest integer to b^((n+1)/2) - 1" where b = 2.25851...; the formula gives the asymptotic behavior of this sequence, however it does not compute the correct values for a(n) unless n+1 is a power of two.

A337510 a(n) = Sum_{k=0..n} T(n,k) where T(n,k) = (T(n-1, k-1) + T(n-1,k))^2.

Original entry on oeis.org

1, 2, 6, 52, 3854, 21090612, 629815387162156, 561871511512925116799625359336, 446575758106416254441837050759254156476271759098752411181598
Offset: 0

Views

Author

Glen Gilchrist, Aug 30 2020

Keywords

Comments

Based on Pascal's triangle A007318 by additionally squaring the sum of each term generated. For example, in Pascal, n=3 gives 1,2,1. Here n=3 gives, 1^2, (1+1)^2, 1^2 = 1+4+1.

Examples

			1 = 1
1 + 1 = 2
1 + (1 + 1)^2  + 1 = 1 + 4 + 1 = 6
1 + (1 + 4)^2  + (4 + 1)^2 + 1 = 1 + 25 + 25 + 1 = 52
1 + (1 + 25)^2 + (25 + 25)^2 + (25 + 1)^2 + 1 = 1 + 676 + 2500 + 676 + 1 = 3854.
		

Crossrefs

Programs

  • Python
    def r(i):
      t = [[0, 1, 0], [0, 1, 1, 0]]
      for n in range(2, i+1):
        t.append([0])
        for k in range(1, n+2):
          t[n].append((t[n-1][k-1] + t[n-1][k])**2)
        t[n].append(0)
      return(sum(t[i]))

Formula

a(n) = Sum_{k=0..n} T(n,k) where T(n,k) = (T(n-1,k-1) + T(n-1,k))^2; T(0,0)=1; T(n,-1):=0; T(n,k):=0, n < k.
Previous Showing 11-16 of 16 results.