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.

A140080 Fix e = 3; a(n) = minimal Hamming distance between the binary representation of n and the binary representation of any multiple ke (0 <= k <= n/e) which is a child of n.

Original entry on oeis.org

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

Views

Author

Nadia Heninger and N. J. A. Sloane, Jun 03 2008

Keywords

Comments

A number m is a child of n if the binary representation of n has a 1 in every position where the binary representation of m has a 1.
In other words, this tells us how closely (in Hamming weight) we can approximate n "from below" by a multiple of e.

Examples

			If n = 14 = 1110_2, take k=2, ke = 6 = 110_2, which is Hamming distance 1 from n. This is the best we can do, so a(14) = 1.
		

Crossrefs

For e=2 and 4 through 9 see A000035 and A140081 through A140086.

Programs

  • Fortran
    See Sloane link.

A299989 Triangle read by rows: T(n,0) = 0 for n >= 0; T(n,2*k+1) = A152842(2*n,2*(n-k)) and T(n,2*k) = A152842(2*n,2*(n-k)+1) for n >= k > 0.

Original entry on oeis.org

0, 1, 0, 3, 4, 1, 0, 9, 24, 22, 8, 1, 0, 27, 108, 171, 136, 57, 12, 1, 0, 81, 432, 972, 1200, 886, 400, 108, 16, 1, 0, 243, 1620, 4725, 7920, 8430, 5944, 2810, 880, 175, 20, 1, 0, 729, 5832, 20898, 44280, 61695, 59472, 40636, 19824, 6855, 1640, 258, 24, 1
Offset: 0

Views

Author

Keywords

Comments

T(n,k) is the number of state diagrams having k components of n connected summed trefoil knots.
Row sums gives A001018.

Examples

			The triangle T(n, k) begins:
n\k 0     1      2      3       4       5       6      7        8       9
0:  0     1
1:  0     3      4      1
2:  0     9     24     22       8       1
3:  0    27    108    171     136      57      12       1
4:  0    81    432    972    1200     886     400     108      16       1
		

References

  • V. I. Arnold, Topological Invariants of Plane Curves and Caustics, American Math. Soc., 1994.

Crossrefs

Row 2: row 5 of A158454.
Row 3: row 2 of A220665.
Row 4: row 5 of A219234.

Programs

  • Mathematica
    row[n_] := CoefficientList[x*(x^2 + 4*x + 3)^n, x]; Array[row, 7, 0] // Flatten (* Jean-François Alcover, Mar 16 2018 *)
  • Maxima
    g(x, y) := taylor(x/(1 - y*(x^2 + 4*x + 3)), y, 0, 10)$
    a : makelist(ratcoef(g(x, y), y, n), n, 0, 10)$
    T : []$
    for i:1 thru 11 do
      T : append(T, makelist(ratcoef(a[i], x, n), n, 0, 2*i - 1))$
    T;
    
  • PARI
    T(n, k) = polcoeff(x*(x^2 + 4*x + 3)^n, k);
    tabf(nn) = for (n=0, nn, for (k=0, 2*n+1, print1(T(n, k), ", ")); print); \\ Michel Marcus, Mar 03 2018

Formula

T(n,k) = coefficients of x*(x^2 + 4*x + 3)^n.
T(n,k) = T(n-1,k-2) + 4*T(n-1,k-1) + 3*T(n-1,k), with T(n,0) = 0, T(n,1) = 3^n and T(n,2) = 4*n*3^(n-1).
T(n,n+k+1) = A152842(2*n,n+k) and T(n,n-k) = A152842(2*n,n+k+1), for n >= k >= 0.
T(n,1) = A000244(n).
T(n,2) = A120908(n).
T(n,n+1) = A069835(n).
T(n,2*n-1) = A139272(n).
T(n,2*n) = A008586(n).
T(n,2*n-2) = A140138(4*n) = A185872(2n,2) for n >= 1.
G.f.: x/(1 - y*(x^2 + 4*x + 3)).

Extensions

Typo in row 6 corrected by Jean-François Alcover, Mar 16 2018

A120956 G.f. A(x) satisfies x / Series_Reversion(x*A(x)) = (A(x) + 1+x)/2.

Original entry on oeis.org

1, 1, 2, 8, 50, 412, 4120, 47840, 628130, 9164600, 146786980, 2557718352, 48147082520, 973612557504, 21050077835440, 484637221115520, 11839623684281890, 305949448095405252, 8339153054042801704
Offset: 0

Views

Author

Paul D. Hanna, Jul 19 2006

Keywords

Comments

The g.f. for A120955 = x / Series_Reversion(x*A(x)) = (A(x) + 1+x)/2.
a(n) = 2 (mod 4) when n = 2^k for k > 0. - Paul D. Hanna, Sep 21 2019
a(n) = 4 (mod 8) when n = A140138(k) for k > 0. - Paul D. Hanna, Sep 21 2019

