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.

A145730 Partial sums of A108019.

Original entry on oeis.org

0, 4, 40, 332, 2672, 21396, 171192, 1369564, 10956544, 87652388, 701219144, 5609753196, 44878025616, 359024204980, 2872193639896, 22977549119228, 183820392953888, 1470563143631172, 11764505149049448, 94116041192395660
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};s=0;Do[s+=(s+=(s+=n+s));AppendTo[lst,s],{n,0,5!}];lst
    Accumulate[NestList[8#+4&,0,20]] (* or *) LinearRecurrence[{10,-17,8},{0,4,40},20] (* Harvey P. Dale, Aug 08 2013 *)
  • PARI
    concat(0, Vec(-4*x/((x-1)^2*(8*x-1)) + O(x^100))) \\ Colin Barker, Oct 28 2014

Formula

a(n) = Sum_{i=0..n} A108019(i).
a(n) = 4*(8^(n+1)-7n-8)/49 = 4*A014831(n). - R. J. Mathar, Oct 21 2008
a(0)=0, a(1)=4, a(2)=40, a(n)=10*a(n-1)-17*a(n-2)+8*a(n-3). - Harvey P. Dale, Aug 08 2013
a(n) = A145729(n)/2. G.f.: -4*x / ((x-1)^2*(8*x-1)). - Colin Barker, Oct 28 2014

Extensions

Edited by R. J. Mathar, Oct 21 2008

A020988 a(n) = (2/3)*(4^n-1).

Original entry on oeis.org

0, 2, 10, 42, 170, 682, 2730, 10922, 43690, 174762, 699050, 2796202, 11184810, 44739242, 178956970, 715827882, 2863311530, 11453246122, 45812984490, 183251937962, 733007751850, 2932031007402, 11728124029610, 46912496118442, 187649984473770, 750599937895082
Offset: 0

Views

Author

Keywords

Comments

Numbers whose binary representation is 10, n times (see A163662(n) for n >= 1). - Alexandre Wajnberg, May 31 2005
Numbers whose base-4 representation consists entirely of 2's; twice base-4 repunits. - Franklin T. Adams-Watters, Mar 29 2006
Expected time to finish a random Tower of Hanoi problem with 2n disks using optimal moves, so (since 2n is even and A010684(2n) = 1) a(n) = A060590(2n). - Henry Bottomley, Apr 05 2001
a(n) is the number of derangements of [2n + 3] with runs consisting of consecutive integers. E.g., a(1) = 10 because the derangements of {1, 2, 3, 4, 5} with runs consisting of consecutive integers are 5|1234, 45|123, 345|12, 2345|1, 5|4|123, 5|34|12, 45|23|1, 345|2|1, 5|4|23|1, 5|34|2|1 (the bars delimit the runs). - Emeric Deutsch, May 26 2003
For n > 0, also smallest numbers having in binary representation exactly n + 1 maximal groups of consecutive zeros: A087120(n) = a(n-1), see A087116. - Reinhard Zumkeller, Aug 14 2003
Number of walks of length 2n + 3 between any two diametrically opposite vertices of the cycle graph C_6. Example: a(0) = 2 because in the cycle ABCDEF we have two walks of length 3 between A and D: ABCD and AFED. - Emeric Deutsch, Apr 01 2004
From Paul Barry, May 18 2003: (Start)
Row sums of triangle using cumulative sums of odd-indexed rows of Pascal's triangle (start with zeros for completeness):
0 0
1 1
1 4 4 1
1 6 14 14 6 1
1 8 27 49 49 27 8 1 (End)
a(n) gives the position of the n-th zero in A173732, i.e., A173732(a(n)) = 0 for all n and this gives all the zeros in A173732. - Howard A. Landman, Mar 14 2010
Smallest number having alternating bit sum -n. Cf. A065359. For n = 0, 1, ..., the last digit of a(n) is 0, 2, 0, 2, ... . - Washington Bomfim, Jan 22 2011
Number of toothpicks minus 1 in the toothpick structure of A139250 after 2^n stages. - Omar E. Pol, Mar 15 2012
For n > 0 also partial sums of the odd powers of 2 (A004171). - K. G. Stier, Nov 04 2013
Values of m such that binomial(4*m + 2, m) is odd. Cf. A002450. - Peter Bala, Oct 06 2015
For a(n) > 2, values of m such that m is two steps away from a power of 2 under the Collatz iteration. - Roderick MacPhee, Nov 10 2016
a(n) is the position of the first occurrence of 2^(n+1)-1 in A020986. See the Brillhart and Morton link, pp. 856-857. - John Keith, Jan 12 2021
a(n) is the number of monotone paths in the n-dimensional cross-polytope for a generic linear orientation. See the Black and De Loera link. - Alexander E. Black, Feb 15 2023

Crossrefs

Programs

Formula

a(n) = 4*a(n-1) + 2, a(0) = 0.
a(n) = A026644(2*n).
a(n) = A007583(n) - 1 = A039301(n+1) - 2 = A083584(n-1) + 1.
E.g.f. : (2/3)*(exp(4*x)-exp(x)). - Paul Barry, May 18 2003
a(n) = A007583(n+1) - 1 = A039301(n+2) - 2 = A083584(n) + 1. - Ralf Stephan, Jun 14 2003
G.f.: 2*x/((1-x)*(1-4*x)). - R. J. Mathar, Sep 17 2008
a(n) = a(n-1) + 2^(2n-1), a(0) = 0. - Washington Bomfim, Jan 22 2011
a(n) = A193652(2*n). - Reinhard Zumkeller, Aug 08 2011
a(n) = 5*a(n-1) - 4*a(n-2) (n > 1), a(0) = 0, a(1) = 2. - L. Edson Jeffery, Mar 02 2012
a(n) = (2/3)*A024036(n). - Omar E. Pol, Mar 15 2012
a(n) = 2*A002450(n). - Yosu Yurramendi, Jan 24 2017
From Seiichi Manyama, Nov 24 2017: (Start)
Zeta_{GL(2)/F_1}(s) = Product_{k = 1..4} (s-k)^(-b(2,k)), where Sum b(2,k)*t^k = t*(t-1)*(t^2-1). That is Zeta_{GL(2)/F_1}(s) = (s-3)*(s-2)/((s-4)*(s-1)).
Zeta_{GL(2)/F_1}(s) = Product_{n > 0} (1 - (1/s)^n)^(-A295521(n)) = Product_{n > 0} (1 - x^n)^(-A295521(n)) = (1-3*x)*(1-2*x)/((1-4*x)*(1-x)) = 1 + Sum_{k > 0} a(k-1)*x^k (x=1/s). (End)
From Oboifeng Dira, May 29 2020: (Start)
a(n) = A078008(2n+1) (second bisection).
a(n) = Sum_{k=0..n} binomial(2n+1, ((n+2) mod 3)+3k). (End)
From John Reimer Morales, Aug 04 2025: (Start)
a(n) = A000302(n) - A047849(n).
a(n) = A020522(n) + A000079(n) - A047849(n). (End)

Extensions

Edited by N. J. A. Sloane, Sep 06 2006

A358598 Number of genetic relatives of a person M in a genealogical tree extending back n generations and where everyone has 4 children down to the generation of M.

Original entry on oeis.org

1, 6, 40, 300, 2356, 18756, 149860, 1198500, 9587236, 76696356, 613567780, 4908536100, 39268276516, 314146187556, 2513169451300, 20105355512100, 160842843900196, 1286742750808356, 10293942005680420, 82351536043870500, 658812288347818276, 5270498306776254756
Offset: 0

Views

Author

Hans Braxmeier, Nov 19 2022

Keywords

Comments

M has 2 parents, 4 grandparents, and so on up to 2^n ancestors at the top of the tree.
The genetic relatives of M are all descendants of the ancestors.
M is a genetic relative of himself or herself.

Crossrefs

Other numbers of children: A076024 (2), A358504 (3), A358599 (5), A358600 (6), A358601 (7).

Programs

  • Mathematica
    A358598[n_] := 2^n + 4*(8^n-1)/7; Array[A358598, 25, 0] (* or *)
    LinearRecurrence[{11, -26, 16}, {1, 6, 40}, 25] (* Paolo Xausa, Feb 09 2024 *)
  • Python
    for n in range(0,10): print(2**n+4*(8**n-1)//7)

Formula

a(n) = 2^n + 4*(8^n - 1)/7.
a(n) = A000079(n) + A108019(n). - Michel Marcus, Nov 25 2022
From Stefano Spezia, Nov 25 2022: (Start)
O.g.f.: (1 - 5*x)/((1 - x)*(1 - 2*x)*(1 - 8*x)).
E.g.f.: exp(x)*(4*(exp(7*x) - 1) + 7*exp(x))/7.
a(n) = 11*a(n-1) - 26*a(n-2) + 16*a(n-3) for n > 2. (End)

A353157 a(n) is the distance from n to the nearest integer whose binary expansion has no common 1-bits with that of n.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Apr 27 2022

Keywords

Comments

Equivalently the distance to the nearest integer that can be added without carries in base 2.

Examples

			For n = 42 ("101010" in binary):
- 21 ("10101") is the greatest number <= 42 that has no common 1-bits with 42,
- 128 ("1000000") is the least number >= 42 that has no common 1-bits with 42,
- so a(42) = min(42-21, 128-42) = min(21, 86) = 21.
		

Crossrefs

Programs

  • PARI
    a(n) = { my (high=2^#binary(n), low=high-1-n); min(n-low, high-n) }

Formula

a(n) = min(A006257(n), A080079(n)) for any n > 0.
a(n) = 1 iff n belongs to A097110.
a(n) = n/2 iff n belongs to A020988.
a(n) = n/4 iff n belongs to A108019.
2*a(n) - a(2*n) = 0 or 1.
Showing 1-4 of 4 results.