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 61-70 of 384 results. Next

A073469 Expansion of x/B(x) where B(x) is the g.f. for A002487.

Original entry on oeis.org

1, -1, -1, 2, -2, 0, 4, -4, -2, 6, -4, -2, 10, -8, -6, 14, -10, -4, 20, -16, -8, 24, -18, -6, 34, -28, -14, 42, -34, -8, 56, -48, -18, 66, -52, -14, 86, -72, -30, 102, -80, -22, 126, -104, -40, 144, -110, -34, 178, -144, -62, 206, -158, -48, 248, -200, -82, 282, -208, -74, 338, -264, -122, 386, -282, -104, 452, -348, -156, 504
Offset: 0

Views

Author

N. J. A. Sloane, Aug 26 2002

Keywords

Comments

a(n) is the Euler transform of a sequence b(n) = [-1,-1,1,-1,0,1,0,-1,0,0,0,1 ...] that has (for n > 0, k > 0) b(2^k-1) = -1, b(3*2^k-1) = 1, and b(n) = 0 otherwise. - Georg Fischer, Aug 24 2020

Programs

  • Mathematica
    terms = 70; A[x_] = 1/Product[1 + x^(2^k) + x^(2^(k + 1)), {k, 0, Ceiling[ Log[2, terms]]}] + O[x]^terms; CoefficientList[A[x], x] (* Jean-François Alcover, Jun 30 2011, updated Jan 15 2018 *)

Formula

This sequence grows asymptotically roughly like exp(log(n)^2), but with a complicated pattern of oscillations: see the article by Dumas-Flajolet, page 4, for a complete expansion that is related to A000123 and methods of de Bruijn. - Philippe Flajolet, Sep 06 2008
G.f. A(x) satisfies: A(x) = A(x^2) / (1 + x + x^2). - Ilya Gutkovskiy, Jul 09 2019

A091926 Least k<=n such that A002487(k)=A002487(n).

Original entry on oeis.org

1, 1, 3, 1, 5, 3, 5, 1, 9, 5, 11, 3, 11, 5, 9, 1, 11, 9, 19, 5, 21, 11, 19, 3, 19, 11, 21, 5, 19, 9, 11, 1, 33, 11, 35, 9, 37, 19, 39, 5, 37, 21, 43, 11, 45, 19, 35, 3, 35, 19, 45, 11, 43, 21, 37, 5, 39, 19, 37, 9, 35, 11, 33, 1, 19, 33, 37, 11, 69, 35, 43, 9, 73, 37, 75, 19, 77, 39, 43, 5
Offset: 1

Views

Author

Benoit Cloitre, Mar 11 2004

Keywords

Comments

a(n)=n for n=1,3,5,9,11,19,21,33,....

Crossrefs

Cf. A091945.

Programs

A091948 Number of values of k, 0 <= k <= n, satisfying A002487(k) = A002487(n).

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 2, 2, 4, 1, 3, 1, 3, 2, 4, 2, 5, 3, 3, 1, 5, 1, 4, 2, 4, 3, 5, 2, 6, 4, 4, 6, 6, 1, 7, 1, 5, 1, 5, 1, 7, 2, 3, 1, 8, 1, 6, 2, 5, 3, 7, 2, 9, 2, 4, 3, 8, 2, 8, 4, 6, 4, 10, 2, 7, 9, 3, 5, 11, 1, 5, 3, 7, 1, 6, 1, 10, 1, 3, 4, 9, 2, 7, 1, 5, 1, 5, 2, 12, 2, 3, 2, 11, 1, 6, 8, 6, 9, 7, 2, 12, 3, 4
Offset: 0

Views

Author

Benoit Cloitre, Mar 11 2004

Keywords

Comments

This sequence is the ordinal transform of A002487. - Rémy Sigrist, Dec 28 2022

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, n,
          (q-> b(q)+(n-2*q)*b(n-q))(iquo(n, 2)))
        end:
    p:= proc() 0 end:
    a:= proc(n) option remember; local t;
          t:= b(n); p(t):= p(t)+1
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 31 2022
  • Mathematica
    b[n_] := b[n] = If[n < 2, n,
       Function[q, b[q] + (n - 2*q)*b[n - q]][Quotient[n, 2]]];
    p[_] = 0;
    a[n_] := a[n] = With[{t = b[n]}, p[t] = p[t]+1];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 20 2024, after Alois P. Heinz *)
  • PARI
    \\ See Links section.

Formula

a(n) = 1 iff n belongs to A091945. - Rémy Sigrist, Dec 28 2022

Extensions

a(0) = 1 prepended and name adapted by Rémy Sigrist, Dec 28 2022