Examples

			A(x) = 1 + x + 2*x^2 + 8*x^3 + 50*x^4 + 412*x^5 + 4120*x^6 +...
The g.f. of A120955 is:
x/series_reversion(x*A(x)) = 1 + x + x^2 + 4*x^3 + 25*x^4 + 206*x^5 +...
Compare terms to see that A120955(n) = a(n)/2 for n>=2.
A(x*A(x)) = 1 + x + 3*x^2 + 14*x^3 + 92*x^4 + 774*x^5 +...
A(x)*(2-x) = 2 + x + 3*x^2 + 14*x^3 + 92*x^4 + 774*x^5 +...
Contribution from _Paul D. Hanna_, Sep 04 2010: (Start)
Let G(x) = x*A(x), then
A(x) = 1 + G(x)/2 + G(G(x))/2^2 + G(G(G(x)))/2^3 + G(G(G(G(x))))/2^4 + G(G(G(G(G(x)))))/2^5 +...
The table of coefficients in the iterations of G(x) = x*A(x) begin:
[1, 1, 2, 8, 50, 412, 4120, 47840, 628130, ...];
[1, 2, 6, 27, 170, 1380, 13580, 155568, 2020526, ...];
[1, 3, 12, 63, 422, 3482, 34208, 389007, 5010678, ...];
[1, 4, 20, 122, 892, 7690, 76900, 878032, 11284106, ...];
[1, 5, 30, 210, 1690, 15490, 160464, 1864844, 24130948, ...];
[1, 6, 42, 333, 2950, 29002, 315184, 3775392, 49699640, ...];
[1, 7, 56, 497, 4830, 51100, 587104, 7318983, 98962072, ...];
[1, 8, 72, 708, 7512, 85532, 1043032, 13621120, 190640924, ...];
[1, 9, 90, 972, 11202, 137040, 1776264, 24394608, 355390206, ...]; ...
in which the following sum along column k equals a(k+1):
a(2) = 2 = 1/2 + 2/4 + 3/8+ 4/16 + 5/32 + 6/64 +...
a(3) = 8 = 2/2 + 6/4 + 12/8 + 20/16 + 30/32 + 42/64 + ...
a(4) = 50 = 8/2 + 27/4 + 63/8 + 122/16 + 210/32 + 333/64 +...
a(5) = 412 = 50/2 + 170/4 + 422/8 + 892/16 + 1690/32 + 2950/64 +... (End)
		

Crossrefs

Cf. A120955.

Programs

  • PARI
    {a(n)=local(A=[1,1]);for(i=1,n,A=concat(A,t); A[ #A]=subst(Vec(serreverse(x/Ser(A)))[ #A],t,0)); Vec(serreverse(x/Ser(A)))[n+1]}
    for(n=0,30, print1(a(n),", "))
    
  • PARI
    /* Prints N terms using x/Series_Reversion(x*A(x)) = (A(x) + 1+x)/2 */
    N = 30; {A=[1,1]; for(i=1,N, A = concat(A, -2*Vec(x/serreverse(x*Ser(concat(A,0))))[#A+1]); print1(i,",") );A} \\ Paul D. Hanna, Sep 21 2019

Formula

a(n) = 2*A120955(n) for n>=2.
G.f. A(x) satisfies:
(1) A( 2x/(A(x) + 1+x) ) = (A(x) + 1+x)/2.
(2) A(x) = F(x*A(x)) and F(x) = A(x/F(x)) where F(x) = g.f. of A120955.
(3) A(x) = (1 + A(x*A(x))) / (2-x).
(4) A(x) = 1 + Sum_{n>=0} G_n(x)/2^(n+1) where G(x)=x*A(x) and G_{n+1}(x) = G_n(x*A(x)) denotes iteration with G_0(x)=x. [From Paul D. Hanna, Sep 04 2010]

A140137 Numbers n such that A140080(n) = 1.

Original entry on oeis.org

1, 2, 4, 7, 8, 11, 13, 14, 16, 19, 22, 23, 25, 26, 28, 29, 31, 32, 35, 37, 38, 41, 43, 44, 46, 47, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 64, 67, 70, 71, 73, 74, 76, 77, 79, 82, 83, 85, 86, 88, 89, 91, 92, 94, 95, 97, 98, 100, 101, 103, 104, 106, 107, 109, 110
Offset: 1

Views

Author

Nadia Heninger and N. J. A. Sloane, Jun 08 2008

Keywords

Comments

This and A140138 together give all numbers not divisible by 3.

Crossrefs

Showing 1-4 of 4 results.