A163658 G.f.: A(x) = exp( Sum_{n>=1} A163659(n)^2*x^n/n ), where x*exp(Sum_{n>=1} A163659(n)*x^n/n) = S(x) is the g.f. of Stern's diatomic series (A002487).

Original entry on oeis.org

1, 1, 5, 6, 26, 30, 95, 115, 347, 412, 1076, 1308, 3277, 3941, 9081, 11050, 24694, 29834, 63067, 76711, 158127, 191360, 379032, 460448, 893441, 1081113, 2035189, 2468182, 4565994, 5520070, 9970503, 12068315, 21475803, 25926236, 45246532
Offset: 0

Views

Author

Paul D. Hanna, Aug 02 2009

Keywords

Examples

			G.f.: A(x) = 1 + x + 5*x^2 + 6*x^3 + 26*x^4 + 30*x^5 + 95*x^6 +...
log(A(X)) = x + 3^2*x^2/2 + 2^2*x^3/3 + 7^2*x^4/4 + x^5/5 + 6^2*x^6/6 +...
log(S(x)/x) = x + 3*x^2/2 - 2*x^3/3 + 7*x^4/4 + x^5/5 - 6*x^6/6 +...
where S(x) is the g.f. of Stern's diatomic series (A002487):
S(x) = x + x^2 + 2*x^3 + x^4 + 3*x^5 + 2*x^6 + 3*x^7 + x^8 + 4*x^9 +...
		

Crossrefs

Cf. A163659, A002487, A156302 (variant).

Programs

  • PARI
    {A002487(n)=local(c=1, b=0); while(n>0, if(bitand(n, 1), b+=c, c+=b); n>>=1); b}
    {A163659(n)=n*polcoeff(log(sum(k=0,n,A002487(k+1)*x^k)+x*O(x^n)),n)}
    {a(n)=polcoeff(exp(sum(k=1, n, A163659(k)^2*x^k/k)+x*O(x^n)), n)}

A195587 a(n) = A163659(n^2), where A163659 is the logarithmic derivative of Stern's diatomic series (A002487).

Original entry on oeis.org

1, 7, -2, 31, 1, -14, 1, 127, -2, 7, 1, -62, 1, 7, -2, 511, 1, -14, 1, 31, -2, 7, 1, -254, 1, 7, -2, 31, 1, -14, 1, 2047, -2, 7, 1, -62, 1, 7, -2, 127, 1, -14, 1, 31, -2, 7, 1, -1022, 1, 7, -2, 31, 1, -14, 1, 127, -2, 7, 1, -62, 1, 7, -2, 8191, 1, -14, 1, 31, -2, 7, 1, -254, 1, 7, -2, 31, 1, -14, 1, 511, -2, 7, 1, -62, 1, 7, -2, 127, 1, -14, 1, 31, -2, 7, 1, -4094
Offset: 1

Views

Author

Paul D. Hanna, Sep 20 2011

Keywords

Comments

Multiplicative because A163659 is. - Andrew Howroyd, Jul 26 2018

Examples

			L.g.f.: L(x) = x + 7*x^2/2 - 2*x^3/3 + 31*x^4/4 + x^5/5 - 14*x^6/6 + x^7/7 + 127*x^8/8 +...
where
exp(L(x)) = 1 + x + 4*x^2 + 3*x^3 + 15*x^4 + 12*x^5 + 37*x^6 + 25*x^7 +...
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Times @@ (Function[{p, e}, Which[p == 2, 2^(e+1) - 1, p == 3, -2, True, 1]] @@@ FactorInteger[n^2]);
    a /@ Range[1, 100] (* Jean-François Alcover, Sep 20 2019 *)
  • PARI
    {A163659(n)=if(n<1,0,if(n%3,1,-2)*sigma(2^valuation(n,2)))}
    {a(n)=A163659(n^2)}
    for(n=1, 64, print1(a(n), ", "))
    
  • PARI
    {a(n)=local(X=x+x*O(x^n), A); A=log(1+X+X^2) + sum(k=0, #binary(n), 3*2^k*log(1 + X^(2*2^k) + X^(4*2^k))); n*polcoeff(A, n)}
    for(n=1, 64, print1(a(n), ", "))

Formula

L.g.f.: log(1+x+x^2) + Sum_{n>=0} 3*2^n * log(1 + x^(2*2^n) + x^(4*2^n)) = Sum_{n>=1} a(n)*x^n/n. - Paul D. Hanna, May 04 2014
G.f.: x*(1+2*x)/(1+x+x^2) + Sum_{n>=0} 6*4^n * x^(2*2^n) * (1 + 2*x^(2*2^n)) / (1 + x^(2*2^n) + x^(4*2^n)). - Paul D. Hanna, May 04 2014
Dirichlet g.f.: zeta(s) * (1 - 3^(1-s)) * (2^s + 2) / (2^s - 4). - Amiram Eldar, Oct 24 2023

A266413 a(1) = 1, after which each a(n) = A002487(n)-th number selected from those not yet in the sequence.

Original entry on oeis.org

1, 2, 4, 3, 7, 6, 9, 5, 12, 11, 15, 10, 17, 14, 18, 8, 21, 20, 25, 19, 28, 24, 29, 16, 31, 27, 34, 23, 35, 30, 33, 13, 38, 37, 43, 36, 47, 42, 48, 32, 51, 46, 55, 41, 56, 49, 53, 26, 57, 52, 62, 45, 65, 59, 64, 40, 66, 60, 69, 50, 68, 58, 63, 22, 71, 70, 77, 67, 82, 76, 83, 61, 87, 81, 92, 75, 93, 84, 89, 54, 94, 88, 101, 80
Offset: 1

Views

Author

Antti Karttunen, Dec 29 2015

Keywords

Crossrefs

Inverse: A266414.
Cf. A002487.
Similar permutations in Quetian style: A119435, A126917, A246165, A266411.
Cf. also A266405.

Programs

  • Mathematica
    f[n_] := Block[{a = {1}, g, b = Range[2, n]}, g[1] = 1; g[x_] := g[x] = If[EvenQ@ x, g[x/2], g[(x - 1)/2] + g[(x + 1)/2]]; Do[{AppendTo[a, #[[1, 1]]], Set[b, Last@ #]} &@ If[# > Length@ b, Break[], TakeDrop[b, {#}]] &@ g@ k, {k, 2, n}]; a]; f@ 103 (* Michael De Vlieger, Dec 29 2015, Version 10.2, after N. J. A. Sloane at A002487 *)

A272464 Fractal sequence related to Stern's diatomic sequence (A002487).

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 1, 4, 3, 5, 2, 1, 4, 7, 3, 8, 5, 2, 1, 4, 11, 7, 10, 3, 8, 13, 5, 2, 1, 4, 15, 11, 18, 7, 17, 10, 3, 8, 21, 13, 5, 2, 1, 4, 19, 15, 26, 11, 29, 18, 25, 7, 24, 17, 27, 10, 3, 8, 21, 34, 13, 5, 2, 1, 4, 23, 19, 15, 41, 26, 37, 11, 40, 29, 47
Offset: 1

Views

Author

Max Barrentine, Apr 30 2016

Keywords

Comments

To extend the sequence after a(n): suppose the most recent previous occurrence of a(n) was at a(k) (take the largest such k), if a(k)+a(k+1) does not occur earlier in the sequence, then we extend the sequence with two new terms, setting a(n+1)=a(k)+a(k+1) and a(n+2)=a(k+1); otherwise we get one new term by setting a(n+1)=a(k+1).
As a result of this construction, the last term added (except for the initial term) is always a term that has appeared before, and so k always exists.
The "fractal" property is that if the first occurrence of each term that appears in this sequence is removed, the sequence remains unchanged.
From Max Barrentine, Jul 29 2016: (Start)
For the above definition for n and k, does n/k converge to 3/2?
A different way to view this sequence is as Stern's Diatomic sequence (A002487) with repeating odd-indexed terms removed. For instance, A002487(6)=2, A002487(7)=3, and A002487(8)=1 but since 3 has already occurred in the present sequence at a(5), a(6)=2, and a(7)=1. This removes from the present sequence all terms that occur in A002487 between A002487(p)=2 and A002487(q)=1 for the largest pA002487(3*2^k) and A002487(2^k+1). (End)

Examples

			a(2)=1; the previous occurrence of a(n)=1 is a(1). Therefore a(3)=a(1)+a(2)=2, because 2 did not occur earlier in the sequence, and a(4)=a(2)=1.
The terms may be displayed as a triangle, starting a new row when a 1 appears:
1;
1, 2;
1, 3, 2;
1, 4, 3, 5, 2;
1, 4, 7, 3, 8, 5, 2...
		

Crossrefs

Cf. A002487.
Van Eck's sequence A181391 has a somewhat similar flavor. - N. J. A. Sloane, May 03 2016

Programs

  • PARI
    findprec(v) = {lastn = #v; forstep(k=lastn-1, 1, -1, if (v[k] == v[lastn], return (k)););}
    lista(nn) = {v = [1, 1]; for (n= 1, nn, k = findprec(v); if (! vecsearch(vecsort(v,,8), v[k]+v[k+1]), v = concat(v, v[k]+v[k+1]); v = concat(v, v[k+1]), v = concat(v, v[k+1]));); print(v);} \\ Michel Marcus, May 02 2016

Formula

For a(n)=a(k) for largest k
If a(k)+a(k+1)≠a(m), then a(n+1)=a(k)+a(k+1), a(n+2)=a(k+1);
If a(k)+a(k+1)=a(m), then a(n+1)=a(k+1).
a(1)=a(2)=1.

Extensions

Definition revised by N. J. A. Sloane, May 03 2016

A283974 Numbers n for which A002487(n-1) AND A002487(n) > 0 where AND is bitwise-and (A004198).

Original entry on oeis.org

2, 5, 6, 7, 8, 11, 14, 17, 18, 19, 20, 23, 24, 25, 26, 29, 30, 31, 32, 34, 35, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 86, 89, 92, 95, 96, 97, 98, 101, 104, 107, 110, 111, 112, 113, 114, 116, 117, 118, 119, 120
Offset: 1

Author

Antti Karttunen, Mar 21 2017

Keywords

Comments

Numbers n such that the binary representations of A002487(n-1) and A002487(n) have at least one 1-bit in a common shared position.

Crossrefs

Cf. A283973 (complement).
Positions of nonzeros in A283988.

Programs

  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := If[EvenQ@ n, a[n/2], a[(n - 1)/2] + a[(n + 1)/2]]; Flatten@ Position[Table[BitAnd[a[n - 1], a@ n], {n, 120}], k_ /; k > 0] (* Michael De Vlieger, Mar 22 2017 *)
  • PARI
    A(n) = if(n<2, n, if(n%2, A(n\2) + A((n + 1)/2), A(n/2)));
    D(n) = if(n<1, 1, sum(k=0, n, binomial(n + k - 1, 2*k)%2))
    for(n=1, 120, if(bitor(A(n - 1), A(n)) != D(n), print1(n, ", "))) \\ Indranil Ghosh, Mar 23 2017

A286387 a(n) = A002487(n^2).

Original entry on oeis.org

0, 1, 1, 4, 1, 7, 4, 9, 1, 14, 7, 13, 4, 29, 9, 16, 1, 23, 14, 43, 7, 36, 13, 29, 4, 43, 29, 64, 9, 67, 16, 25, 1, 34, 23, 89, 14, 115, 43, 46, 7, 85, 36, 79, 13, 46, 29, 79, 4, 97, 43, 142, 29, 89, 64, 91, 9, 136, 67, 157, 16, 121, 25, 36, 1, 47, 34, 151, 23, 236, 89, 157, 14, 211, 115, 104, 43, 225, 46, 109, 7, 162, 85, 235, 36, 139, 79, 174, 13, 101, 46
Offset: 0

Author

Antti Karttunen, May 09 2017

Keywords

Comments

Conjecture: For all i >= 0, j >= 0: A103391(1+i) = A103391(1+j) => a(i) = a(j). This would be an implication of observation made at A286377, which has been checked up to n=2048. See also A286378.

Crossrefs

Programs

  • Python
    from functools import reduce
    def A286387(n): return sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(n**2)[-1:2:-1],(1,0))) if n else 0 # Chai Wah Wu, May 18 2023
  • Scheme
    (define (A286387 n) (A002487 (* n n)))
    

Formula

a(n) = A002487(A000290(n)) = A002487(n^2).

A295510 The numerators of the fractions in the Schinzel-Sierpiński tree A295511, read across levels. Also an encoding of Stern's diatomic series A002487.

Original entry on oeis.org

2, 2, 3, 3, 7, 5, 7, 2, 17, 7, 11, 5, 11, 13, 5, 3, 241, 17, 29, 7, 17, 31, 43, 13, 43, 11, 17, 13, 29, 193, 11, 2, 13, 11, 37, 73, 67, 29, 41, 7, 23, 97, 79, 31, 73, 29, 19, 5, 37, 43, 73, 31, 157, 17, 23, 13, 41, 43, 199, 17, 19, 11, 7
Offset: 1

Author

Peter Luschny, Nov 23 2017

Keywords

Examples

			The triangle (row lengths are 2^(n-1)) starts:
1: 2
2: 2, 3
3: 3, 7, 5, 7
4: 2, 17, 7, 11, 5, 11, 13, 5
5: 3, 241, 17, 29, 7, 17, 31, 43, 13, 43, 11, 17, 13, 29, 193, 11
		

Crossrefs

Programs

  • Sage
    # uses[SSETree from A295511]
    def A295510_row(n):
        if n == 1: return [2]
        return [r.numerator() for r in SSETree(n)]
    for n in (1..6): print(A295510_row(n))
Previous Showing 61-70 of 384 results. Next